![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1999 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: simBlock.h,v $ $Revision: 1.17 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00012 #ifndef DtSimBlock_H_ 00013 #define DtSimBlock_H_ 00014 00015 class DtSimBlock; 00016 00017 #include <mtl/mtl.h> 00018 #include <vlutil/vlString.h> 00019 #include "vrfutil/rwIntList.h" 00020 #include "vrfplan/stmtIndex.h" 00021 00022 class DtPlan; 00023 class DtSimTrigger; 00024 class DtSimStatement; 00025 class DtRecursiveSimBlockIterator; 00026 00032 00033 #include "vrfplan/vrfplanDefines.h" 00034 class DT_DLL_vrfplan DtSimBlock : public DtRwIntrusiveList 00035 { 00036 public: 00037 00039 DtSimBlock(); 00040 00042 DtSimBlock(const DtString& name, 00043 DtReaderWriterRegistry* parentRegistry = NULL); 00044 00047 DtSimBlock(const DtSimBlock& orig); 00048 00051 DtSimBlock(const DtString& name, 00052 const DtSimBlock& orig, 00053 DtReaderWriterRegistry* parentRegistry = NULL); 00054 00057 virtual ~DtSimBlock(); 00058 00062 DtSimBlock& operator=(const DtSimBlock& orig); 00063 00067 virtual DtSimBlock* clone(const DtString& name, 00068 DtReaderWriterRegistry* parentRegistry = NULL) const = 0; 00069 00072 DtSimBlock* clone() const; 00073 00081 DtSimStatement* firstStmt() const; 00082 00084 DtSimStatement* lastStmt() const; 00085 00090 virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath, 00091 const DtVariableBindingsList& variableBindings); 00092 00103 virtual void exitFromBlock(DtPlan&) = 0; 00104 00109 virtual bool translateIndex(DtStmtIndex& stmtIndex) const; 00110 00114 virtual void translateIndices(DtList& stmtIndexList) const; 00115 00118 virtual DtSimStatement* lookupStatement(DtStmtIdType statementId); 00119 00123 virtual DtRecursiveSimBlockIterator* spawnRecursiveIterator() const; 00124 00127 virtual bool validate(); 00128 00131 virtual bool isSameBlock(DtSimBlock* rhs); 00132 00133 protected: 00134 00139 virtual DtListItem* addToList(DtRwListedObj* data, DtRwListedObj* after); 00140 00145 virtual void cloneListFrom(const DtSimBlock& other); 00146 }; 00147 00149 00150 inline DtSimBlock* DtSimBlock::clone() const 00151 { 00152 return clone(name().string(), NULL); 00153 } 00154 00155 inline DtSimStatement* DtSimBlock::firstStmt() const 00156 { 00157 return (DtSimStatement*) firstObj(); 00158 } 00159 00160 inline DtSimStatement* DtSimBlock::lastStmt() const 00161 { 00162 return (DtSimStatement*) lastObj(); 00163 } 00164 00165 00166 #endif 00167