VR-Forces 4.8 Class Documentation
 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 class DtSimBlock;
12 
13 #include "vrfplan/vrfplanDefines.h"
14 #include <mtl/mtl.h>
15 #include <vlutil/vlString.h>
17 #include "vrfplan/stmtIndex.h"
18 
19 class DtPlan;
20 class DtSimTrigger;
21 class DtSimStatement;
23 
30 {
31 public:
32 
34  DtSimBlock(DtSimStatement* parentStatement);
35 
37  DtSimBlock(const DtString& name, DtSimStatement* parentStatement,
38  DtReaderWriterRegistry* parentRegistry = NULL);
39 
42  DtSimBlock(const DtSimBlock& orig);
43 
46  DtSimBlock(const DtString& name,
47  const DtSimBlock& orig,
48  DtReaderWriterRegistry* parentRegistry = NULL);
49 
52  virtual ~DtSimBlock();
53 
57  DtSimBlock& operator=(const DtSimBlock& orig);
58 
62  virtual DtSimBlock* clone(const DtString& name,
63  DtReaderWriterRegistry* parentRegistry = NULL) const = 0;
64 
67  DtSimBlock* clone() const;
68 
76  DtSimStatement* firstStmt() const;
77 
79  DtSimStatement* lastStmt() const;
80 
85  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
86  const DtVariableBindingsList& variableBindings);
87 
98  virtual void exitFromBlock(DtPlan&) = 0;
99 
104  virtual bool translateIndex(DtStmtIndex& stmtIndex);
105 
109  virtual void translateIndices(DtList& stmtIndexList);
110 
113  virtual DtSimStatement* lookupStatement(DtStmtIdType statementId);
114 
118  virtual DtRecursiveSimBlockIterator* spawnRecursiveIterator() const;
119 
122  virtual bool validate();
123 
126  virtual bool isSameBlock(DtSimBlock* rhs);
127 
129  void setParentStatement(DtSimStatement*);
130 
132  DtSimStatement* parentStatement() const;
133 
138  virtual DtListItem* addToList(DtRwListedObj* data, DtRwListedObj* after);
139 
141  virtual void upgradeTriggerUUID(const boost::unordered_map<DtUUID, DtUUID>&);
142 
144  virtual void reset();
145 
146 protected:
147 
152  virtual void cloneListFrom(const DtSimBlock& other);
153 
154 protected:
156 };
157 
159 
161 {
162  return clone(name().string(), NULL);
163 }
164 
166 {
167  return (DtSimStatement*) firstObj();
168 }
169 
171 {
172  return (DtSimStatement*) lastObj();
173 }
174 
176 {
177  myParentStatement = s;
178 }
179 
181 {
182  return myParentStatement;
183 }
DtSimStatement * parentStatement() const
Returns parent statement of this block.
Definition: simBlock.h:180
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:160
DtSimStatement * lastStmt() const
Same as lastObj(), except also downcasts.
Definition: simBlock.h:170
DtSimStatement * myParentStatement
Definition: simBlock.h:155
class DtStmtIndex:
Definition: stmtIndex.h:24
void setParentStatement(DtSimStatement *)
Sets the parent statement of this block.
Definition: simBlock.h:175
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:29
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.
class DtRwIntrusiveList:
Definition: rwIntrusiveList.h:38
class DtPlan:
Definition: plan.h:90
! This is a base class from which elements of a DtRwIntrusiveList must be derived.
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:41
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.
Definition: simBlock.h:165
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
DtRwListedObj * lastObj() const
Definition: rwIntrusiveList.h:238

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)