|
Colobot
|
Accessing a class field using dot operator - toto.x. More...
#include <src/CBot/CBotInstr/CBotFieldExpr.h>

Public Member Functions | |
| void | SetUniqNum (int num) |
| SetUniqNum. More... | |
| bool | ExecuteVar (CBotVar *&pVar, CBotCStack *&pile) override |
| ExecuteVar Find a field from the instance at compile. More... | |
| bool | ExecuteVar (CBotVar *&pVar, CBotStack *&pile, CBotToken *prevToken, bool bStep, bool bExtend) override |
| ExecuteVar. More... | |
| void | RestoreStateVar (CBotStack *&pj, bool bMain) override |
| RestoreStateVar. More... | |
Public Member Functions inherited from CBot::CBotInstr | |
| CBotInstr () | |
| Constructor. More... | |
| virtual | ~CBotInstr () |
| Destructor. More... | |
| virtual bool | Execute (CBotStack *&pj) |
| Execute. More... | |
| virtual bool | Execute (CBotStack *&pj, CBotVar *pVar) |
| Execute. More... | |
| virtual void | RestoreState (CBotStack *&pj, bool bMain) |
| RestoreState. More... | |
| virtual bool | CompCase (CBotStack *&pj, int val) |
| CompCase This routine is defined only for the subclass CBotCase this allows to make the call on all instructions CompCase to see if it's a case to the desired value.. More... | |
| void | SetToken (CBotToken *p) |
| SetToken Set the token corresponding to the instruction. More... | |
| int | GetTokenType () |
| GetTokenType Return the type of the token assicated with the instruction. More... | |
| CBotToken * | GetToken () |
| GetToken Return associated token. More... | |
| void | AddNext (CBotInstr *n) |
| AddNext Adds the statement following the other. More... | |
| CBotInstr * | GetNext () |
| GetNext Returns next statement. More... | |
| void | AddNext3 (CBotInstr *n) |
| AddNext3. More... | |
| CBotInstr * | GetNext3 () |
| GetNext3. More... | |
| void | AddNext3b (CBotInstr *n) |
| AddNext3b. More... | |
| CBotInstr * | GetNext3b () |
| GetNext3b. More... | |
| virtual bool | HasReturn () |
| Check a list of instructions for a return statement. More... | |
Static Public Member Functions | |
| static bool | CheckProtectionError (CBotCStack *pStack, CBotVar *pPrev, CBotVar *pVar, bool bCheckReadOnly=false) |
| Check if access to a variable is allowed or not depending on public/private/protected setting. More... | |
Static Public Member Functions inherited from CBot::CBotInstr | |
| static CBotInstr * | Compile (CBotToken *&p, CBotCStack *pStack) |
| Compile an instruction. More... | |
| static CBotInstr * | CompileArray (CBotToken *&p, CBotCStack *pStack, CBotTypResult type, bool first=true) |
| CompileArray. More... | |
| static void | IncLvl (std::string &label) |
| IncLvl Adds a level with a label. More... | |
| static void | IncLvl () |
| IncLvl Adds a level (switch statement). More... | |
| static void | DecLvl () |
| DecLvl Free a level. More... | |
| static bool | ChkLvl (const std::string &label, int type) |
| ChkLvl Control validity of break and continue. More... | |
Protected Member Functions | |
| virtual const std::string | GetDebugName () override |
| Returns the name of this class. More... | |
| virtual std::string | GetDebugData () override |
| Returns additional data associated with this instruction for debugging purposes. More... | |
Protected Member Functions inherited from CBot::CBotInstr | |
| virtual std::map< std::string, CBotInstr * > | GetDebugLinks () |
Friends | |
| class | CBotExpression |
Additional Inherited Members | |
Protected Attributes inherited from CBot::CBotInstr | |
| CBotToken | m_token |
| Keeps the token. More... | |
| CBotInstr * | m_next |
| Linked command. More... | |
| CBotInstr * | m_next2b |
| Second list definition chain. More... | |
| CBotInstr * | m_next3 |
| Third list for indices and fields. More... | |
| CBotInstr * | m_next3b |
| Necessary for reporting tables. More... | |
Static Protected Attributes inherited from CBot::CBotInstr | |
| static int | m_LoopLvl = 0 |
| Counter of nested loops, to determine the break and continue valid. More... | |
Accessing a class field using dot operator - toto.x.
| void CBot::CBotFieldExpr::SetUniqNum | ( | int | num | ) |
SetUniqNum.
| num |
|
overridevirtual |
ExecuteVar Find a field from the instance at compile.
| pVar | |
| pile |
Reimplemented from CBot::CBotInstr.
|
overridevirtual |
ExecuteVar.
| pVar | |
| pile | |
| prevToken | |
| bStep | |
| bExtend |
Reimplemented from CBot::CBotInstr.
|
overridevirtual |
|
static |
Check if access to a variable is allowed or not depending on public/private/protected setting.
If this function returns true, the caller is responsible for failing the compilation with CBotErrPrivate error. This function doesn't set the error flag itself.
| pStack | Current compilation stack frame |
| pPrev | Class instance which variable to check is part of, or nullptr when compiler inserts 'this.' before |
| pVar | Variable to check |
| bCheckReadOnly | True for operations that would modify the value of the variable |
|
inlineoverrideprotectedvirtual |
|
overrideprotectedvirtual |
Returns additional data associated with this instruction for debugging purposes.
Reimplemented from CBot::CBotInstr.
1.8.13