This attribute type can hold an arbitrary sized array of pdg.File objects.
Methods
Static methods
isValidName(str)
→ bool
Returns True
if the specified name is a valid attribute name, else returns
False
.
Instance Methods
__getitem__(index)
→ pdg.File
Returns the attribute value at the specified index
__setitem__(index)
Sets the attribute value at the specified index
asNumber(index=0)
→ float
Casts the value at the specified index to a numeric value.
asString(index=0)
→ str
Casts the value at the specified index to a string value.
asValues()
→ str
Returns all of the values in the attribute as space separated string. If a file path has spaces in it then it will automatically be wrapped in quotes.
clear()
Clears all values in the array and sets the size to 0
hasFlag(flag)
→ bool
Returns true if the attribute has the specified pdg.attribFlag set.
hasFlags(bits)
→ bool
Returns true if the attribute has the specified pdg.attribFlag bits
set. The bits should be passed in as an integer, ORed from entries in the
attribFlags
enum.
setFlag(flag, set)
Sets or clears the specified pdg.attribFlag.
setFlags(flag, bits)
Sets the attribute flags to the specified bits.
setValue(value, index=0)
Sets the value of the attribute at the specified index. This can also be
accessed with array brackets, e.g. attrib[2] = 5
.
setValues(array)
Sets the array contents of the attribute
truncate(length)
Truncates the array to the specified length.
value(index=0)
→ pdg.File
Returns the value of the attribute at the specified index. This can also be
accessed with array brackets, e.g. attrib[0]
.
valueForTag(index=0, tag='')
→ pdg.File
Returns the value of the attribute with the specified index and tag. Values are matched by tag first, and then by index within the list of files that have that tag.
valuesForTag(tag='')
→ list
of pdg.File
Returns the list of all files in the attribute that have the specified tag.
flags
: int
Property
The flag bit vector, contains ORed bits from the pdg.attribFlag enum.
name
: `str
Property
The name of the attribute.
size
: int
Property
The length of the array stored in the attribute. Can also be access as
len(attrib)
.
values
: list
of pdg.File
Property
The read-only array of values stored in the attribute.
type
: pdg.attribType
Property
The type of the attribute, i.e. pdg.attribType.File
.