openvrml::mffloat Class Reference
A float array node field value.
More...
#include <openvrml/field_value.h>
List of all members.
Detailed Description
A float array node field value.
- Model of
- Field Value
Member Typedef Documentation
Constructor & Destructor Documentation
openvrml::mffloat::mffloat |
( |
std::vector< float >::size_type |
n = 0 , |
|
|
float |
value = 0.0f | |
|
) |
| | throw ( std::bad_alloc ) [explicit] |
Construct.
Creates an mffloat
with n
copies of value
.
- Parameters:
-
[in] | n | the number of elements in the mffloat . |
[in] | value | used to initialize the mffloat . |
- Exceptions:
-
| std::bad_alloc | if memory allocation fails. |
- Postcondition:
- size is
n
. Every element is a copy of value
.
openvrml::mffloat::mffloat |
( |
const value_type & |
value |
) |
throw ( std::bad_alloc ) [inline, explicit] |
Construct.
- Parameters:
-
[in] | value | initial value. |
- Exceptions:
-
| std::bad_alloc | if memory allocation fails. |
openvrml::mffloat::mffloat |
( |
const mffloat & |
mff |
) |
|
Construct a copy.
- Parameters:
-
[in] | mff | the instance to copy. |
openvrml::mffloat::~mffloat |
( |
|
) |
throw () [virtual] |
Destroy.
Each of the mffloat
's value elements is destroyed, and memory allocated for them (if any) is deallocated.
Member Function Documentation
Assign.
- Parameters:
-
[in] | mff | the value to assign. |
- Returns:
- a reference to the instance.
- Exceptions:
-
| std::bad_alloc | if memory allocation fails. |
void openvrml::mffloat::value |
( |
const value_type & |
val |
) |
throw ( std::bad_alloc ) |
Mutate.
- Parameters:
-
- Exceptions:
-
| std::bad_alloc | if memory allocation fails. |
void openvrml::mffloat::swap |
( |
mffloat & |
mff |
) |
throw () |
Swap.
- Parameters:
-
[in,out] | mff | the value to swap with this one. |
std::auto_ptr< openvrml::field_value > openvrml::mffloat::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.
- Returns:
- a reference to the object.
- Exceptions:
-
| std::bad_cast | if value is not an mffloat object. |
| std::bad_alloc | if memory allocation fails. |
void openvrml::mffloat::print |
( |
std::ostream & |
out |
) |
const [private, virtual] |
Friends And Related Function Documentation
bool operator== |
( |
const mffloat & |
lhs, |
|
|
const mffloat & |
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 mffloat & |
lhs, |
|
|
const mffloat & |
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