Treex::PML::Container documentation

Table of contents


NAME

ToC

Treex::PML::Container - content and attributes

DESCRIPTION

ToC

This class implements the data type 'container'. A container consists of a central value called content annotated by a set of name-value pairs called attributes whose values are atomic. Treex::PML represents the container class as a subclass of Treex::PML::Struct, where attributes are represented as members and the content as a member with a reserved name '#content'.

METHODS

ToC

Treex::PML::Container->new (value?, { name=>attr, ...}?,reuse?)

Create a new container (optionally initializing its value and attributes). If reuse is true, the hash reference passed may be reused (re-blessed) into the structure.

NOTE: Don't call this constructor directly, use Treex::PML::Factory->createContainer() instead!

$container->attributes ()

Return (assorted) list of names of all attributes.

$container->value

Return the content value of the container.

$container->content

This is an alias for value().

SEE ALSO

ToC

Treex::PML, Treex::PML::Factory, Treex::PML::Schema, Treex::PML::Struct

COPYRIGHT AND LICENSE

ToC