VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
taskStmt.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: taskStmt.h,v $ $Revision: 1.20 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtTaskStmt_H_
13 #define DtTaskStmt_H_
14 
15 class DtTaskStmt;
16 
17 #include "vrfplan/simStatement.h"
18 #include <vlutil/vlNetTypes.h>
19 #include "vrfplan/vrfplanDefines.h"
20 
21 const char DtTaskStmtTypeName[] = "Task";
22 
23 class DtSimTask;
24 
31 {
32 public:
33 
36 
38  DtTaskStmt(DtReaderWriterRegistry* parentRegistry = NULL);
39 
41  DtTaskStmt(const DtTaskStmt& orig,
42  DtReaderWriterRegistry* parentRegistry = NULL);
43 
45  virtual ~DtTaskStmt();
46 
48  DtTaskStmt& operator=(const DtTaskStmt& orig);
49 
51  virtual DtSimStatement* clone(
52  DtReaderWriterRegistry* parentRegistry = NULL) const;
53 
55  virtual int type() const;
56 
59  virtual void execute(DtPlan& planContext);
60 
68  virtual DtString stringRep(int subBlockIndex = DtSR_STMT) const;
69 
71  virtual DtSimTask* task() const;
73  virtual void setTask(DtSimTask* arg);
74 
79  virtual void putSelf(std::string& fp, int indentLevel = 0,
80  bool writeUnspecified = false, const DtFilename& path = DtReaderWriter::appPath());
81 
84  virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
85  const DtVariableBindingsList& variableBindings);
86 
88  virtual int netRepSize() const;
89 
91  virtual bool setFromNet(const char* contentBuffer,
92  unsigned contentSize);
93 
96  virtual bool setToNet();
97 
98  static DtSimStatement * creator(DtReaderWriterRegistry* parentRegistry = NULL);
99 
100 protected:
101 
103 };
104 
105 #endif
virtual DtSimStatement * clone(DtReaderWriterRegistry *parentRegistry=NULL) const =0
virtual copy constructor A typical clone function. It must be overridden by derived classes to return...
DtSimTask * myTask
Definition: taskStmt.h:102
virtual void execute(DtPlan &planContext)=0
Execute the current statement and make any changes to the Plan state as appropriate. Tells the statement to activate its own behavior. Each kind of statement implements this function differently. It is passed a reference to the executing DtPlan object as a “context of execution”.
Definition: readerWriterRegistry.h:39
Instances of DtTaskStmt represent a single task command.
Definition: taskStmt.h:30
const char DtTaskStmtTypeName[]
Definition: taskStmt.h:21
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Extracts statement Id from buffer. First 16 bytes are a DtNetSimStatement structure. Derived class data should immediately follow this. Derived classes should call down to this one to make sure statement id gets set.
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
virtual void putSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Top level call to write itself to file. If write unspecified is true, will write entries that are uns...
virtual int netRepSize() const
Returns sizeof(DtNetSimStatement). Derived classes should add this size to the size of their net repr...
class DtPlan:
Definition: plan.h:92
class DtSimStatement:
Definition: simStatement.h:38
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
virtual bool setToNet()
Casts myNetRep to DtNetSimStatement* and fills in structure. Derived classes should always call down ...
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
DtSimStatement & operator=(const DtSimStatement &orig)
Assignment operator (protected because this is an abstract base class).
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
virtual int type() const =0
Returns the type of statement Type (defined in simStmtTypes.h)
virtual DtString stringRep(int subBlockIndex=DtSR_STMT) const =0
Get a readable string representation of this statement.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)