Home | Download | Screen shots | Discussion | Documentation |
---|
#include <openvrml/node_impl_util.h>
node_types
. Public Types | |
typedef boost::shared_ptr < ptr_to_polymorphic_mem < openvrml::field_value, Node > > | field_ptr_ptr |
A shared_ptr to a pointer-to-member wrapper template. | |
typedef boost::shared_ptr < ptr_to_polymorphic_mem < openvrml::event_listener, Node > > | event_listener_ptr_ptr |
A shared_ptr to a pointer-to-member wrapper template. | |
typedef boost::shared_ptr < ptr_to_polymorphic_mem < openvrml::event_emitter, Node > > | event_emitter_ptr_ptr |
A shared_ptr to a pointer-to-member wrapper template. | |
Public Member Functions | |
node_type_impl (const openvrml::node_metatype &metatype, const std::string &id) | |
Construct. | |
virtual | ~node_type_impl () throw () |
Destroy. | |
void | add_eventin (openvrml::field_value::type_id type, const std::string &id, const event_listener_ptr_ptr &event_listener) throw ( std::invalid_argument , std::bad_alloc ) |
Add an eventIn . | |
void | add_eventout (openvrml::field_value::type_id type, const std::string &id, const event_emitter_ptr_ptr &event_emitter) throw ( std::invalid_argument , std::bad_alloc ) |
Add an eventOut . | |
void | add_exposedfield (openvrml::field_value::type_id type, const std::string &id, const event_listener_ptr_ptr &event_listener, const field_ptr_ptr &field, const event_emitter_ptr_ptr &event_emitter) throw ( std::invalid_argument , std::bad_alloc ) |
Add an exposedField . | |
void | add_field (openvrml::field_value::type_id type, const std::string &id, const field_ptr_ptr &field) throw ( std::invalid_argument , std::bad_alloc ) |
Add a field . | |
virtual const openvrml::field_value & | field_value (const openvrml::node &node, const std::string &id) const throw ( openvrml::unsupported_interface ) |
node's openvrml::field_value corresponding to the field identifier id . | |
virtual openvrml::event_listener & | event_listener (openvrml::node &node, const std::string &id) const throw ( openvrml::unsupported_interface ) |
node's openvrml::event_listener corresponding to the eventIn identifier id . | |
virtual openvrml::event_emitter & | event_emitter (openvrml::node &node, const std::string &id) const throw ( openvrml::unsupported_interface ) |
node's openvrml::event_emitter corresponding to the eventOut identifier id . | |
Private Types | |
typedef std::map< std::string, field_ptr_ptr > | field_value_map_t |
Map of pointers to openvrml::field_value node members. | |
typedef std::map< std::string, event_listener_ptr_ptr > | event_listener_map_t |
Map of pointers to openvrml::event_listener node members. | |
typedef std::map< std::string, event_emitter_ptr_ptr > | event_emitter_map_t |
Map of pointers to openvrml::event_emitter node members. | |
Private Member Functions | |
virtual const openvrml::node_interface_set & | do_interfaces () const throw () |
The set of node_interfaces supported by the node_type . | |
virtual const boost::intrusive_ptr < openvrml::node > | do_create_node (const boost::shared_ptr< openvrml::scope > &scope, const openvrml::initial_value_map &initial_values) const throw ( openvrml::unsupported_interface , std::bad_cast , std::bad_alloc ) |
Create a node instance. | |
const openvrml::field_value & | do_field_value (const Node &node, const std::string &id) const throw ( openvrml::unsupported_interface ) |
node's openvrml::field_value corresponding to the field identifier id . | |
openvrml::event_listener & | do_event_listener (Node &node, const std::string &id) const throw ( openvrml::unsupported_interface ) |
node's openvrml::event_listener corresponding to the eventIn identifier id . | |
openvrml::event_emitter & | do_event_emitter (Node &node, const std::string &id) const throw ( openvrml::unsupported_interface ) |
node's openvrml::event_emitter corresponding to the eventOut identifier id . | |
Private Attributes | |
openvrml::node_interface_set | interfaces_ |
The set of node_interfaces for the node_type . | |
field_value_map_t | field_value_map |
Map of pointers to openvrml::field_value node members. | |
event_listener_map_t | event_listener_map |
Map of pointers to openvrml::event_listener node members. | |
event_emitter_map_t | event_emitter_map |
Map of pointers to openvrml::event_emitter node members. | |
Friends | |
class | event_listener_base< Node > |
The event_listener_base class template accesses node_type_impl<Node>::event_listener_map . | |
class | event_emitter_base< Node > |
The event_emitter_base class template accesses node_type_impl<Node>::event_emitter_map . | |
Classes | |
class | event_emitter_ptr |
Concrete pointer-to-member wrapper. More... | |
class | event_listener_ptr |
Concrete pointer-to-member wrapper. More... | |
class | field_ptr |
Concrete pointer-to-member wrapper. More... |
boost::shared_ptr< openvrml::node_impl_util::ptr_to_polymorphic_mem< openvrml::field_value, Node > > openvrml::node_impl_util::node_type_impl< Node >::field_ptr_ptr |
A shared_ptr
to a pointer-to-member wrapper template.
boost::shared_ptr< openvrml::node_impl_util::ptr_to_polymorphic_mem< openvrml::event_listener, Node > > openvrml::node_impl_util::node_type_impl< Node >::event_listener_ptr_ptr |
A shared_ptr
to a pointer-to-member wrapper template.
boost::shared_ptr< openvrml::node_impl_util::ptr_to_polymorphic_mem< openvrml::event_emitter, Node > > openvrml::node_impl_util::node_type_impl< Node >::event_emitter_ptr_ptr |
A shared_ptr
to a pointer-to-member wrapper template.
std::map< std::string, openvrml::node_impl_util::node_type_impl< Node >::field_ptr_ptr > openvrml::node_impl_util::node_type_impl< Node >::field_value_map_t [private] |
Map of pointers to openvrml::field_value
node members.
std::map< std::string, openvrml::node_impl_util::node_type_impl< Node >::event_listener_ptr_ptr > openvrml::node_impl_util::node_type_impl< Node >::event_listener_map_t [private] |
Map of pointers to openvrml::event_listener
node members.
std::map< std::string, openvrml::node_impl_util::node_type_impl< Node >::event_emitter_ptr_ptr > openvrml::node_impl_util::node_type_impl< Node >::event_emitter_map_t [private] |
Map of pointers to openvrml::event_emitter
node members.
openvrml::node_impl_util::node_type_impl< Node >::node_type_impl | ( | const openvrml::node_metatype & | metatype, | |
const std::string & | id | |||
) | [inline] |
openvrml::node_impl_util::node_type_impl< Node >::~node_type_impl | ( | ) | throw () [inline, virtual] |
Destroy.
void openvrml::node_impl_util::node_type_impl< Node >::add_eventin | ( | openvrml::field_value::type_id | type, | |
const std::string & | id, | |||
const event_listener_ptr_ptr & | event_listener | |||
) | throw ( std::invalid_argument , std::bad_alloc ) [inline] |
Add an eventIn
.
[in] | type | the field value type. |
[in] | id | the eventIn identifier. |
[in] | event_listener | the openvrml::event_listener associated with the eventIn . |
std::invalid_argument | if an interface with a conflicting id has already been added to the node_type . | |
std::bad_alloc | if memory allocation fails. |
void openvrml::node_impl_util::node_type_impl< Node >::add_eventout | ( | openvrml::field_value::type_id | type, | |
const std::string & | id, | |||
const event_emitter_ptr_ptr & | event_emitter | |||
) | throw ( std::invalid_argument , std::bad_alloc ) [inline] |
Add an eventOut
.
[in] | type | the field value type. |
[in] | id | the eventOut identifier. |
[in] | event_emitter | the openvrml::event_emitter associated with the eventOut . |
std::invalid_argument | if an interface with a conflicting id has already been added to the node_type . | |
std::bad_alloc | if memory allocation fails. |
void openvrml::node_impl_util::node_type_impl< Node >::add_exposedfield | ( | openvrml::field_value::type_id | type, | |
const std::string & | id, | |||
const event_listener_ptr_ptr & | event_listener, | |||
const field_ptr_ptr & | field, | |||
const event_emitter_ptr_ptr & | event_emitter | |||
) | throw ( std::invalid_argument , std::bad_alloc ) [inline] |
Add an exposedField
.
[in] | type | the field value type. |
[in] | id | the exposedField identifier. |
[in] | event_listener | the openvrml::event_listener associated with the exposedField . |
[in] | field | the openvrml::field_value associated with the exposedField . |
[in] | event_emitter | the openvrml::event_emitter associated with the exposedField . |
std::invalid_argument | if an interface with a conflicting id has already been added to the node_type . | |
std::bad_alloc | if memory allocation fails. |
void openvrml::node_impl_util::node_type_impl< Node >::add_field | ( | openvrml::field_value::type_id | type, | |
const std::string & | id, | |||
const field_ptr_ptr & | field | |||
) | throw ( std::invalid_argument , std::bad_alloc ) [inline] |
Add a field
.
[in] | type | the field value type. |
[in] | id | the field identifier. |
[in] | field | the openvrml::field_value associated with the field . |
std::invalid_argument | if an interface with a conflicting id has already been added to the node_type . | |
std::bad_alloc | if memory allocation fails. |
const openvrml::field_value & openvrml::node_impl_util::node_type_impl< Node >::field_value | ( | const openvrml::node & | node, | |
const std::string & | id | |||
) | const throw ( openvrml::unsupported_interface ) [inline, virtual] |
node's
openvrml::field_value
corresponding to the field identifier id
.
Delegates to node_type_impl<Node>::do_field_value
.
[in] | node | the openvrml::node for which to return the openvrml::field_value . |
[in] | id | field identifier. |
node's
openvrml::field_value
corresponding to the field
identifier id
.openvrml::unsupported_interface | if node has no field id . |
Implements openvrml::node_impl_util::abstract_node_type.
openvrml::event_listener & openvrml::node_impl_util::node_type_impl< Node >::event_listener | ( | openvrml::node & | node, | |
const std::string & | id | |||
) | const throw ( openvrml::unsupported_interface ) [inline, virtual] |
node's
openvrml::event_listener
corresponding to the eventIn
identifier id
.
Delegates to node_type_impl<Node>::do_event_listener
.
[in] | node | the openvrml::node for which to return the openvrml::event_listener . |
[in] | id | eventIn identifier. |
node's
openvrml::event_listener
corresponding to the eventIn identifier id
.openvrml::unsupported_interface | if node has no eventIn id . |
Implements openvrml::node_impl_util::abstract_node_type.
openvrml::event_emitter & openvrml::node_impl_util::node_type_impl< Node >::event_emitter | ( | openvrml::node & | node, | |
const std::string & | id | |||
) | const throw ( openvrml::unsupported_interface ) [inline, virtual] |
node's
openvrml::event_emitter
corresponding to the eventOut
identifier id
.
Delegates to node_type_impl<Node>::do_event_emitter
.
[in] | node | the openvrml::node for which to return the openvrml::event_emitter . |
[in] | id | eventOut identifier. |
node's
openvrml::event_emitter
corresponding to the eventOut
identifier id
.openvrml::unsupported_interface | if node has no eventOut id . |
Implements openvrml::node_impl_util::abstract_node_type.
const openvrml::node_interface_set & openvrml::node_impl_util::node_type_impl< Node >::do_interfaces | ( | ) | const throw () [inline, private, virtual] |
The set of node_interfaces
supported by the node_type
.
node_interfaces
supported by the node_type
. Implements openvrml::node_type.
const boost::intrusive_ptr< openvrml::node > openvrml::node_impl_util::node_type_impl< Node >::do_create_node | ( | const boost::shared_ptr< openvrml::scope > & | scope, | |
const openvrml::initial_value_map & | initial_values | |||
) | const throw ( openvrml::unsupported_interface , std::bad_cast , std::bad_alloc ) [inline, private, virtual] |
Create a node instance.
[in] | scope | the scope the new node will belong to. |
[in] | initial_values | initial values for the new node 's fields. |
openvrml::unsupported_interface | if a field identifier in initial_values does not correspond to a field for the node_type . | |
std::bad_cast | if a field value type in initial_values is incorrect for the corresponding field for the node_type . | |
std::bad_alloc | if memory allocation fails. |
const openvrml::field_value & openvrml::node_impl_util::node_type_impl< Node >::do_field_value | ( | const Node & | node, | |
const std::string & | id | |||
) | const throw ( openvrml::unsupported_interface ) [inline, private] |
node's
openvrml::field_value
corresponding to the field identifier id
.
[in] | node | the node for which to return the openvrml::field_value . |
[in] | id | field identifier. |
node's
openvrml::field_value
corresponding to the field
identifier id
.openvrml::unsupported_interface | if node has no field id . |
openvrml::event_listener & openvrml::node_impl_util::node_type_impl< Node >::do_event_listener | ( | Node & | node, | |
const std::string & | id | |||
) | const throw ( openvrml::unsupported_interface ) [inline, private] |
node's
openvrml::event_listener
corresponding to the eventIn
identifier id
.
[in] | node | the openvrml::node for which to return the openvrml::event_listener . |
[in] | id | eventIn identifier. |
node's
openvrml::event_listener
corresponding to the eventIn
identifier id
.openvrml::unsupported_interface | if node has no eventIn id . |
openvrml::event_emitter & openvrml::node_impl_util::node_type_impl< Node >::do_event_emitter | ( | Node & | node, | |
const std::string & | id | |||
) | const throw ( openvrml::unsupported_interface ) [inline, private] |
node's
openvrml::event_emitter
corresponding to the eventOut
identifier id
.
Delegates to node_type_impl<Node>::do_event_emitter
.
[in] | node | the openvrml::node for which to return the openvrml::event_emitter . |
[in] | id | eventOut identifier. |
node's
openvrml::event_emitter
corresponding to the eventOut
identifier id
.openvrml::unsupported_interface | if node has no eventOut id . |
class openvrml::node_impl_util::node_type_impl< Node >::event_listener_base [friend] |
The event_listener_base
class template accesses node_type_impl<Node>::event_listener_map
.
class openvrml::node_impl_util::node_type_impl< Node >::event_emitter_base [friend] |
The event_emitter_base
class template accesses node_type_impl<Node>::event_emitter_map
.
openvrml::node_interface_set openvrml::node_impl_util::node_type_impl< Node >::interfaces_ [private] |
The set of node_interfaces
for the node_type
.
openvrml::node_impl_util::node_type_impl< Node >::field_value_map_t openvrml::node_impl_util::node_type_impl< Node >::field_value_map [mutable, private] |
Map of pointers to openvrml::field_value
node members.
openvrml::node_impl_util::node_type_impl< Node >::event_listener_map_t openvrml::node_impl_util::node_type_impl< Node >::event_listener_map [mutable, private] |
Map of pointers to openvrml::event_listener
node members.
openvrml::node_impl_util::node_type_impl< Node >::event_emitter_map_t openvrml::node_impl_util::node_type_impl< Node >::event_emitter_map [mutable, private] |
Map of pointers to openvrml::event_emitter
node members.