![]() |
VR-Forces 4.0.4 Class Documentation
|
class DtCeRandom: More...

Public Member Functions | |
| DtCeRandom () | |
| default constructor | |
| DtCeRandom (DtReaderWriterRegistry *parentRegistry) | |
| real constructor | |
| DtCeRandom (const DtCeRandom &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| copy constructor | |
| virtual | ~DtCeRandom () |
| destructor | |
| DtCeRandom & | operator= (const DtCeRandom &orig) |
| assignment operator | |
| virtual DtSimCondExpr * | clone (DtReaderWriterRegistry *parentRegistry=NULL) |
| clone operator | |
| virtual int | type () const |
| Returns DtCondExprRandomType (defined in condExprTypes.h). | |
| virtual DtReal | probability () const |
| Get the fractional probability (between 0.0 and 1.0). | |
| virtual void | setProbability (DtReal arg) |
| Set the fractional probability (between 0.0 and 1.0). | |
| virtual DtString | stringRep (int subExprIndex=DtSR_EXPR) const |
| Get a readable string representation of this level of this expression. | |
| virtual int | netRepSize () const |
| returns the size of the full network representation padded to an 8-byte boundary. | |
| virtual bool | setFromNet (const char *contentBuffer, unsigned contentSize) |
| Fills in the expression from the network buffer. | |
| virtual bool | setToNet () |
| Fills in the network buffer (created by base class conditional expression) with the conditional expression contents. | |
Static Public Member Functions | |
| static DtSimCondExpr * | creator () |
Protected Attributes | |
| DtRwReal | myProbability |
class DtCeRandom:
Instances of DtCeRandom represent an random probability test.
default constructor
| DtCeRandom::DtCeRandom | ( | DtReaderWriterRegistry * | parentRegistry | ) |
real constructor
| DtCeRandom::DtCeRandom | ( | const DtCeRandom & | orig, |
| DtReaderWriterRegistry * | parentRegistry = NULL |
||
| ) |
copy constructor
| virtual DtCeRandom::~DtCeRandom | ( | ) | [virtual] |
destructor
| DtCeRandom& DtCeRandom::operator= | ( | const DtCeRandom & | orig | ) |
assignment operator
| virtual DtSimCondExpr* DtCeRandom::clone | ( | DtReaderWriterRegistry * | parentRegistry = NULL | ) | [virtual] |
clone operator
Implements DtSimCondExpr.
| virtual int DtCeRandom::type | ( | ) | const [virtual] |
Returns DtCondExprRandomType (defined in condExprTypes.h).
Implements DtSimCondExpr.
| virtual DtReal DtCeRandom::probability | ( | ) | const [virtual] |
Get the fractional probability (between 0.0 and 1.0).
| virtual void DtCeRandom::setProbability | ( | DtReal | arg | ) | [virtual] |
Set the fractional probability (between 0.0 and 1.0).
| virtual DtString DtCeRandom::stringRep | ( | int | subExprIndex = DtSR_EXPR | ) | const [virtual] |
Get a readable string representation of this level of this expression.
The subExprIndex argument indicates which stringRep to get if this expression can have sub-expressions. Since a Random test has no sub-expressions, it only returns a string representation if passed an index of DtSimCondExpr::DtSR_EXPR.
See the documentation for DtSimCondExpr::stringRep for more information.
Note: although the probability value is a fractional number, for better readability the stringRep will report it as a percentage.
Implements DtSimCondExpr.
| virtual int DtCeRandom::netRepSize | ( | ) | const [virtual] |
returns the size of the full network representation padded to an 8-byte boundary.
Reimplemented from DtSimCondExpr.
| virtual bool DtCeRandom::setFromNet | ( | const char * | contentBuffer, |
| unsigned | contentSize | ||
| ) | [virtual] |
Fills in the expression from the network buffer.
Reimplemented from DtSimCondExpr.
| virtual bool DtCeRandom::setToNet | ( | ) | [virtual] |
Fills in the network buffer (created by base class conditional expression) with the conditional expression contents.
Reimplemented from DtSimCondExpr.
| static DtSimCondExpr* DtCeRandom::creator | ( | ) | [static] |
DtRwReal DtCeRandom::myProbability [protected] |