dictionaryValue class by value built-in
Value of any type stored in a dictionary
Returned by the dictionary index operator. It can hold a number, a boolean, a copy of an object or a handle. Read it back by assigning it to a variable of the wanted type or with an explicit cast, e.g. int x = int(dict["count"]); or @obj = cast<Foo>(dict["obj"]);. If the stored value can't be converted to the requested type, the result is 0 or null.
Constructors
- dictionaryValue()
- Creates an empty value
Operators
- dictionaryValue& opAssign(const dictionaryValue&in) =
- Copies the content of another value
- dictionaryValue& opAssign(const ?&in) =
- Stores a value of any type
- dictionaryValue& opAssign(double) =
- Stores a floating-point number
- dictionaryValue& opAssign(int64) =
- Stores an integer
- void opCast(?&out) cast
- Retrieves the stored value as a handle with an explicit cast
- void opConv(?&out) conversion
- Retrieves the stored value as the requested type
- int64 opConv() conversion
- Converts the stored value to an integer
- dictionaryValue& opHndlAssign(const ?&in) @=
- Stores a handle
- dictionaryValue& opHndlAssign(const dictionaryValue&in) @=
- Copies the content of another value, used by handle assignment
Operator documentation
dictionaryValue& dictionaryValue:: opAssign(const ?&in) =
Stores a value of any type
Objects are stored as copies, handles keep referring to the same object.
dictionaryValue& dictionaryValue:: opAssign(double) =
Stores a floating-point number
All floating-point types are stored as double.
dictionaryValue& dictionaryValue:: opAssign(int64) =
Stores an integer
All integer types are stored as int64.
dictionaryValue& dictionaryValue:: opHndlAssign(const ?&in) @=
Stores a handle
Used by @dict["key"] = obj;, the dictionary then refers to the same object instead of a copy.