VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
simCondExpr.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: condExpr.h,v $ $Revision: 1.11 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DtSimCondExpr_H_
13 #define DtSimCondExpr_H_
14 
15 #include "vrfutil/readerWriter.h"
17 #include <vlutil/vlNetTypes.h>
18 #include "tdbutil/translation.h"
19 #include "tdbutil/tdbUnits.h"
20 
21 class DtEvaluator;
22 class DtSimManager;
23 
30 #include "vrfutil/vrfutilDefines.h"
32 {
33 public:
34 
36  DtSimCondExpr();
37 
39  DtSimCondExpr(const DtString & name,
40  DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  DtSimCondExpr(const DtSimCondExpr& orig,
44  DtReaderWriterRegistry* parentRegistry = NULL);
45 
47  virtual ~DtSimCondExpr();
48 
51  virtual bool init();
52 
55 
57  virtual DtSimCondExpr* clone(
58  DtReaderWriterRegistry* parentRegistry = NULL) = 0;
59 
61  virtual int type() const = 0;
62 
67  virtual void setEvaluator(DtEvaluator* evaluator);
68 
76  virtual bool evaluate(const DtString& objectName,
77  DtSimManager* simManager) const;
78 
80  virtual int subExprCount() const;
84  virtual DtSimCondExpr* subExpr(int index);
85 
86 #ifndef WIN32
87 
88  static const int DtSR_EXPR = -1;
89 #else
90 
91  enum
92  {
94  DtSR_EXPR = -1
95  };
96 #endif
97 
107  virtual DtString stringRep(int subExprIndex = DtSR_EXPR) const = 0;
108 
112  DtString stringRepFull() const;
113 
114  virtual char* netRep();
115 
117  virtual int netRepSize() const
118  { return 0; }
119 
120  virtual bool setFromNet(const char* contentBuffer,
121  unsigned contentSize)
122  {(void) &contentBuffer; (void) &contentSize; return false; }
123 
124  virtual bool setToNet()
125  { return false; }
126 
130 
140  static DtSimCondExpr * createCondExpr(DtlObjPtr mtlStream);
141 
144  static void addCondExprCreatorFcn(const DtString & type, const int intType,
146 
147  static void setFactory(DtCondExprFactory * factory);
148  static DtCondExprFactory * factory();
149 
150 protected:
151 
152  virtual char* createNetworkBuffer();
153 
154 protected:
156 
157  char* myNetRep;
158 
160 };
161 
162 #endif
163 

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)