The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

METHODS

new
    $self->new( attr => "val", ... ) ;

Create a new object.

type
    $obj->type ;

Returns "MACHINE", "STATE", "ARC", "EVENT".

class_ids

A list of class ids this class inherits from.

To set the list, this method takes a list of strings, each of which should be one or more class_ids separated by a comma. Trailing commas are allowed.

id
    $obj->id( "foo" ) ;
    $id = $obj->id ;

Returns the id string. Creates a new unique one if not defined.

The id "" is not valid.

name
    $obj->name( "foo" ) ;
    $id = $obj->name ;

Returns the name string or the id string if the name is unset. The name "" is valid.

The name is used for human readable documentation purposes, the id is used for internal linking and for generated code. The name is merely a comment with semantic value.

enum_id
    $enum_id = $obj->enum_id ;

Returns the same string as $obj->id, but cleaned up sufficiently to be used in a C "enum" statement.

machine
    $obj->machine( $machine ) ;
    $m = $obj->machine ;

Sets/gets the StateML::Machine object this object is a part of.

attribute
    $attr = $obj->attribute( $namespace_uri, $name ) ;

Returns the attribute identified by the XML namespace prefix and name.

    $attr = $obj->attribute( $namespace_uri, $name, $value ) ;

The namespace_uri is the XML concept of namespace identifier.

Checks up the class hierarchy if an attribute is not defined.

attributes
    %attrs = $obj->attributes( $namespace_uri );
    %attrs = $obj->attributes;

If a namespace URI is passed, returns attributes in that namespace and no others with the localname of the attribute as the key (ie without the namespace URI).

If no namespace URI is passed, returns all attributes with the URI encoded in jclark notation.

Compiles a list of all attributes from the class hierarchy.