Dict

- class Dict
A dictionnary to associate strings to values.
- Variables
default_value (Dict) – Static. The default value.
Methods
__contains__has_key(key: unicode) -> bool
Constructor(s)
__len__as_Array(key)Returns the n-th dependency value as an Array.
as_Box3f(key)Returns the n-th dependency value as a Box3f.
as_Dict(key)Returns the n-th dependency value as a Dict.
as_M44d(key)Returns the n-th dependency value as a M44d.
as_M44f(key)Returns the n-th dependency value as a M44f.
as_Quatd(key)Returns the n-th dependency value as a Quatd.
as_Quatf(key)Returns the n-th dependency value as a Quatf.
as_V2d(key)Returns the n-th dependency value as a V2d.
as_V2f(key)Returns the n-th dependency value as a V2f.
as_V3d(key)Returns the n-th dependency value as a V3d.
as_V3f(key)Returns the n-th dependency value as a V3f.
as_V4d(key)Returns the n-th dependency value as a V4d.
as_V4f(key)Returns the n-th dependency value as a V4f.
as_bool(key)Returns a value as a bool.
as_double(key)Returns the n-th dependency value as a double.
as_float(key)Returns the n-th dependency value as a float.
as_int(key)Returns the n-th dependency value as an integer.
as_string(key)Returns the n-th dependency value as a string.
erase(key)Erase a value from the dictionnary.
has_key(key)Check if a dict entry exists.
insert(key, value)Insert a value in the dictionnary.
read(key)Get a readable accessor on a dict entry.
size()- rtype
int
values()- rtype
Values
Properties
default_value- class Values
A value accessor.
This class can be used to get the number of values and iterate them.
- __init__(*args, **kwargs)
- __init__()
Constructor(s)
Dict (v: Value)
Cast a Value object in Dict.
If v has not the good type, a default value is constructed.
- as_Array(key: unicode) maquina.Array
Returns the n-th dependency value as an Array.
You must be sure this value is a Dict or you will have an empty Array.
- Parameters
key (unicode) – key of the value to query
- Return type
maquina.Array
as_Array(key: unicode,default_value: maquina.Array) -> maquina.Array
Return the value with key key as a Array. If a value with such key does not exist or if its type is not convertible to a Array, return default_value instead.
- Return type
maquina.Array
as_Array(key: unicode) -> maquina.Array
Returns the n-th dependency value as an Array.
You must be sure this value is a Dict or you will have an empty Array.
- Parameters
key (unicode) – key of the value to query
- Return type
maquina.Array
as_Array(key: unicode,default_value: maquina.Array) -> maquina.Array
Return the value with key key as a Array. If a value with such key does not exist or if its type is not convertible to a Array, return default_value instead.
- Return type
maquina.Array
- as_Box3f(key: unicode) Imath.Box3f
Returns the n-th dependency value as a Box3f.
You must be sure this value is a Box3f or you will have an empty box.
- Parameters
key (unicode) – key of the value to query
- Return type
as_Box3f(key: unicode,default_value: Imath.Box3f) -> Imath.Box3f
Return the value with key key as a Box3f. If a value with such key does not exist or if its type is not convertible to a Box3f, return default_value instead.
- Return type
as_Box3f(key: unicode) -> Imath.Box3f
Returns the n-th dependency value as a Box3f.
You must be sure this value is a Box3f or you will have an empty box.
- Parameters
key (unicode) – key of the value to query
- Return type
as_Box3f(key: unicode,default_value: Imath.Box3f) -> Imath.Box3f
Return the value with key key as a Box3f. If a value with such key does not exist or if its type is not convertible to a Box3f, return default_value instead.
- Return type
- as_Dict(key: unicode) maquina.Dict
Returns the n-th dependency value as a Dict.
You must be sure this value is a Dict or you will have an empty Dict.
- Parameters
key (unicode) – key of the value to query
- Return type
maquina.Dict
as_Dict(key: unicode,default_value: maquina.Dict) -> maquina.Dict
Return the value with key key as a Dict. If a value with such key does not exist or if its type is not convertible to a Dict, return default_value instead.
- Return type
maquina.Dict
as_Dict(key: unicode) -> maquina.Dict
Returns the n-th dependency value as a Dict.
You must be sure this value is a Dict or you will have an empty Dict.
- Parameters
key (unicode) – key of the value to query
- Return type
maquina.Dict
as_Dict(key: unicode,default_value: maquina.Dict) -> maquina.Dict
Return the value with key key as a Dict. If a value with such key does not exist or if its type is not convertible to a Dict, return default_value instead.
- Return type
maquina.Dict
- as_M44d(key: unicode) Imath.M44d
Returns the n-th dependency value as a M44d.
You must be sure this value is a M44d or you will have an identity matrix.
- Parameters
key (unicode) – key of the value to query
- Return type
as_M44d(key: unicode,default_value: Imath.M44d) -> Imath.M44d
Return the value with key key as a M44d. If a value with such key does not exist or if its type is not convertible to a M44d, return default_value instead.
- Return type
as_M44d(key: unicode) -> Imath.M44d
Returns the n-th dependency value as a M44d.
You must be sure this value is a M44d or you will have an identity matrix.
- Parameters
key (unicode) – key of the value to query
- Return type
as_M44d(key: unicode,default_value: Imath.M44d) -> Imath.M44d
Return the value with key key as a M44d. If a value with such key does not exist or if its type is not convertible to a M44d, return default_value instead.
- Return type
- as_M44f(key: unicode) Imath.M44f
Returns the n-th dependency value as a M44f.
You must be sure this value is a M44f/M44d or you will have an identity matrix.
- Parameters
key (unicode) – key of the value to query
- Return type
as_M44f(key: unicode,default_value: Imath.M44f) -> Imath.M44f
Return the value with key key as a M44f. If a value with such key does not exist or if its type is not convertible to a M44f, return default_value instead.
- Return type
as_M44f(key: unicode) -> Imath.M44f
Returns the n-th dependency value as a M44f.
You must be sure this value is a M44f/M44d or you will have an identity matrix.
- Parameters
key (unicode) – key of the value to query
- Return type
as_M44f(key: unicode,default_value: Imath.M44f) -> Imath.M44f
Return the value with key key as a M44f. If a value with such key does not exist or if its type is not convertible to a M44f, return default_value instead.
- Return type
- as_Quatd(key: unicode) Imath.Quatd
Returns the n-th dependency value as a Quatd.
You must be sure this value is a Quatd or you will have an identity quaternion.
- Parameters
key (unicode) – key of the value to query
- Return type
as_Quatd(key: unicode,default_value: Imath.Quatd) -> Imath.Quatd
Return the value with key key as a Quatd. If a value with such key does not exist or if its type is not convertible to a Quatd, return default_value instead.
- Return type
as_Quatd(key: unicode) -> Imath.Quatd
Returns the n-th dependency value as a Quatd.
You must be sure this value is a Quatd or you will have an identity quaternion.
- Parameters
key (unicode) – key of the value to query
- Return type
as_Quatd(key: unicode,default_value: Imath.Quatd) -> Imath.Quatd
Return the value with key key as a Quatd. If a value with such key does not exist or if its type is not convertible to a Quatd, return default_value instead.
- Return type
- as_Quatf(key: unicode) Imath.Quatf
Returns the n-th dependency value as a Quatf.
You must be sure this value is a Quatf/Quatd or you will have an identity quaternion.
- Parameters
key (unicode) – key of the value to query
- Return type
as_Quatf(key: unicode,default_value: Imath.Quatf) -> Imath.Quatf
Return the value with key key as a Quatf. If a value with such key does not exist or if its type is not convertible to a Quatf, return default_value instead.
- Return type
as_Quatf(key: unicode) -> Imath.Quatf
Returns the n-th dependency value as a Quatf.
You must be sure this value is a Quatf/Quatd or you will have an identity quaternion.
- Parameters
key (unicode) – key of the value to query
- Return type
as_Quatf(key: unicode,default_value: Imath.Quatf) -> Imath.Quatf
Return the value with key key as a Quatf. If a value with such key does not exist or if its type is not convertible to a Quatf, return default_value instead.
- Return type
- as_V2d(key: unicode) Imath.V2d
Returns the n-th dependency value as a V2d.
You must be sure this value is a V2d or you will have {0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V2d(key: unicode,default_value: Imath.V2d) -> Imath.V2d
Return the value with key key as a V2d. If a value with such key does not exist or if its type is not convertible to a V2d, return default_value instead.
- Return type
as_V2d(key: unicode) -> Imath.V2d
Returns the n-th dependency value as a V2d.
You must be sure this value is a V2d or you will have {0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V2d(key: unicode,default_value: Imath.V2d) -> Imath.V2d
Return the value with key key as a V2d. If a value with such key does not exist or if its type is not convertible to a V2d, return default_value instead.
- Return type
- as_V2f(key: unicode) Imath.V2f
Returns the n-th dependency value as a V2f.
You must be sure this value is a V2f/V2d or you will have {0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V2f(key: unicode,default_value: Imath.V2f) -> Imath.V2f
Return the value with key key as a V2f. If a value with such key does not exist or if its type is not convertible to a V2f, return default_value instead.
- Return type
as_V2f(key: unicode) -> Imath.V2f
Returns the n-th dependency value as a V2f.
You must be sure this value is a V2f/V2d or you will have {0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V2f(key: unicode,default_value: Imath.V2f) -> Imath.V2f
Return the value with key key as a V2f. If a value with such key does not exist or if its type is not convertible to a V2f, return default_value instead.
- Return type
- as_V3d(key: unicode) Imath.V3d
Returns the n-th dependency value as a V3d.
You must be sure this value is a V3d or you will have {0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V3d(key: unicode,default_value: Imath.V3d) -> Imath.V3d
Return the value with key key as a V3d. If a value with such key does not exist or if its type is not convertible to a V3d, return default_value instead.
- Return type
as_V3d(key: unicode) -> Imath.V3d
Returns the n-th dependency value as a V3d.
You must be sure this value is a V3d or you will have {0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V3d(key: unicode,default_value: Imath.V3d) -> Imath.V3d
Return the value with key key as a V3d. If a value with such key does not exist or if its type is not convertible to a V3d, return default_value instead.
- Return type
- as_V3f(key: unicode) Imath.V3f
Returns the n-th dependency value as a V3f.
You must be sure this value is a V3f/V3d or you will have {0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V3f(key: unicode,default_value: Imath.V3f) -> Imath.V3f
Return the value with key key as a V3f. If a value with such key does not exist or if its type is not convertible to a V3f, return default_value instead.
- Return type
as_V3f(key: unicode) -> Imath.V3f
Returns the n-th dependency value as a V3f.
You must be sure this value is a V3f/V3d or you will have {0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V3f(key: unicode,default_value: Imath.V3f) -> Imath.V3f
Return the value with key key as a V3f. If a value with such key does not exist or if its type is not convertible to a V3f, return default_value instead.
- Return type
- as_V4d(key: unicode) Imath.V4d
Returns the n-th dependency value as a V4d.
You must be sure this value is a V4d or you will have {0,0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V4d(key: unicode,default_value: Imath.V4d) -> Imath.V4d
Return the value with key key as a V4d. If a value with such key does not exist or if its type is not convertible to a V4d, return default_value instead.
- Return type
as_V4d(key: unicode) -> Imath.V4d
Returns the n-th dependency value as a V4d.
You must be sure this value is a V4d or you will have {0,0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V4d(key: unicode,default_value: Imath.V4d) -> Imath.V4d
Return the value with key key as a V4d. If a value with such key does not exist or if its type is not convertible to a V4d, return default_value instead.
- Return type
- as_V4f(key: unicode) Imath.V4f
Returns the n-th dependency value as a V4f.
You must be sure this value is a V4f/V4d or you will have {0,0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V4f(key: unicode,default_value: Imath.V4f) -> Imath.V4f
Return the value with key key as a V4f. If a value with such key does not exist or if its type is not convertible to a V4f, return default_value instead.
- Return type
as_V4f(key: unicode) -> Imath.V4f
Returns the n-th dependency value as a V4f.
You must be sure this value is a V4f/V4d or you will have {0,0,0,0}.
- Parameters
key (unicode) – key of the value to query
- Return type
as_V4f(key: unicode,default_value: Imath.V4f) -> Imath.V4f
Return the value with key key as a V4f. If a value with such key does not exist or if its type is not convertible to a V4f, return default_value instead.
- Return type
- as_bool(key: unicode) bool
Returns a value as a bool.
You must be sure this value is an integer, a float or a boolean or you get false.
- Parameters
key (unicode) – key of the value to query
- Return type
bool
as_bool(key: unicode,default_value: bool) -> bool
Return the value with key key as a boolean. If a value with such key does not exist or if its type is not convertible to a boolean, return default_value instead.
- Return type
bool
as_bool(key: unicode) -> bool
Returns a value as a bool.
You must be sure this value is an integer, a float or a boolean or you get false.
- Parameters
key (unicode) – key of the value to query
- Return type
bool
as_bool(key: unicode,default_value: bool) -> bool
Return the value with key key as a boolean. If a value with such key does not exist or if its type is not convertible to a boolean, return default_value instead.
- Return type
bool
- as_double(key: unicode) double
Returns the n-th dependency value as a double.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
- Parameters
key (unicode) – key of the value to query
- Return type
double
as_double(key: unicode,default_value: double) -> double
Return the value with key key as a double. If a value with such key does not exist or if its type is not convertible to a double, return default_value instead.
- Return type
double
as_double(key: unicode) -> double
Returns the n-th dependency value as a double.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
- Parameters
key (unicode) – key of the value to query
- Return type
double
as_double(key: unicode,default_value: double) -> double
Return the value with key key as a double. If a value with such key does not exist or if its type is not convertible to a double, return default_value instead.
- Return type
double
- as_float(key: unicode) float
Returns the n-th dependency value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
- Parameters
key (unicode) – key of the value to query
- Return type
float
as_float(key: unicode,default_value: float) -> float
Return the value with key key as a float. If a value with such key does not exist or if its type is not convertible to a float, return default_value instead.
- Return type
float
as_float(key: unicode) -> float
Returns the n-th dependency value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.f.
- Parameters
key (unicode) – key of the value to query
- Return type
float
as_float(key: unicode,default_value: float) -> float
Return the value with key key as a float. If a value with such key does not exist or if its type is not convertible to a float, return default_value instead.
- Return type
float
- as_int(key: unicode) int
Returns the n-th dependency value as an integer.
You must be sure this value is an integer, a float or a boolean or you get 0.
- Parameters
key (unicode) – key of the value to query
- Return type
int
as_int(key: unicode,default_value: int) -> int
Return the value with key key as an integer. If a value with such key does not exist or if its type is not convertible to a integer, return default_value instead.
- Return type
int
as_int(key: unicode) -> int
Returns the n-th dependency value as an integer.
You must be sure this value is an integer, a float or a boolean or you get 0.
- Parameters
key (unicode) – key of the value to query
- Return type
int
as_int(key: unicode,default_value: int) -> int
Return the value with key key as an integer. If a value with such key does not exist or if its type is not convertible to a integer, return default_value instead.
- Return type
int
- as_string(key: unicode) unicode
Returns the n-th dependency value as a string.
You must be sure this value is a string or you will have an empty string.
- Parameters
key (unicode) – key of the value to query
- Return type
unicode
as_string(key: unicode,default_value: unicode) -> unicode
Return the value with key key as a string. If a value with such key does not exist or if its type is not convertible to a string, return default_value instead.
- Return type
unicode
as_string(key: unicode) -> unicode
Returns the n-th dependency value as a string.
You must be sure this value is a string or you will have an empty string.
- Parameters
key (unicode) – key of the value to query
- Return type
unicode
as_string(key: unicode,default_value: unicode) -> unicode
Return the value with key key as a string. If a value with such key does not exist or if its type is not convertible to a string, return default_value instead.
- Return type
unicode
- erase(key: StringView) bool
Erase a value from the dictionnary.
Returns true if the key was present in the dict.
- Return type
bool
- has_key(key: unicode) bool
Check if a dict entry exists.
- Return type
bool
- insert(key: StringView, value: Value) bool
Insert a value in the dictionnary.
If the key already exists, the value is replaced. Returns true if the string as been added, false if it already exists.
- Return type
bool
- size() int
- Return type
int