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