Wp.SpaType

g Wp.SpaType Wp.SpaType

Subclasses:

None

Methods

class

from_name (name)

get_object_id_values_table ()

get_values_table ()

is_fundamental ()

is_id ()

is_object ()

name ()

parent ()

Virtual Methods

None

Fields

None

Class Details

class Wp.SpaType
Abstract:

No

classmethod from_name(name)
Parameters:

name (str) – the name to look up

Returns:

the corresponding type id or Wp.SPA_TYPE_INVALID if not found

Return type:

Wp.SpaType

Looks up the type id from a given type name.

get_object_id_values_table()
Returns:

the table with the values that can be stored in the special “id” field of an object of the given self

Return type:

object

Gets the table with the values that can be stored in the special “id” field of an object of the given self.

Object pods (see Wp.SpaPod) always have a special “id” field along with other fields that can be defined. This “id” field can only store values of a specific SPA_TYPE_Id type. This function returns the table that contains the possible values for that field.

get_values_table()
Returns:

the associated WpSpaIdTable that contains possible values or object fields for this type, or None

Return type:

object

Gets the values table of an SPA type.

is_fundamental()
Returns:

True if the self has no parent, False otherwise

Return type:

bool

Checks if an SPA type is a fundamental type.

is_id()
Returns:

True if the self is a SPA_TYPE_Id, False otherwise

Return type:

bool

Checks if an SPA type is an Id type.

is_object()
Returns:

True if the self is a SPA_TYPE_Object, False otherwise

Return type:

bool

Checks if an SPA type is an Object type.

name()
Returns:

the complete name of the given self or None if self is invalid

Return type:

str

Gets the name of an SPA type.

parent()
Returns:

the direct parent type of the given self; if the type is fundamental (i.e. has no parent), the returned type is the same as self

Return type:

Wp.SpaType

Gets the parent type of an SPA type.