|
Colobot
|
Classes | |
| class | CBotClass |
| A CBot class definition. More... | |
| class | CBotCStack |
| The CBotCStack class Management of the stack of compilation. More... | |
| class | CBotDebug |
| Various utilities used for debugging. More... | |
| class | CBotDefParam |
| The CBotDefParam class A list of parameters. More... | |
| class | CBotExternalCall |
| Interface for external CBot calls. More... | |
| class | CBotExternalCallDefault |
| Default implementation of CBot external call, using compilation and runtime functions. More... | |
| class | CBotExternalCallClass |
| Implementation of CBot external call for class methods, using compilation and runtime functions. More... | |
| class | CBotExternalCallList |
| Class for mangaging CBot external calls. More... | |
| class | CBotBlock |
| An instruction block - { ... }. More... | |
| class | CBotBoolExpr |
| An expression that results in a boolean value. More... | |
| class | CBotBreak |
| Instructions "break" and "continue" (with an optional label) More... | |
| class | CBotCase |
| Instruction "case", part of "switch" structure. More... | |
| class | CBotCatch |
| Instruction "catch", part of "try" structure. More... | |
| class | CBotCondition |
| A condition - boolean expression enclosed in brackets - (condition) More... | |
| class | CBotDefArray |
| Definition of an array (of any type) More... | |
| class | CBotDefBoolean |
| Definition of boolean variable - bool a, b = false. More... | |
| class | CBotDefClass |
| Definition of class instance variable. More... | |
| class | CBotDefFloat |
| Definition of a float variable - float a, b = 12.4. More... | |
| class | CBotDefInt |
| Definition of an integer variable - int a, b = 12. More... | |
| class | CBotDefString |
| Definition of a string variable - string a, b = "text";. More... | |
| class | CBotDo |
| do {...} while (...) structure More... | |
| class | CBotEmpty |
| Constant -1 of type int. More... | |
| class | CBotExpression |
| An arithmetic expression, with or without assignment. More... | |
| class | CBotExprLitBool |
| A boolean literal - true/false. More... | |
| class | CBotExprLitChar |
| A character literal. More... | |
| class | CBotExprLitNan |
| The "nan" constant. More... | |
| class | CBotExprLitNull |
| The "null" constant. More... | |
| class | CBotExprLitNum |
| A number literal - 5, 1, 2.5, 3.75, etc. or a predefined numerical constant (see CBotToken::DefineNum()) More... | |
| class | CBotExprLitString |
| A string literal - "Some text". More... | |
| class | CBotExprRetVar |
| Access a member/element of the variable on the stack. More... | |
| class | CBotExprUnaire |
| Unary expression - +a, -a, !a, ~a, not a. More... | |
| class | CBotExprVar |
| Expression representing a variable name. More... | |
| class | CBotFieldExpr |
| Accessing a class field using dot operator - toto.x. More... | |
| class | CBotFor |
| Instruction for (init; test; incr) { ... }. More... | |
| class | CBotFunction |
| A function declaration in the code. More... | |
| class | CBotIf |
| Instruction if (condition) { ... } else { ... }. More... | |
| class | CBotIndexExpr |
| Instruction accessing an array element - array[x]. More... | |
| class | CBotInstr |
| Class for one CBot instruction. More... | |
| class | CBotInstrCall |
| A call to a function - func() More... | |
| class | CBotInstrMethode |
| A call to class method - var.func() More... | |
| class | CBotLeftExpr |
| Compilation of left side of an assignment. More... | |
| class | CBotLeftExprVar |
| A variable on the left side of an assignment. More... | |
| class | CBotListArray |
| Compilation of assignment of an array - {{1, 2, 3}, {3, 2, 1}}. More... | |
| class | CBotListExpression |
| Compile a comma-separated list of expressions or variable definitions. More... | |
| class | CBotListInstr |
| A list of instructions separated by semicolons - ...; ...; ...; ...;. More... | |
| class | CBotLogicExpr |
| An "inline if" operator - condition ? if_true : if_false. More... | |
| class | CBotNew |
| Creation of a class instance - "new" operator - new SomeClass() More... | |
| class | CBotParExpr |
| An expression. More... | |
| class | CBotPostIncExpr |
| Post increment/decrement. More... | |
| class | CBotPreIncExpr |
| Pre increment/decrement. More... | |
| class | CBotRepeat |
| The "repeat" loop - repeat (times) { ... }. More... | |
| class | CBotReturn |
| The "return" instruction. More... | |
| class | CBotSwitch |
| The switch structure. More... | |
| class | CBotThrow |
| The "throw" instruction. More... | |
| class | CBotTry |
| The "try" structure. More... | |
| class | CBotTwoOpExpr |
| Any expression with two operands. More... | |
| class | CBotWhile |
| The "while" loop - while (condition) { ... }. More... | |
| class | CBotProgram |
| Class that manages a CBot program. This is the main entry point into the CBot engine. More... | |
| class | CBotStack |
| The execution stack. More... | |
| class | CBotToken |
| Class representing one token of a program. More... | |
| class | CBotTypResult |
| Class to define the complete type of a variable. More... | |
| class | CBotLinkedList |
| class | CBotDoublyLinkedList |
| class | CBotVar |
| A CBot variable. More... | |
| class | CBotVarArray |
| CBotVar subclass for managing arrays (CBotTypArrayPointer) More... | |
| class | CBotVarBoolean |
| CBotVar subclass for managing boolean values (CBotTypBoolean) More... | |
| class | CBotVarByte |
| CBotVar subclass for managing 1-byte integer values (CBotTypByte) More... | |
| class | CBotVarChar |
| CBotVar subclass for managing 32-bit Unicode values (CBotTypChar) More... | |
| class | CBotVarClass |
| CBotVar subclass for managing classes (CBotTypClass, CBotTypIntrinsic) More... | |
| class | CBotVarDouble |
| CBotVar subclass for managing double values (CBotTypDouble) More... | |
| class | CBotVarFloat |
| CBotVar subclass for managing float values (CBotTypFloat) More... | |
| class | CBotVarInt |
| CBotVar subclass for managing integer values (CBotTypInt) More... | |
| class | CBotVarLong |
| CBotVar subclass for managing long integer values (CBotTypLong) More... | |
| class | CBotVarPointer |
| CBotVar subclass for managing pointers to classes (CBotTypPointer) More... | |
| class | CBotVarShort |
| CBotVar subclass for managing short integer values (CBotTypShort) More... | |
| class | CBotVarString |
| CBotVar subclass for managing string values (CBotTypString) More... | |
| class | CBotVarValue |
| A variable holding a simple value (bool, int, float, string) More... | |
| class | CBotVarNumberBase |
| A number based variable (bool, int, float) More... | |
| class | CBotVarNumber |
| A number variable (int, float) More... | |
| class | CBotVarInteger |
| An integer variable (byte, short, char, int, long) More... | |
| class | CBotFile |
| class | CBotFileAccessHandler |
Enumerations | |
| enum | CBotType { CBotTypVoid = 0 , CBotTypByte = 1 , CBotTypShort = 2 , CBotTypChar = 3 , CBotTypInt = 4 , CBotTypLong = 5 , CBotTypFloat = 6 , CBotTypDouble = 7 , CBotTypBoolean = 8 , CBotTypString = 9 , CBotTypArrayPointer = 10 , CBotTypArrayBody = 11 , CBotTypPointer = 12 , CBotTypNullPointer = 13 , CBotTypClass = 15 , CBotTypIntrinsic = 16 , CBotTypMAX = 20 } |
| Defines known types. This types are modeled on Java types. More... | |
| enum | CBotGet { GetPosExtern = 1 , GetPosNom = 2 , GetPosParam = 3 , GetPosBloc = 4 } |
| Different modes for CBotProgram::GetPosition. More... | |
| enum | TokenId { TokenKeyWord = 2000 , ID_IF = 2000 , ID_ELSE , ID_WHILE , ID_DO , ID_FOR , ID_BREAK , ID_CONTINUE , ID_SWITCH , ID_CASE , ID_DEFAULT , ID_TRY , ID_THROW , ID_CATCH , ID_FINALLY , ID_TXT_AND , ID_TXT_OR , ID_TXT_NOT , ID_RETURN , ID_CLASS , ID_EXTENDS , ID_SYNCHO , ID_NEW , ID_PUBLIC , ID_EXTERN , ID_STATIC , ID_PROTECTED , ID_PRIVATE , ID_REPEAT , ID_INT , ID_FLOAT , ID_BOOLEAN , ID_STRING , ID_VOID , ID_BOOL , ID_BYTE , ID_SHORT , ID_CHAR , ID_LONG , ID_DOUBLE , TokenKeyVal = 2200 , ID_TRUE = 2200 , ID_FALSE , ID_NULL , ID_NAN , TokenKeyOp = 2300 , ID_OPENPAR = 2300 , ID_CLOSEPAR , ID_OPBLK , ID_CLBLK , ID_SEP , ID_COMMA , ID_DOTS , ID_DOT , ID_OPBRK , ID_CLBRK , ID_DBLDOTS , ID_LOGIC , ID_ADD , ID_SUB , ID_MUL , ID_DIV , ID_ASS , ID_ASSADD , ID_ASSSUB , ID_ASSMUL , ID_ASSDIV , ID_ASSOR , ID_ASSAND , ID_ASSXOR , ID_ASSSL , ID_ASSSR , ID_ASSASR , ID_SL , ID_SR , ID_ASR , ID_INC , ID_DEC , ID_LO , ID_HI , ID_LS , ID_HS , ID_EQ , ID_NE , ID_AND , ID_XOR , ID_OR , ID_LOG_AND , ID_LOG_OR , ID_LOG_NOT , ID_NOT , ID_MODULO , ID_POWER , ID_ASSMODULO , TX_UNDEF = 4000 , TX_NAN } |
| This enum contains possible token types. More... | |
| enum | TokenType { TokenTypNone = 0 , TokenTypKeyWord = 1 , TokenTypNum = 2 , TokenTypString = 3 , TokenTypVar = 4 , TokenTypDef = 5 , TokenTypChar = 6 } |
| Types of tokens. More... | |
| enum | CBotError : int { CBotNoErr = 0 , CBotErrOpenPar = 5000 , CBotErrClosePar = 5001 , CBotErrNotBoolean = 5002 , CBotErrUndefVar = 5003 , CBotErrBadLeft = 5004 , CBotErrNoTerminator = 5005 , CBotErrCaseOut = 5006 , CBotErrNoEnd = 5007 , CBotErrCloseBlock = 5008 , CBotErrElseWhitoutIf = 5009 , CBotErrOpenBlock = 5010 , CBotErrBadType1 = 5011 , CBotErrRedefVar = 5012 , CBotErrBadType2 = 5013 , CBotErrUndefCall = 5014 , CBotErrNoDoubleDots = 5015 , CBotErrNoWhile = 5016 , CBotErrBreakOutside = 5017 , CBotErrUndefLabel = 5019 , CBotErrLabel = 5018 , CBotErrNoCase = 5020 , CBotErrBadNum = 5021 , CBotErrVoid = 5022 , CBotErrNoType = 5023 , CBotErrNoVar = 5024 , CBotErrNoFunc = 5025 , CBotErrOverParam = 5026 , CBotErrRedefFunc = 5027 , CBotErrLowParam = 5028 , CBotErrBadParam = 5029 , CBotErrNbParam = 5030 , CBotErrUndefItem = 5031 , CBotErrUndefClass = 5032 , CBotErrNoConstruct = 5033 , CBotErrRedefClass = 5034 , CBotErrCloseIndex = 5035 , CBotErrReserved = 5036 , CBotErrBadNew = 5037 , CBotErrOpenIndex = 5038 , CBotErrBadString = 5039 , CBotErrBadIndex = 5040 , CBotErrPrivate = 5041 , CBotErrNoPublic = 5042 , CBotErrNoExpression = 5043 , CBotErrAmbiguousCall = 5044 , CBotErrFuncNotVoid = 5045 , CBotErrNoClassName = 5046 , CBotErrNoReturn = 5047 , CBotErrDefaultValue = 5048 , CBotErrEndQuote = 5049 , CBotErrBadEscape = 5050 , CBotErrOctalRange = 5051 , CBotErrHexDigits = 5052 , CBotErrHexRange = 5053 , CBotErrUnicodeName = 5054 , CBotErrCharEmpty = 5055 , CBotErrRedefCase = 5056 , CBotErrZeroDiv = 6000 , CBotErrNotInit = 6001 , CBotErrBadThrow = 6002 , CBotErrNoRetVal = 6003 , CBotErrNoRun = 6004 , CBotErrUndefFunc = 6005 , CBotErrNotClass = 6006 , CBotErrNull = 6007 , CBotErrNan = 6008 , CBotErrOutArray = 6009 , CBotErrStackOver = 6010 , CBotErrDeletedPtr = 6011 , CBotErrFileOpen = 6012 , CBotErrNotOpen = 6013 , CBotErrRead = 6014 , CBotErrWrite = 6015 , CBotErrMAX } |
| This enum contains possible CBot error values. Values in range 5000-5999 are compile errors, 6000-6999 are runtime errors. More... | |
Functions | |
| bool | WriteWord (std::ostream &ostr, unsigned short w) |
| WriteWord. More... | |
| bool | ReadWord (std::istream &istr, unsigned short &w) |
| ReadWord. More... | |
| bool | WriteByte (std::ostream &ostr, char c) |
| WriteByte. More... | |
| bool | ReadByte (std::istream &istr, char &c) |
| ReadByte. More... | |
| bool | WriteShort (std::ostream &ostr, short s) |
| WriteShort. More... | |
| bool | ReadShort (std::istream &istr, short &s) |
| ReadShort. More... | |
| bool | WriteUInt32 (std::ostream &ostr, uint32_t i) |
| WriteUInt32. More... | |
| bool | ReadUInt32 (std::istream &istr, uint32_t &i) |
| ReadUInt32. More... | |
| bool | WriteInt (std::ostream &ostr, int i) |
| WriteInt. More... | |
| bool | ReadInt (std::istream &istr, int &i) |
| ReadInt. More... | |
| bool | WriteLong (std::ostream &ostr, long l, unsigned padTo=0) |
| WriteLong. More... | |
| bool | ReadLong (std::istream &istr, long &l) |
| ReadLong. More... | |
| bool | WriteFloat (std::ostream &ostr, float f) |
| WriteFloat. More... | |
| bool | ReadFloat (std::istream &istr, float &f) |
| ReadFloat. More... | |
| bool | WriteDouble (std::ostream &ostr, double d) |
| WriteDouble. More... | |
| bool | ReadDouble (std::istream &istr, double &d) |
| ReadDouble. More... | |
| bool | WriteString (std::ostream &ostr, const std::string &s) |
| WriteString. More... | |
| bool | ReadString (std::istream &istr, std::string &s) |
| ReadString. More... | |
| bool | WriteType (std::ostream &ostr, const CBotTypResult &type) |
| WriteType. More... | |
| bool | ReadType (std::istream &istr, CBotTypResult &type) |
| ReadType. More... | |
| bool | WriteStream (std::ostream &ostr, std::istream &istr) |
| WriteStream. More... | |
| bool | ReadStream (std::istream &istr, std::ostream &ostr) |
| ReadStream. More... | |
| bool | SaveVars (std::ostream &ostr, CBotVar *pVar) |
| Save a linked list if variables. More... | |
| CBotInstr * | CompileExprLitNum (CBotToken *&p, CBotCStack *pStack) |
| CBotInstr * | CompileSizeOf (CBotToken *&p, CBotCStack *pStack) |
| CBotInstr * | CompileParams (CBotToken *&p, CBotCStack *pStack, CBotVar **ppVars) |
| CompileParams Compile a list of parameters. More... | |
| bool | TypeCompatible (CBotTypResult &type1, CBotTypResult &type2, int op=0) |
| TypeCompatible Check if two results are consistent to make an operation. TypeCompatible is used in two ways: For non-assignment operations: see CBotTwoOpExpr::Compile TypeCompatible( leftType, rightType, opType ) More... | |
| bool | TypesCompatibles (const CBotTypResult &type1, const CBotTypResult &type2) |
| TypesCompatibles Check if two variables are compatible for parameter passing. More... | |
| const std::string & | LoadString (TokenId id) |
| Maps given ID to its string equivalent. More... | |
| bool | IsOfType (CBotToken *&p, int type1, int type2=-1) |
| Check if this token is of specified type. More... | |
| bool | IsOfTypeList (CBotToken *&p, int type1,...) |
| Check if this token is of specified type. More... | |
| CBotVar * | MakeListVars (CBotVar **ppVars, bool bSetVal=false) |
| MakeListVars Transforms the array of pointers to variables in a chained list of variables. More... | |
| CBotTypResult | TypeParam (CBotToken *&p, CBotCStack *pile) |
| TypeParam. More... | |
| CBotTypResult | ArrayType (CBotToken *&p, CBotCStack *pile, CBotTypResult type) |
| ArrayType. More... | |
| long | GetNumInt (const std::string &str) |
| GetNumInt Converts a string into integer may be of the form 0xabc123. More... | |
| double | GetNumFloat (const std::string &str) |
| GetNumFloat Converts a string into a float number. More... | |
| bool | CharInList (const char c, const char *list) |
| Search a null-terminated string for a char value. More... | |
| std::string | CodePointToUTF8 (unsigned int val) |
| Converts a Unicode code point to UTF-8 encoded character. More... | |
| CBotTypResult | cNull (CBotVar *&var, void *user) |
| CBotTypResult | cOneFloat (CBotVar *&var, void *user) |
| CBotTypResult | cTwoFloat (CBotVar *&var, void *user) |
| CBotTypResult | cString (CBotVar *&var, void *user) |
| CBotTypResult | cStringString (CBotVar *&var, void *user) |
| CBotTypResult | cOneInt (CBotVar *&var, void *user) |
| CBotTypResult | cOneIntReturnBool (CBotVar *&var, void *user) |
| CBotTypResult | cStrStr (CBotVar *&var, void *user) |
| CBotTypResult | cIntStrStr (CBotVar *&var, void *user) |
| CBotTypResult | cFloatStr (CBotVar *&var, void *user) |
| CBotTypResult | cStrStrIntInt (CBotVar *&var, void *user) |
| CBotTypResult | cStrStrInt (CBotVar *&var, void *user) |
| CBotTypResult | cIntStr (CBotVar *&var, void *user) |
| void | InitFileFunctions () |
| void | SetFileAccessHandler (std::unique_ptr< CBotFileAccessHandler > fileHandler) |
| void | InitMathFunctions () |
| void | InitStringFunctions () |
Variables | |
| const int | DEFAULT_TIMER = 100 |
CBot engine.
| enum CBot::CBotType |
Defines known types. This types are modeled on Java types.
Do not change the order of elements.
| Enumerator | |
|---|---|
| CBotTypVoid | void |
| CBotTypByte | byte |
| CBotTypShort | short |
| CBotTypChar | char |
| CBotTypInt | int |
| CBotTypLong | long |
| CBotTypFloat | float |
| CBotTypDouble | double |
| CBotTypBoolean | bool |
| CBotTypString | string |
| CBotTypArrayPointer | Pointer to an array (CBotTypArrayBody) |
| CBotTypArrayBody | Array. |
| CBotTypPointer | Pointer to a class (CBotTypClass or CBotTypIntrinsic) |
| CBotTypNullPointer | Null pointer. |
| CBotTypClass | Class instance. |
| CBotTypIntrinsic | Intrinsic class instance. |
| enum CBot::CBotGet |
Different modes for CBotProgram::GetPosition.
| enum CBot::TokenId |
| enum CBot::TokenType |
| enum CBot::CBotError : int |
This enum contains possible CBot error values. Values in range 5000-5999 are compile errors, 6000-6999 are runtime errors.
Note that other values may be returned, for example exceptions for user-defined builtin functions, or "throw" instruction
Also note that these can't overlap with CBotType, see CBotTypResult for explanation
| bool CBot::WriteWord | ( | std::ostream & | ostr, |
| unsigned short | w | ||
| ) |
WriteWord.
| ostr | Output stream |
| w |
| bool CBot::ReadWord | ( | std::istream & | istr, |
| unsigned short & | w | ||
| ) |
ReadWord.
| istr | Input stream | |
| [out] | w |
| bool CBot::WriteByte | ( | std::ostream & | ostr, |
| char | c | ||
| ) |
WriteByte.
| ostr | Output stream |
| c |
| bool CBot::ReadByte | ( | std::istream & | istr, |
| char & | c | ||
| ) |
ReadByte.
| istr | Input stream | |
| [out] | c |
| bool CBot::WriteShort | ( | std::ostream & | ostr, |
| short | s | ||
| ) |
WriteShort.
| ostr | Output stream |
| s |
| bool CBot::ReadShort | ( | std::istream & | istr, |
| short & | s | ||
| ) |
ReadShort.
| istr | Input stream | |
| [out] | s |
| bool CBot::WriteUInt32 | ( | std::ostream & | ostr, |
| uint32_t | i | ||
| ) |
WriteUInt32.
| ostr | Output stream |
| i |
| bool CBot::ReadUInt32 | ( | std::istream & | istr, |
| uint32_t & | i | ||
| ) |
ReadUInt32.
| istr | Input stream | |
| [out] | i |
| bool CBot::WriteInt | ( | std::ostream & | ostr, |
| int | i | ||
| ) |
WriteInt.
| ostr | Output stream |
| i |
| bool CBot::ReadInt | ( | std::istream & | istr, |
| int & | i | ||
| ) |
ReadInt.
| istr | Input stream | |
| [out] | i |
| bool CBot::WriteLong | ( | std::ostream & | ostr, |
| long | l, | ||
| unsigned | padTo = 0 |
||
| ) |
WriteLong.
| ostr | Output stream |
| l | |
| padTo | minimum number of bytes to write |
| bool CBot::ReadLong | ( | std::istream & | istr, |
| long & | l | ||
| ) |
ReadLong.
| istr | Input stream | |
| [out] | l |
| bool CBot::WriteFloat | ( | std::ostream & | ostr, |
| float | f | ||
| ) |
WriteFloat.
| ostr | Output stream |
| f |
| bool CBot::ReadFloat | ( | std::istream & | istr, |
| float & | f | ||
| ) |
ReadFloat.
| istr | Input stream | |
| [out] | f |
| bool CBot::WriteDouble | ( | std::ostream & | ostr, |
| double | d | ||
| ) |
WriteDouble.
| ostr | Output stream |
| d |
| bool CBot::ReadDouble | ( | std::istream & | istr, |
| double & | d | ||
| ) |
ReadDouble.
| istr | Input stream | |
| [out] | d |
| bool CBot::WriteString | ( | std::ostream & | ostr, |
| const std::string & | s | ||
| ) |
WriteString.
| ostr | Output stream |
| s |
| bool CBot::ReadString | ( | std::istream & | istr, |
| std::string & | s | ||
| ) |
ReadString.
| istr | Input stream | |
| [out] | s |
| bool CBot::WriteType | ( | std::ostream & | ostr, |
| const CBotTypResult & | type | ||
| ) |
WriteType.
| ostr | Output stream |
| type |
| bool CBot::ReadType | ( | std::istream & | istr, |
| CBotTypResult & | type | ||
| ) |
ReadType.
| istr | Input stream | |
| [out] | type |
| bool CBot::WriteStream | ( | std::ostream & | ostr, |
| std::istream & | istr | ||
| ) |
WriteStream.
| ostr | Output stream |
| istr | Input stream |
| bool CBot::ReadStream | ( | std::istream & | istr, |
| std::ostream & | ostr | ||
| ) |
ReadStream.
| istr | Input stream |
| ostr | Output stream |
| bool CBot::SaveVars | ( | std::ostream & | ostr, |
| CBotVar * | pVar | ||
| ) |
Save a linked list if variables.
| ostr | Output stream |
| pVar | First variable in the list |
| CBotInstr * CBot::CompileParams | ( | CBotToken *& | p, |
| CBotCStack * | pStack, | ||
| CBotVar ** | ppVars | ||
| ) |
CompileParams Compile a list of parameters.
| p | |
| pStack | |
| ppVars |
| bool CBot::TypeCompatible | ( | CBotTypResult & | type1, |
| CBotTypResult & | type2, | ||
| int | op = 0 |
||
| ) |
TypeCompatible Check if two results are consistent to make an operation. TypeCompatible is used in two ways: For non-assignment operations: see CBotTwoOpExpr::Compile TypeCompatible( leftType, rightType, opType )
For assignment or compound assignment operations (it's reversed): see CBotReturn::Compile & CBotExpression::Compile TypeCompatible( valueType, varType, opType )
| type1 | |
| type2 | |
| op |
| bool CBot::TypesCompatibles | ( | const CBotTypResult & | type1, |
| const CBotTypResult & | type2 | ||
| ) |
TypesCompatibles Check if two variables are compatible for parameter passing.
| type1 | |
| type2 |
| const std::string & CBot::LoadString | ( | TokenId | id | ) |
Maps given ID to its string equivalent.
| id | Token type identifier |
| bool CBot::IsOfType | ( | CBotToken *& | p, |
| int | type1, | ||
| int | type2 = -1 |
||
| ) |
Check if this token is of specified type.
| p | The token to compare |
| type1 | First token type to comapre to the token |
| type2 | Second token type to comapre to the token |
| bool CBot::IsOfTypeList | ( | CBotToken *& | p, |
| int | type1, | ||
| ... | |||
| ) |
Check if this token is of specified type.
| p | The token to compare |
| type1 | The list of token types to comapre to the token, 0-terminated |
MakeListVars Transforms the array of pointers to variables in a chained list of variables.
| ppVars | |
| bSetVal |
| CBotTypResult CBot::TypeParam | ( | CBotToken *& | p, |
| CBotCStack * | pile | ||
| ) |
TypeParam.
| p | |
| pile |
| CBotTypResult CBot::ArrayType | ( | CBotToken *& | p, |
| CBotCStack * | pile, | ||
| CBotTypResult | type | ||
| ) |
ArrayType.
| p | |
| pile | |
| type |
| long CBot::GetNumInt | ( | const std::string & | str | ) |
GetNumInt Converts a string into integer may be of the form 0xabc123.
| str |
| double CBot::GetNumFloat | ( | const std::string & | str | ) |
GetNumFloat Converts a string into a float number.
| str |
| bool CBot::CharInList | ( | const char | c, |
| const char * | list | ||
| ) |
Search a null-terminated string for a char value.
| c | The char to find. |
| list | The string to search. |
| std::string CBot::CodePointToUTF8 | ( | unsigned int | val | ) |
Converts a Unicode code point to UTF-8 encoded character.
| val | Code point value. |