Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

NodeType Class Reference

Type information object for Nodes. More...

Inheritance diagram for NodeType:

ScriptNodeType List of all members.

Public Methods

virtual ~NodeType ()=0 throw ()
 Destructor.

FieldValue::Type hasEventIn (const std::string &id) const throw ()
 Determine if the node type has an eventIn.

FieldValue::Type hasEventOut (const std::string &id) const throw ()
 Determine if the node type has an eventOut.

FieldValue::Type hasField (const std::string &id) const throw ()
 Determine if the node type has a field.

FieldValue::Type hasExposedField (const std::string &id) const throw ()
 Determine if the node type has an exposedField.

virtual const NodeInterfaceSetgetInterfaces () const=0 throw ()
 Get the set of interfaces for the NodeType.

virtual const NodePtr createNode (const ScopePtr &scope) const=0 throw (std::bad_alloc)
 Create a new Node with this NodeType.


Public Attributes

NodeClassnodeClass
 The class object associated with the NodeType.

const std::string id
 The name of the NodeType.


Protected Methods

 NodeType (NodeClass &nodeClass, const std::string &id) throw (std::bad_alloc)
 Constructor.


Detailed Description

Type information object for Nodes.


Constructor & Destructor Documentation

~NodeType   throw () [pure virtual]
 

Destructor.

NodeType NodeClass   nodeClass,
const std::string &    id
throw (std::bad_alloc) [protected]
 

Constructor.

Parameters:
nodeClass the class object associated with the NodeType.
id the name for the NodeType.
Exceptions:
std::bad_alloc if memory allocation fails.

Member Function Documentation

const NodePtr createNode const ScopePtr   scope const throw (std::bad_alloc) [pure virtual]
 

Create a new Node with this NodeType.

Parameters:
scope the Scope that the new node should belong to.
Returns:
a NodePtr to a new Node.
Exceptions:
std::bad_alloc if memory allocation fails.

Implemented in ScriptNodeType.

const NodeInterfaceSet & getInterfaces   const throw () [pure virtual]
 

Get the set of interfaces for the NodeType.

Returns:
the set of interfaces.

Implemented in ScriptNodeType.

FieldValue::Type hasEventIn const std::string &    id const throw ()
 

Determine if the node type has an eventIn.

If the node type supports an eventIn named id, this method will return the type identifier corresponding to the data type handled by the eventIn. Note that the actual interface type that supports the eventIn may be either an eventIn or an exposedField.

Parameters:
id the name of the eventIn.
Returns:
the data type of the eventIn, or FieldValue::invalidType if no such eventIn exists.

FieldValue::Type hasEventOut const std::string &    id const throw ()
 

Determine if the node type has an eventOut.

If the node type supports an eventOut named id, this method will return the type identifier corresponding to the data type handled by the eventOut. Note that the actual interface type that supports the eventOut may be either an eventOut or an exposedField.

Parameters:
id the name of the eventOut.
Returns:
the data type of the eventOut, or FieldValue::invalidType if no such eventOut exists.

FieldValue::Type hasExposedField const std::string &    id const throw ()
 

Determine if the node type has an exposedField.

If the node type has an exposedField named id, this method will return the type identifier corresponding to the data type handled by the exposedField.

Parameters:
id the name of the exposedField.
Returns:
the data type of the exposedField, or FieldValue::invalidType if no such exposedField exists.

FieldValue::Type hasField const std::string &    id const throw ()
 

Determine if the node type has a field.

If the node type has a field named id, this method will return the type identifier corresponding to the data type accepted by the field.

Parameters:
id the name of the field.
Returns:
the data type of the field, or FieldValue::invalidType if no such field exists.

Member Data Documentation

const std::string id
 

The name of the NodeType.

NodeClass & nodeClass
 

The class object associated with the NodeType.