vValue::Expr::Collection::ColNode Class Reference

#include <vCollection.h>

Inheritance diagram for vValue::Expr::Collection::ColNode:

Inheritance graph
[legend]
Collaboration diagram for vValue::Expr::Collection::ColNode:

Collaboration graph
[legend]

List of all members.

Public Member Functions

template<typename InputIterator>
 ColNode (InputIterator begin, InputIterator end)
 Specialised constructor from iterators.
 ColNode (BaseExt const &other)
 ColNode (ColNode const &other)
virtual ~ColNode ()
Basecopy (void) const
 Returns an exact copy of this object.
virtual Variant GetValue (void) const
 Returns the value in its native format.
virtual int GetInt (void) const
 Returns an integer using the current value.
virtual float GetFloat (void) const
 Returns a float using the current value.
myCol GetCol (void) const
bool operator== (Base const &other) const
 compares two values
bool operator!= (Base const &other) const
 compares two values
bool operator>= (Base const &other) const
 compares two values
bool operator<= (Base const &other) const
 compares two values
bool operator> (Base const &other) const
 compares two values
bool operator< (Base const &other) const
 compares two values

Protected Attributes

myCol m_col


Detailed Description

Definition at line 80 of file vCollection.h.


Constructor & Destructor Documentation

template<typename InputIterator>
vValue::Expr::Collection::ColNode::ColNode ( InputIterator  begin,
InputIterator  end 
) [inline]

Specialised constructor from iterators.

Definition at line 86 of file vCollection.h.

Referenced by copy().

Here is the caller graph for this function:

vValue::Expr::Collection::ColNode::ColNode ( BaseExt const &  other  )  [inline]

Definition at line 90 of file vCollection.h.

00090 : BaseExt(other), m_col() { };

vValue::Expr::Collection::ColNode::ColNode ( ColNode const &  other  )  [inline]

Definition at line 91 of file vCollection.h.

00091 : BaseExt(other), m_col(other.m_col) { };

virtual vValue::Expr::Collection::ColNode::~ColNode (  )  [inline, virtual]

Definition at line 92 of file vCollection.h.

00092 { };


Member Function Documentation

Base* vValue::Expr::Collection::ColNode::copy ( void   )  const [inline, virtual]

Returns an exact copy of this object.

This should be overwritten in any derived class or they will mysteriously vanish if you use the tValue::Set container, for example

Returns:
a pointer to the newly created copy

Reimplemented from vValue::Expr::Collection::BaseExt.

Definition at line 94 of file vCollection.h.

References ColNode().

00094 { return new ColNode(*this); };

Here is the call graph for this function:

Variant vValue::Expr::Collection::ColNode::GetValue ( void   )  const [virtual]

Returns the value in its native format.

Reimplemented from vValue::Expr::Core::Base.

Definition at line 43 of file vCollection.cpp.

References m_col.

00043 { return (*m_col.begin())->GetValue(); }

int vValue::Expr::Collection::ColNode::GetInt ( void   )  const [virtual]

Returns an integer using the current value.

This should be overwritten in a derived class if it's sensible to convert the value to an integer

Returns:
0

Reimplemented from vValue::Expr::Core::Base.

Definition at line 44 of file vCollection.cpp.

References m_col.

00044 { return (*m_col.begin())->GetInt(); }

float vValue::Expr::Collection::ColNode::GetFloat ( void   )  const [virtual]

Returns a float using the current value.

This should be overwritten in a derived class if it's sensible to convert the value to a floating- point number

Returns:
a stream conversion of the value

Reimplemented from vValue::Expr::Core::Base.

Definition at line 45 of file vCollection.cpp.

References m_col.

00045 { return (*m_col.begin())->GetFloat(); }

myCol vValue::Expr::Collection::ColNode::GetCol ( void   )  const [virtual]

Convert the stored data into a collection.

Returns:
a collection of at least 1.

Reimplemented from vValue::Expr::Collection::BaseExt.

Definition at line 46 of file vCollection.cpp.

References m_col.

00046 { return m_col; }

bool vValue::Expr::Collection::ColNode::operator== ( Base const &  other  )  const [virtual]

compares two values

Reimplemented from vValue::Expr::Core::Base.

Definition at line 55 of file vCollection.cpp.

References m_col.

00055                                                 {
00056     //    return m_col == static_cast<myCol >(other);
00057     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00058     return m_col == static_cast<myCol >(*baseExt) ;
00059 }

bool vValue::Expr::Collection::ColNode::operator!= ( Base const &  other  )  const [virtual]

compares two values

Reimplemented from vValue::Expr::Core::Base.

Definition at line 60 of file vCollection.cpp.

References m_col.

00060                                                 {
00061     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00062     return m_col != static_cast<myCol >(*baseExt);
00063 }

bool vValue::Expr::Collection::ColNode::operator>= ( Base const &  other  )  const [virtual]

compares two values

Reimplemented from vValue::Expr::Core::Base.

Definition at line 64 of file vCollection.cpp.

References m_col.

00064                                                 {
00065     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00066     return m_col >= static_cast<myCol >(*baseExt);
00067 }

bool vValue::Expr::Collection::ColNode::operator<= ( Base const &  other  )  const [virtual]

compares two values

Reimplemented from vValue::Expr::Core::Base.

Definition at line 68 of file vCollection.cpp.

00068                                                 {
00069     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00070     return m_col <= static_cast<myCol >(*baseExt);
00071 }

bool vValue::Expr::Collection::ColNode::operator> ( Base const &  other  )  const [virtual]

compares two values

Reimplemented from vValue::Expr::Core::Base.

Definition at line 72 of file vCollection.cpp.

References m_col.

00072                                                 {
00073     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00074     return m_col >  static_cast<myCol >(*baseExt);
00075 }

bool vValue::Expr::Collection::ColNode::operator< ( Base const &  other  )  const [virtual]

compares two values

Reimplemented from vValue::Expr::Core::Base.

Definition at line 76 of file vCollection.cpp.

00076                                                 {
00077     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00078     return m_col <  static_cast<myCol >(*baseExt);
00079 }


Member Data Documentation

myCol vValue::Expr::Collection::ColNode::m_col [protected]

Definition at line 82 of file vCollection.h.

Referenced by GetCol(), GetFloat(), GetInt(), GetValue(), operator!=(), operator==(), operator>(), and operator>=().


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:05:36 2008 for Armagetron Advanced by  doxygen 1.5.4