|
| CBotVarInt (const CBotToken &name) |
|
void | SetValInt (int val, const std::string &s="") override |
| Set value as an integer.
|
|
std::string | GetValString () const override |
| Get value as string.
|
|
void | Copy (CBotVar *pSrc, bool bName=true) override |
| Copy from another variable.
|
|
void | Neg () override |
| -this
|
|
void | Inc () override |
| ++this
|
|
void | Dec () override |
| –this
|
|
void | Not () override |
| !this or ~this
|
|
void | SR (CBotVar *left, CBotVar *right) override |
| left >>> right
|
|
bool | Save0State (std::ostream &ostr) override |
| Save common variable header (name, type, etc.)
|
|
bool | Save1State (std::ostream &ostr) override |
| Save variable data.
|
|
| CBotVarInteger (const CBotToken &name) |
|
CBotError | Modulo (CBotVar *left, CBotVar *right) override |
| Modulo (remainder of division)
|
|
void | XOr (CBotVar *left, CBotVar *right) override |
| left ^ right (also for boolean!)
|
|
void | And (CBotVar *left, CBotVar *right) override |
| left && right or left & right
|
|
void | Or (CBotVar *left, CBotVar *right) override |
| left || right or left | right
|
|
void | SL (CBotVar *left, CBotVar *right) override |
| left << right
|
|
void | ASR (CBotVar *left, CBotVar *right) override |
| left >> right
|
|
void | Not () override |
| !this or ~this
|
|
| CBotVarNumber (const CBotToken &name) |
|
void | Mul (CBotVar *left, CBotVar *right) override |
| Multiplication.
|
|
void | Power (CBotVar *left, CBotVar *right) override |
| Power.
|
|
CBotError | Div (CBotVar *left, CBotVar *right) override |
| Division.
|
|
CBotError | Modulo (CBotVar *left, CBotVar *right) override |
| Modulo (remainder of division)
|
|
void | Add (CBotVar *left, CBotVar *right) override |
| Addition.
|
|
void | Sub (CBotVar *left, CBotVar *right) override |
| Subtraction.
|
|
void | Neg () override |
| -this
|
|
void | Inc () override |
| ++this
|
|
void | Dec () override |
| –this
|
|
bool | Lo (CBotVar *left, CBotVar *right) override |
| left < right
|
|
bool | Hi (CBotVar *left, CBotVar *right) override |
| left > right
|
|
bool | Ls (CBotVar *left, CBotVar *right) override |
| left <= right
|
|
bool | Hs (CBotVar *left, CBotVar *right) override |
| left >= right
|
|
| CBotVarNumberBase (const CBotToken &name) |
|
void | SetValByte (signed char val) override |
| Set the value.
|
|
void | SetValShort (short val) override |
| Set the value.
|
|
void | SetValChar (uint32_t val) override |
| Set the value.
|
|
void | SetValInt (int val, const std::string &s="") override |
| Set value as an integer.
|
|
void | SetValLong (long val) override |
| Set the value.
|
|
void | SetValFloat (float val) override |
| Set value as float.
|
|
void | SetValDouble (double val) override |
| Set the value.
|
|
signed char | GetValByte () const override |
| Set the value.
|
|
short | GetValShort () const override |
| Set the value.
|
|
uint32_t | GetValChar () const override |
| Set the value.
|
|
int | GetValInt () const override |
| Get value as integer.
|
|
long | GetValLong () const override |
| Set the value.
|
|
float | GetValFloat () const override |
| Get value as float.
|
|
double | GetValDouble () const override |
| Set the value.
|
|
bool | Eq (CBotVar *left, CBotVar *right) override |
| left == right
|
|
bool | Ne (CBotVar *left, CBotVar *right) override |
| left != right
|
|
| CBotVarValue (const CBotToken &name) |
| Constructor. Do not call directly, use CBotVar::Create()
|
|
void | Copy (CBotVar *pSrc, bool bName=true) override |
| Copy from another variable.
|
|
void | SetValString (const std::string &val) override |
| Set value as string.
|
|
std::string | GetValString () const override |
| Get value as string.
|
|
const std::string & | GetName () |
| Returns the name of the variable.
|
|
void | SetName (const std::string &name) |
| SetName Changes the name of the variable.
|
|
CBotToken * | GetToken () |
| Returns the CBotToken this variable is associated with.
|
|
CBotType | GetType (GetTypeMode mode=GetTypeMode::NORMAL) const |
| GetType Returns the base type of the variable (CBotType)
|
|
CBotTypResult | GetTypResult (GetTypeMode mode=GetTypeMode::NORMAL) |
| Returns the complete type of the variable (CBotTypResult)
|
|
void | SetType (CBotTypResult &type) |
| Change type of this variable.
|
|
virtual void | SetClass (CBotClass *pClass) |
| Set class this variable is instance of.
|
|
virtual CBotClass * | GetClass () |
| Return class this variable is instance of.
|
|
void | SetInit (InitType initType) |
| Changes variable init status.
|
|
InitType | GetInit () const |
| Returns the current init state of the variable.
|
|
bool | IsUndefined () const |
| Checks if the variable is currently "undefined".
|
|
bool | IsDefined () const |
| Checks if the variable is currently "defined".
|
|
void | SetStatic (bool bStatic) |
| Marks the variable as "static".
|
|
bool | IsStatic () |
| Checks if the variable is static.
|
|
void | SetPrivate (ProtectionLevel mPrivate) |
| Sets variable protection level.
|
|
bool | IsPrivate (ProtectionLevel level=ProtectionLevel::Protected) |
| Checks if the variable is accessible at the given protection level.
|
|
ProtectionLevel | GetPrivate () |
| Get variable protection level.
|
|
bool | IsElemOfClass (const std::string &name) |
| Check if a variable belongs to a class with a given name.
|
|
virtual void | ConstructorSet () |
| Called after constructor has been called.
|
|
CBotVar * | GetStaticVar () |
| If this is a static class variable, return the static var from the class.
|
|
virtual void | Update (void *pUser) |
| Call the class update function.
|
|
void | SetUniqNum (long n) |
| Set unique identifier of this variable Note: For classes, this is unique within the class only - see CBotClass:AddItem.
|
|
long | GetUniqNum () |
| Return unique identifier of this variable Note: For classes, this is unique within the class only - see CBotClass:AddItem.
|
|
| CBotVar () |
| Constructor. Do not call directly, use CBotVar::Create()
|
|
| CBotVar (const CBotToken &name) |
| Constructor. Do not call directly, use CBotVar::Create()
|
|
virtual | ~CBotVar () |
| Destructor. Do not call directly, use CBotVar::Destroy()
|
|
virtual void | SetIdent (long UniqId) |
| Associates an unique identifier to class instance.
|
|
void | SetUserPtr (void *pUser) |
| Set a custom pointer associated with this variable.
|
|
void * | GetUserPtr () |
| Returns the custom pointer associated with this variable.
|
|
virtual CBotVar * | GetItem (const std::string &name) |
| Returns class member by name.
|
|
virtual CBotVar * | GetItemRef (int nIdent) |
| Returns class member by unique ID.
|
|
virtual CBotVar * | GetItem (int index, bool grow=false) |
| Returns element of the array by index.
|
|
virtual CBotVar * | GetItemList () |
| Return all elements of this variable as a linked list. Works for both classes and arrays.
|
|
| operator bool () |
| Set the value.
|
|
| operator signed char () |
| Set the value.
|
|
| operator short () |
| Set the value.
|
|
| operator uint32_t () |
| Set the value.
|
|
| operator int () |
| Set the value.
|
|
| operator long () |
| Set the value.
|
|
| operator float () |
| Set the value.
|
|
| operator double () |
| Set the value.
|
|
| operator std::string () |
| Set the value.
|
|
void | operator= (const CBotVar &var) |
| Set the value.
|
|
void | operator= (signed char x) |
| Set the value.
|
|
void | operator= (short x) |
| Set the value.
|
|
void | operator= (uint32_t x) |
| Set the value.
|
|
void | operator= (int x) |
| Set the value.
|
|
void | operator= (long x) |
| Set the value.
|
|
void | operator= (float x) |
| Set the value.
|
|
void | operator= (double x) |
| Set the value.
|
|
void | operator= (const std::string &x) |
| Set the value.
|
|
void | SetVal (CBotVar *var) |
| Set the value.
|
|
virtual void | SetPointer (CBotVar *p) |
| Set value for pointer types.
|
|
virtual CBotVarClass * | GetPointer () |
| Get value for pointer types.
|
|
virtual | ~CBotLinkedList () |
| Destructor. Be careful, destroys the whole linked list!
|
|
CBotVar * | GetNext () |
| Returns the next variable in the linked list.
|
|
void | AddNext (CBotVar *elem) |
| Appends a new element at the end of the linked list.
|
|