NAME

Thrift::Parser::Type - Base clase for OO types

DESCRIPTION

METHODS

idl

Returns a reference to the Thrift::IDL::Type that informed the creation of this class.

idl_doc

Returns a reference to the Thrift::IDL object that this was formed from.

name

Returns the simple name of the type.

value

Returns the internal representation of the value of this object.

defined

Boolean; is a value defined for this object.

compose

my $object = $subclass->compose(..);

Returns a new object in the class/subclass namespace with the value given. Generally you may pass a simple perl variable or another object in this same class to create the new object. Throws Thrift::Parser::InvalidArgument or Thrift::Parser::InvalidTypedValue. See subclass documentation for more specifics.

compose_with_idl

Used internally. Overridden for complex type classes that require the IDL to inform their creation and schema (mainly Thrift::Parser::Type::Container).

read

my $object = $class->read($protocol);

Implemented in subclasses, this will create new objects from a Thrift::Protocol.

write

$object->write($protocol)

Given a Thrift::Protocol object, will write out this type to the buffer. Overridden in all most subclasses.

equal_to

if ($object_a->equal_to($object_b)) { ... }

Performs an equality test between two blessed objects. You may also call with a non-blessed reference (a perl scalar, for instance), which will be passed to compose() to be formed into a proper object before the comparison is run. Throws Thrift::Parser::InvalidArgument.

values_equal

Used internally for the "equal_to" call.

value_name

Implemented by the specific type.

value_plain

type_id

Returns the Thrift type id. Overridden in subclasses. Throws Thrift::Parser::Exception.

docs_as_pod

Returns a POD formatted string that documents a derived class.

COPYRIGHT

Copyright (c) 2009 Eric Waters and XMission LLC (http://www.xmission.com/). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

AUTHOR

Eric Waters <ewaters@gmail.com>