Dict

Inheritance diagram of rumba.Dict
class Dict

Bases: rumba.Value

A dictionnary to associate strings to values.

Constructors

__init__

Methods

as_Box3f(key) Returns the n-th dependency value as a Box3f.
as_M44f(key) Returns the n-th dependency value as a M44f.
as_Quatf(key) Returns the n-th dependency value as a Quatf.
as_V2f(key) Returns the n-th dependency value as a V2f.
as_V3f(key) Returns the n-th dependency value as a V3f.
as_V4f(key) Returns the n-th dependency value as a V’f.
as_bool(key) Returns a value as a bool.
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.
insert(key) Insert a value in the dictionnary.
read(key) Get a readable accessor on a dict entry.
values()
rtype:Values
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:Imath.Box3f
as_M44f(key: unicode) → Imath.M44f

Returns the n-th dependency value as a M44f.

You must be sure this value is a M44f or you will have an identity matrix.

Parameters:key (unicode) – key of the value to query
Return type:Imath.M44f
as_Quatf(key: unicode) → Imath.Quatf

Returns the n-th dependency value as a Quatf.

You must be sure this value is a Quatf or you will have an identity quaternion.

Parameters:key (unicode) – key of the value to query
Return type:Imath.Quatf
as_V2f(key: unicode) → Imath.V2f

Returns the n-th dependency value as a V2f.

You must be sure this value is a V2f or you will have {0,0}.

Parameters:key (unicode) – key of the value to query
Return type:Imath.V2f
as_V3f(key: unicode) → Imath.V3f

Returns the n-th dependency value as a V3f.

You must be sure this value is a V3f or you will have {0,0,0}.

Parameters:key (unicode) – key of the value to query
Return type:Imath.V3f

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:Imath.V3f

as_V3f(key: unicode) -> Imath.V3f

Returns the n-th dependency value as a V3f.

You must be sure this value is a V3f or you will have {0,0,0}.

Parameters:key (unicode) – key of the value to query
Return type:Imath.V3f

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:Imath.V3f
as_V4f(key: unicode) → Imath.V4f

Returns the n-th dependency value as a V’f.

You must be sure this value is a V4f or you will have {0,0,0,0}.

Parameters:key (unicode) – key of the value to query
Return type:Imath.V4f
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_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
insert(key: unicode, value: Value) → None

Insert a value in the dictionnary. If the key already exists, the value is replaced.

read(key: unicode) → Value

Get a readable accessor on a dict entry.

Return type:Value
values() → Values
Return type:Values