Inheritance |
|
This object represents the data for a particular work item, and contains methods for adding and querying attributes on the work item. The data object itself can be accessed through the pdg.WorkItem.data property.
Methods ¶
clearFloatData()
Clears all float attributes on the work item.
clearIntData()
Clears all integer attributes on the work item.
clearStringData()
Clears all string attributes on the work item
data(name, index)
→ int
, float
or str
Returns a float, int or string attribute values for the specified name and index.
dataArray(name)
→ list
of int
, float
, or str
Returns a list of float, int or string attribute values for the specified name.
deserializeString(string)
→ bool
Deserializes the work item data in string
, and returns True
on success.
floatData(name, index)
→ float
Looks up a floating point attribute value with the specified name and index.
floatDataArray(name)
→ list
of float
Looks up a floating point attribute array with the specified name.
intData(name, index)
→ int
Looks up an integer attribute value with the specified name and index.
intDataArray(name)
→ list
of int
Looks up an integer attribute array with the specified name.
removeData(name, index=0)
→ bool
Removes an attribute with the specified name. If index
is greater than 0,
only attribute values beyond the index are removed - the attribute array is
truncated. Returns True
on success.
setFloat(name, value, index)
→ bool
Sets a floating point attribute value with the specified name and index.
setFloatArray(name, floats)
→ bool
Sets a floating point attribute array with the specified name.
setInt(name, value, index)
→ bool
Sets an integer attribute value with the specified name and index.
setIntArray(name, value)
→ bool
Sets an integer attribute array with the specified name.
setString(name, value, index)
→ bool
Sets a string attribute value with the specified name and index.
setStringArray(name, value)
→ bool
Sets a string attribute array with the specified name.
stringData(name, index)
→ str
Looks up a string attribute value with the specified name and index.
stringDataArray(name)
→ list
of str
Looks up a string attribute array with the specified name.
allDataMap
: dict
of list
of int
, float
, and str
Property
All the data on the work item, as a dict from name to arrays of string, float and int values.
floatDataMap
: dict
of list
of float
Property
The floating point attributes on the work item, as a map to lists of float values.
intDataMap
: dict
of list
of int
Property
The integer attributes on the work item, as a map to lists of int values.
stringDataMap
: dict
of list
of str
Property
The string attributes on the work item, as a map to lists of string values.
workItem
: pdg.WorkItem
Property
The work item that owns this data object.
Methods from pdg.TypeInstance ¶
type
: pdg.BaseType
Property
The pdg.BaseType object used to construct this instance
typeName
: str
Property
The type name of the type
object.