ALValue
Some NAOqi structure stores ALValue to be compatible with several data type:
Method | Description |
---|---|
ALValue::ALValue(TALValueBool value); | build ALValue from bool |
ALValue::ALValue(int value) | build ALValue from int |
ALValue::ALValue(TALValueDouble value); | build ALValue from double |
ALValue::ALValue(TALValueFloat value); | build ALValue from float |
ALValue(const char* value); | build ALValue from char * |
ALValue(const TAlValueBinaryData& rhs); | build ALValue from binary |
ALValue& SetBinary(const void* rhs, int nDataSizeInBytes ); | ALValue comparator (same type) |
bool operator==(ALValue const& other) const; | comparator operator |
enum Type getType() | get ALValue type (TypeInvalid, TypeArray, TypeBool, TypeInt, TypeFloat, TypeString, TypeBinary). Without assignment type is invalid |
bool isArray () | is type vector ? |
bool isBool () | is type bool ? |
bool isInt () | is type int ? |
bool isFloat () | is type float ? |
bool isString() | is type string ? |
bool isBinary() | is type binary ? |
int getSize() | Return the size for string, base64 and array values |
void arrayReserve(int size) | Specify the size the array values will use |
void arrayPush( const ALValue& pSrcToCopyNotOwned ); | Push a new value in the array |
std::string toString( Verbosity pnVerbosity = VerbosityMedium ) ; | Return a string describing this object, for debug purpose |
Note: | ALvalue can be converted to or created from these data types. For example, shared memory will store an array of ALValue's; interface functions allow to insert or get ALValue. |
---|