IXDLSAttributeReader module

class IXDLSAttributeReader.IXDLSAttributeReader

Bases: ABC

Abstract base class for attribute readers.

abstract HasAttribute(name: str) → bool

Check if an attribute with the given name exists.

Parameters:

name – The name of the attribute.

Returns:

True if the attribute exists, False otherwise.

abstract ReadBoolean(name: str) → bool

Read a boolean attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as a boolean.

abstract ReadByte(name: str) → int

Read a byte attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as a byte.

abstract ReadColor(name: str) → Color

Read a color attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as a color.

abstract ReadDateTime(s: str) → DateTime

Read a datetime attribute with the given name.

Parameters:

s – The string representation of the datetime.

Returns:

The value of the attribute as a datetime.

abstract ReadDouble(name: str) → float

Read a double attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as a double.

abstract ReadFloat(name: str) → float

Read a float attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as a float.

abstract ReadInt(name: str) → int

Read an integer attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as an integer.

abstract ReadShort(name: str) → Int16

Read a short attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as a short.

abstract ReadString(name: str) → str

Read a string attribute with the given name.

Parameters:

name – The name of the attribute.

Returns:

The value of the attribute as a string.