VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ceRandom.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: ceRandom.h,v $ $Revision: 1.3 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtCeRandom_H_
13 #define DtCeRandom_H_
14 
16 #include <readerWriter/rwString.h>
17 #include <readerWriter/rwReal.h>
18 #include "vrfutil/simCondExpr.h"
19 
20 const char DtCeRandomTypeName[] = "Random";
21 
22 
26 {
27  DtNetFloat64 myProbability;
28 };
29 
30 
35 #include "vrfutil/vrfutilDefines.h"
37 {
38 public:
39 
41  DtCeRandom();
42 
44  DtCeRandom(DtReaderWriterRegistry* parentRegistry);
45 
47  DtCeRandom(const DtCeRandom& orig,
48  DtReaderWriterRegistry* parentRegistry = NULL);
49 
51  virtual ~DtCeRandom();
52 
54  DtCeRandom& operator=(const DtCeRandom& orig);
55 
57  virtual DtSimCondExpr* clone(DtReaderWriterRegistry* parentRegistry = NULL) const;
58 
60  virtual int type() const;
61 
63  virtual DtReal probability() const;
65  virtual void setProbability(DtReal arg);
66 
79  virtual DtString stringRep(int subExprIndex = DtSR_EXPR) const;
80 
83  virtual int netRepSize() const;
84 
86  virtual bool setFromNet(const char* contentBuffer,
87  unsigned contentSize);
88 
91  virtual bool setToNet();
92 
93  static DtSimCondExpr * creator();
94 
95 protected:
97 };
98 
99 #endif
DtRwReal myProbability
Definition: ceRandom.h:96
DtSimCondExpr & operator=(const DtSimCondExpr &orig)
assignment operator
virtual DtSimCondExpr * clone(DtReaderWriterRegistry *parentRegistry=NULL) const =0
clone operator
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Definition: simCondExpr.h:148
Definition: readerWriterRegistry.h:39
The random logical operator makes a random draw between 0 and 1, and compares the result against a gi...
Definition: ceRandom.h:36
virtual int netRepSize() const
These 3 should become pure virtual functions.
Definition: simCondExpr.h:145
this struct is the network representation of a random conditional expression
Definition: ceRandom.h:25
DtSimCondExpr is an abstract base class representing various Conditional Expressions used by the Plan...
Definition: simCondExpr.h:53
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtNetFloat64 myProbability
Definition: ceRandom.h:27
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
virtual DtString stringRep(int subExprIndex=DtSR_EXPR) const =0
Get a readable string representation of this level of this expression.
const char DtCeRandomTypeName[]
Definition: ceRandom.h:20
virtual bool setToNet()
Definition: simCondExpr.h:152
virtual int type() const =0
Returns the type of conditional expression defined in condExprTypes.h.

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)