EDataServer.NamedParameters¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class EDataServer.NamedParameters¶
New in version 3.8.
- classmethod new()¶
- Returns:
newly allocated
EDataServer.NamedParameters
- Return type:
Creates a new instance of an
EDataServer.NamedParameters
. This should be freed withEDataServer.NamedParameters.free
(), when no longer needed. Names are compared case insensitively.The structure is not thread safe, if the caller requires thread safety, then it should provide it on its own.
New in version 3.8.
- classmethod new_string(str)¶
- Parameters:
str (
str
) – a string to be used as a content of a newly createdEDataServer.NamedParameters
- Returns:
newly allocated
EDataServer.NamedParameters
- Return type:
Creates a new instance of an
EDataServer.NamedParameters
, with initial content being taken from str. This should be freed withEDataServer.NamedParameters.free
(), when no longer needed. Names are compared case insensitively.The str should be created with
EDataServer.NamedParameters.to_string
(), to be properly encoded.The structure is not thread safe, if the caller requires thread safety, then it should provide it on its own.
New in version 3.18.
- classmethod new_strv(strv)¶
- Parameters:
strv (
str
) –None
-terminated string array to be used as a content of a newly createdEDataServer.NamedParameters
- Returns:
newly allocated
EDataServer.NamedParameters
- Return type:
Creates a new instance of an
EDataServer.NamedParameters
, with initial content being taken from strv. This should be freed withEDataServer.NamedParameters.free
(), when no longer needed. Names are compared case insensitively.The structure is not thread safe, if the caller requires thread safety, then it should provide it on its own.
New in version 3.8.
- assign(from_)¶
- Parameters:
from (
EDataServer.NamedParameters
orNone
) – anEDataServer.NamedParameters
to get values from, orNone
Makes content of the self the same as from. Functions clears content of self if from is
None
.New in version 3.8.
- clear()¶
Removes all stored parameters from self.
New in version 3.8.
- count()¶
- Returns:
The number of stored named parameters in self
- Return type:
New in version 3.18.
- equal(parameters2)¶
- Parameters:
parameters2 (
EDataServer.NamedParameters
) – the secondEDataServer.NamedParameters
- Returns:
whether the two parameters are equal
- Return type:
Compares the two parameters objects and returns whether they equal. Note a
None
and empty parameters are also considered equal.New in version 3.46.
- exists(name)¶
- Parameters:
name (
str
) – name of the parameter whose existence to check- Returns:
Whether self holds a parameter named name
- Return type:
New in version 3.18.
- free()¶
Frees an instance of
EDataServer.NamedParameters
, previously allocated withEDataServer.NamedParameters.new
(). Function does nothing, if self isNone
.New in version 3.8.
- get(name)¶
- Parameters:
name (
str
) – name of a parameter to get- Returns:
value of a parameter named name, or
None
.- Return type:
Returns current value of a parameter with name name. If not such exists, then returns
None
.New in version 3.8.
- get_name(index)¶
- Parameters:
index (
int
) – an index of the parameter whose name to retrieve- Returns:
The name of the parameters at index index, or
None
, of the index is out of bounds or other error. The returned string should be freed withGLib.free
() when done with it.- Return type:
New in version 3.18.
- new_clone()¶
- Returns:
newly allocated
EDataServer.NamedParameters
- Return type:
Creates a new instance of an
EDataServer.NamedParameters
, with initial content being taken from self. This should be freed withEDataServer.NamedParameters.free
(), when no longer needed. Names are compared case insensitively.The structure is not thread safe, if the caller requires thread safety, then it should provide it on its own.
New in version 3.16.
- set(name, value)¶
- Parameters:
Sets parameter named name to value value. If value is
None
, then the parameter is removed. value can be an empty string.Note: There is a restriction on parameter names, it cannot be empty or contain a colon character (’:’), otherwise it can be pretty much anything.
New in version 3.8.
- test(name, value, case_sensitively)¶
- Parameters:
- Returns:
Whether parameter of given name has stored value of given value.
- Return type:
Compares current value of parameter named name with given value and returns whether they are equal, either case sensitively or insensitively, based on case_sensitively argument. Function returns
False
, if no such parameter exists.New in version 3.8.