VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simBlock.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 
12 #include "vrfplan/vrfplanDefines.h"
13 #include <vlutil/vlString.h>
15 #include "vrfplan/stmtIndex.h"
16 
17 class DtPlan;
18 class DtSimTrigger;
19 class DtSimStatement;
21 
28 {
29 public:
30 
32  DtSimBlock(DtSimStatement* parentStatement);
33 
35  DtSimBlock(const DtString& name, DtSimStatement* parentStatement,
36  DtReaderWriterRegistry* parentRegistry = NULL);
37 
40  DtSimBlock(const DtSimBlock& orig);
41 
44  DtSimBlock(const DtString& name,
45  const DtSimBlock& orig,
46  DtReaderWriterRegistry* parentRegistry = NULL);
47 
50  virtual ~DtSimBlock();
51 
55  DtSimBlock& operator=(const DtSimBlock& orig);
56 
60  virtual DtSimBlock* clone(const DtString& name,
61  DtReaderWriterRegistry* parentRegistry = NULL) const = 0;
62 
65  DtSimBlock* clone() const;
66 
74  DtSimStatement* firstStmt() const;
75 
77  DtSimStatement* lastStmt() const;
78 
83  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
84  const DtVariableBindingsList& variableBindings);
85 
96  virtual void exitFromBlock(DtPlan&) = 0;
97 
102  virtual bool translateIndex(DtStmtIndex& stmtIndex);
103 
107  virtual void translateIndices(DtList& stmtIndexList);
108 
111  virtual DtSimStatement* lookupStatement(DtStmtIdType statementId);
112 
116  virtual DtRecursiveSimBlockIterator* spawnRecursiveIterator() const;
117 
120  virtual bool validate();
121 
124  virtual bool isSameBlock(DtSimBlock* rhs);
125 
127  void setParentStatement(DtSimStatement*);
128 
130  DtSimStatement* parentStatement() const;
131 
136  virtual DtListItem* addToList(DtRwListedObj* data, DtRwListedObj* after);
137 
139  virtual void upgradeTriggerUUID(const boost::unordered_map<DtUUID, DtUUID>&);
140 
142  virtual void reset();
143 
144 protected:
145 
150  virtual void cloneListFrom(const DtSimBlock& other);
151 
152 protected:
154 };
155 
157 
159 {
160  return clone(name().string(), NULL);
161 }
162 
164 {
165  return (DtSimStatement*) firstObj();
166 }
167 
169 {
170  return (DtSimStatement*) lastObj();
171 }
172 
174 {
175  myParentStatement = s;
176 }
177 
179 {
180  return myParentStatement;
181 }
DtSimStatement * parentStatement() const
Returns parent statement of this block.
Definition: simBlock.h:178
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)=0
This special version of getData needs to create the necessary list element object (one that&#39;s derived...
DtSimBlock * clone() const
This clone re-uses the current DtSimBlock&#39;s name, but does not register in its parent&#39;s plan or regis...
Definition: simBlock.h:158
DtSimStatement * lastStmt() const
Same as lastObj(), except also downcasts.
Definition: simBlock.h:168
DtSimStatement * myParentStatement
Definition: simBlock.h:153
class DtStmtIndex:
Definition: stmtIndex.h:24
void setParentStatement(DtSimStatement *)
Sets the parent statement of this block.
Definition: simBlock.h:173
Definition: readerWriterRegistry.h:39
Iterator for iterating over a DtRwIntrusiveList of DtSimStatements and all its descendants (as repres...
Definition: recursiveSimBlockIterator.h:32
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
class DtSimBlock:
Definition: simBlock.h:27
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual DtListItem * addToList(DtRwListedObj *data, DtRwListedObj *after)
Add element to the list just after the indicated item. Returns the DtListItem envelope object that co...
class DtRwIntrusiveList:
Definition: rwIntrusiveList.h:38
class DtPlan:
Definition: plan.h:92
! ! This is a base class from which elements of a DtRwIntrusiveList must be ! derived. Previous and next pointers can be obtained directly from the ! DtRwListedObj, without going through the DtRwIntrusiveList to which it has ! been added. !
Definition: rwIntrusiveList.h:173
DtRwIntrusiveList & operator=(const DtRwIntrusiveList &orig)
Calls down to DtReaderWriter::operator=(). List elements are not copied.
class DtSimTrigger:
Definition: simTrigger.h:28
class DtSimStatement:
Definition: simStatement.h:38
DtRwListedObj * firstObj() const
Return first and last item on the list.
Definition: rwIntrusiveList.h:224
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
DtSimStatement * firstStmt() const
Same as firstObj(), except also downcasts. firstStmt() and lastStmt() are wrapper functions that make...
Definition: simBlock.h:163
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
DtRwListedObj * lastObj() const
Definition: rwIntrusiveList.h:238

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)