![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 1999 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: ceRandom.h,v $ $Revision: 1.3 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtCeRandom_H_ 00013 #define DtCeRandom_H_ 00014 00015 #include "vrfutil/rdrWritr.h" 00016 #include "vrfutil/rwString.h" 00017 #include "vrfutil/rwReal.h" 00018 #include "vrfutil/condExpr.h" 00019 00020 const char DtCeRandomTypeName[] = "Random"; 00021 00022 00025 struct DtNetCeRandom 00026 { 00027 DtNetFloat64 myProbability; 00028 }; 00029 00035 #include "vrfutil/vrfutilDefines.h" 00036 class DT_DLL_vrfutil DtCeRandom : public DtSimCondExpr 00037 { 00038 public: 00039 00041 DtCeRandom(); 00042 00044 DtCeRandom(DtReaderWriterRegistry* parentRegistry); 00045 00047 DtCeRandom(const DtCeRandom& orig, 00048 DtReaderWriterRegistry* parentRegistry = NULL); 00049 00051 virtual ~DtCeRandom(); 00052 00054 DtCeRandom& operator=(const DtCeRandom& orig); 00055 00057 virtual DtSimCondExpr* clone(DtReaderWriterRegistry* parentRegistry = NULL); 00058 00060 virtual int type() const; 00061 00063 virtual DtReal probability() const; 00065 virtual void setProbability(DtReal arg); 00066 00079 virtual DtString stringRep(int subExprIndex = DtSR_EXPR) const; 00080 00083 virtual int netRepSize() const; 00084 00086 virtual bool setFromNet(const char* contentBuffer, 00087 unsigned contentSize); 00088 00091 virtual bool setToNet(); 00092 00093 static DtSimCondExpr * creator(); 00094 00095 protected: 00096 DtRwReal myProbability; 00097 }; 00098 00099 #endif