openvrml::sfcolor Class Reference
A color node field value.
More...
#include <openvrml/field_value.h>
List of all members.
Detailed Description
A color node field value.
- Model of
- Field Value
Member Typedef Documentation
Constructor & Destructor Documentation
openvrml::sfcolor::sfcolor |
( |
const value_type & |
value = color() |
) |
throw () [explicit] |
Construct.
- Parameters:
-
[in] | value | initial value. |
openvrml::sfcolor::sfcolor |
( |
const sfcolor & |
sfc |
) |
|
Construct a copy.
- Parameters:
-
[in] | sfc | the instance to copy. |
openvrml::sfcolor::~sfcolor |
( |
|
) |
throw () [virtual] |
Member Function Documentation
Assign.
- Parameters:
-
[in] | sfc | the value to assign. |
- Returns:
- a reference to the instance.
- Exceptions:
-
| std::bad_alloc | if memory allocation fails. |
void openvrml::sfcolor::value |
( |
const value_type & |
val |
) |
throw ( std::bad_alloc ) |
Mutate.
- Parameters:
-
- Exceptions:
-
| std::bad_alloc | if memory allocation fails. |
void openvrml::sfcolor::swap |
( |
sfcolor & |
sfc |
) |
throw () |
Swap.
- Parameters:
-
[in,out] | sfc | the value to swap with this one. |
std::auto_ptr< openvrml::field_value > openvrml::sfcolor::do_clone |
( |
|
) |
const throw ( std::bad_alloc ) [private, virtual] |
Polymorphically construct a copy.
- Returns:
- a pointer to a copy of the object.
- Exceptions:
-
| std::bad_alloc | if memory allocation fails. |
Implements openvrml::field_value.
Virtual assignment.
- Parameters:
-
[in] | value | the new value to give the object. |
- Returns:
- a reference to the object.
- Exceptions:
-
| std::bad_cast | if value is not an SFColor. |
void openvrml::sfcolor::print |
( |
std::ostream & |
out |
) |
const [private, virtual] |
Friends And Related Function Documentation
bool operator== |
( |
const sfcolor & |
lhs, |
|
|
const sfcolor & |
rhs | |
|
) |
| | throw() [related] |
Compare for equality.
- Parameters:
-
[in] | lhs | left-hand operand. |
[in] | rhs | right-hand operand. |
- Returns:
true
if lhs
and rhs
have the same value; false
otherwise.
bool operator!= |
( |
const sfcolor & |
lhs, |
|
|
const sfcolor & |
rhs | |
|
) |
| | throw() [related] |
Compare for inequality.
- Parameters:
-
[in] | lhs | left-hand operand. |
[in] | rhs | right-hand operand. |
- Returns:
true
if lhs
and rhs
do not have the same value; false
otherwise.
Swap the values of a
and b
.
Does not throw.
- Parameters:
-
Member Data Documentation