Home | Download | Screen shots | Discussion | Documentation |
---|
PROTO definitions add node types to the namespace. PROTO implementations are a separate node type namespace, and require that any nested PROTOs NOT be available outside the PROTO implementation. PROTOs defined outside the current namespace are available.
Public Member Functions | |
scope (const std::string &id, const boost::shared_ptr< scope > &parent=boost::shared_ptr< scope >()) | |
virtual | ~scope () |
Destroy. | |
const std::string & | id () const throw () |
scope identifier. | |
const boost::shared_ptr< scope > & | parent () const throw () |
The parent scope . | |
bool | add_type (const node_type_ptr &type) throw (std::bad_alloc) |
Add a node type. | |
const node_type_ptr & | find_type (const std::string &id) const |
Find a node type, given a type name. Returns 0 if type is not defined. | |
const node_type_ptr & | first_type () const |
The first type in the scope. | |
node * | find_node (const std::string &id) const |
Find the node in the scope with node::id id . | |
Private Attributes | |
std::list< node_type_ptr > | node_type_list |
List of node_types in the scope. | |
std::map< std::string, node * > | named_node_map |
Map of the named nodes in the scope. | |
const std::string | id_ |
scope identifier. | |
const boost::shared_ptr< scope > | parent_ |
The parent scope; null if the scope is a root scope. | |
Friends | |
class | node |
node identifiers are stored in the scope, so node needs special privilege to access them. |
|
Destroy.
|
|
|
|
The parent
|
|
Add a node type. Print an error message if the argument type is already defined.
|
|
Find a node type, given a type name. Returns 0 if type is not defined.
|
|
The first type in the scope.
|
|
Find the node in the scope with node::id
|
|
node identifiers are stored in the scope, so node needs special privilege to access them.
|
|
List of node_types in the scope.
|
|
Map of the named nodes in the scope.
|
|
For internal use only.
|
|
The parent scope; null if the scope is a root scope.
For internal use only.
|