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

# openvrml::color_node Class Reference

Abstract base class for color nodes. More...

`#include <openvrml/node.h>`

Inheritance diagram for openvrml::color_node:
[legend]

List of all members.

## Public Member Functions
virtual | ~color_node ()=0 throw ()
| Destroy.
const std::vector < openvrml::color > & | color () const throw ()
| Get the color array encapsulated by this node.
## Protected Member Functions
| color_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope) throw ()
| Construct.
## Private Member Functions
virtual color_node * | to_color () throw ()
| Cast to a `color_node`.
virtual const std::vector < openvrml::color > & | do_color () const =0 throw ()
| Get the color array encapsulated by this node.

## Detailed Description

Abstract base class for color nodes.

## Constructor & Destructor Documentation

openvrml::color_node::~color_node | ( |  | ) | throw ()`[pure virtual]`

Destroy.

openvrml::color_node::color_node | ( | const node_type & | type,
|  | const boost::shared_ptr< openvrml::scope > & | scope |
| ) |  |  | throw ()`[protected]`

Construct.

Parameters:

  `[in]` | type | the `node_type` associated with the node.
  `[in]` | scope | the scope the node belongs to.

## Member Function Documentation

const std::vector< openvrml::color > & openvrml::color_node::color | ( |  | ) | const throw ()

Get the color array encapsulated by this node.

This function delegates to `do_color`.

Returns:
  the color array for this node.

openvrml::color_node * openvrml::color_node::to_color | ( |  | ) | throw ()`[private, virtual]`

Cast to a `color_node`.

Returns:
  a pointer to this `color_node`.

Reimplemented from openvrml::node.

const std::vector< openvrml::color > & openvrml::color_node::do_color | ( |  | ) | const throw ()`[private, pure virtual]`

Get the color array encapsulated by this node.

Returns:
  the color array for this node.