Collection of message parameters.
A collection of message parameters is a list of typed {name, value}
pairs. Each entry in this collection has a unique name and can have one
of the following types:
The names of entries are searched for using case-sensitive
comparisons.
Note: The instances of this class should not be used from multiple
threads without synchronization; it is safe to use separate instances in
separate threads.
Note: The entries are ordered - the order in which they are created
influences the final serialized form of the message payload. Newly
created entries are appended to the end of the collection unless there is
an existing empty slot that can be reused - the appropriate slot is
searched for from the beginning to the end of the collection and if no
free slot is found the collection is extended at the end. The above
guarantee concerns the user code that relies on predictable
serialization.
|
__init__(self)
Default constructor, creates an empty collection of parameters. |
|
|
|
__setitem__(self,
name,
value)
Sets the given value in the named slot. |
|
|
|
__getitem__(self,
name)
Returns the value of the named slot. |
|
|
|
__delitem__(self,
name)
Removes the given entry from the collection. |
|
|
|
__len__(self)
Gets the current size of the collection. |
|
|
|
__in__(self,
name)
Checks if the entry with the given name (key) exists. |
|
|
|
__iter__(self)
Gets the iterator over the list of keys. |
|
|
|
keys(self)
Gets the iterator over the list of keys. |
|
|
|
values(self)
Gets the iterator over the list of values. |
|
|
|
items(self)
Gets the iterator over the list of items. |
|
|
|
serialize(self)
Serializes the content of the whole collection. |
|
|
|
deserialize(self,
buf)
Deserializes from the given buffer. |
|
|
|
__str__(self)
Returns a string representation of the content. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|