Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

# openvrml::node_metatype_id Class Reference

Identifier for `node_metatypes`. More...

`#include <openvrml/node.h>`

List of all members.

## Public Member Functions
| node_metatype_id (const char *id) throw ( std::invalid_argument , std::bad_alloc )
| Construct from a `const char *`.
| node_metatype_id (const std::string &id) throw ( std::invalid_argument , std::bad_alloc )
| Construct from a `std::string`.
| operator std::string () const
| Convert to a `std::string`.
## Private Attributes
std::string | id_
| The identifier string.
## Friends
bool | operator== (const node_metatype_id &lhs, const node_metatype_id &rhs) throw ()
## Related Functions
(Note that these are not member functions.)
bool | operator== (const node_metatype_id &lhs, const node_metatype_id &rhs) throw()
bool | operator!= (const node_metatype_id &lhs, const node_metatype_id &rhs) throw()

## Detailed Description

Identifier for `node_metatypes`.

`node_metatype` identifiers take the following form:

     absolute-uri ['#' proto-id ['#' proto-id [...]]]

A `node_metatype` identifier is basically like an absolute URI; except the fragment identifier syntax has been extended to support referring to nested `PROTOs`.

For example, supposing the following VRML world resides at `http://example.com/example.wrl`:

     #VRML V2.0 utf8

     PROTO Outer [] {
       PROTO Inner [] { Group {} }
       Group {}
     }

The `node_metatype_id` string for `Outer` would be `http://example.com/example.wrl#Outer`; and for `Inner`, `http://example.com/example.wrl#Outer#Inner`.

## Constructor & Destructor Documentation

openvrml::node_metatype_id::node_metatype_id | ( | const char * | id | ) | throw ( std::invalid_argument , std::bad_alloc )

Construct from a `const char *`.

Parameters:

  `[in]` | id | the identifier.

Exceptions:

  | std::invalid_argument | if `id` is not a valid `node_metatype` identifier.
  | std::bad_alloc | if memory allocation fails.

openvrml::node_metatype_id::node_metatype_id | ( | const std::string & | id | ) | throw ( std::invalid_argument , std::bad_alloc )

Construct from a `std::string`.

Parameters:

  `[in]` | id | the identifier.

Exceptions:

  | std::invalid_argument | if `id` is not a valid `node_metatype` identifier.
  | std::bad_alloc | if memory allocation fails.

## Member Function Documentation

openvrml::node_metatype_id::operator std::string | ( |  | ) | const

Convert to a `std::string`.

Returns:
  the `node_metatype` identifier as a `std::string`.

## Friends And Related Function Documentation

bool operator== | ( | const node_metatype_id & | lhs,
|  | const node_metatype_id & | rhs |
| ) |  |  | throw()`[related]`

Parameters:

  `[in]` | lhs |
  `[in]` | rhs |

Returns:
  `true` if `lhs` and `rhs` are equal, `false` otherwise.

bool operator!= | ( | const node_metatype_id & | lhs,
|  | const node_metatype_id & | rhs |
| ) |  |  | throw()`[related]`

Parameters:

  `[in]` | lhs |
  `[in]` | rhs |

Returns:
  `true` if `lhs` and `rhs` are not equal, `false` otherwise.

## Member Data Documentation

std::string openvrml::node_metatype_id::id_`[private]`

The identifier string.

For internal use only.