vValue::Expr::Collection::ColUnary Class Reference

#include <vCollection.h>

Inheritance diagram for vValue::Expr::Collection::ColUnary:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ColUnary (BasePtr child)
 ColUnary (const ColUnary &other)
virtual ~ColUnary ()
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 Member Functions

virtual myCol _operation (void) const

Protected Attributes

BasePtr m_child


Detailed Description

Definition at line 125 of file vCollection.h.


Constructor & Destructor Documentation

vValue::Expr::Collection::ColUnary::ColUnary ( BasePtr  child  )  [inline]

Definition at line 129 of file vCollection.h.

Referenced by copy().

00129 : BaseExt(), m_child(child) { };

Here is the caller graph for this function:

vValue::Expr::Collection::ColUnary::ColUnary ( const ColUnary other  )  [inline]

Definition at line 131 of file vCollection.h.

00131 : BaseExt(), m_child(other.m_child->copy()) { };

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

Definition at line 132 of file vCollection.h.

00132 { };


Member Function Documentation

Base* vValue::Expr::Collection::ColUnary::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.

Reimplemented in vValue::Expr::Collection::ColPickOne.

Definition at line 134 of file vCollection.h.

References ColUnary().

00134 { return new ColUnary(*this); };

Here is the call graph for this function:

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

Returns the value in its native format.

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

Definition at line 82 of file vCollection.cpp.

References _operation().

00082 { return (*_operation().begin())->GetValue(); }

Here is the call graph for this function:

int vValue::Expr::Collection::ColUnary::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 83 of file vCollection.cpp.

References _operation().

00083 { return (*_operation().begin())->GetInt(); }

Here is the call graph for this function:

float vValue::Expr::Collection::ColUnary::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 84 of file vCollection.cpp.

References _operation().

00084 { return (*_operation().begin())->GetFloat(); }

Here is the call graph for this function:

myCol vValue::Expr::Collection::ColUnary::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 85 of file vCollection.cpp.

References _operation().

00085 { return _operation(); }

Here is the call graph for this function:

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

compares two values

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

Definition at line 87 of file vCollection.cpp.

References _operation().

00087                                                  {
00088     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00089     return _operation() == static_cast<myCol >(*baseExt);
00090 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 91 of file vCollection.cpp.

References _operation().

00091                                                  {
00092     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00093     return _operation() != static_cast<myCol >(*baseExt);
00094 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 95 of file vCollection.cpp.

References _operation().

00095                                                  {
00096     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00097     return _operation() >= static_cast<myCol >(*baseExt);
00098 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 99 of file vCollection.cpp.

References _operation().

00099                                                  {
00100     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00101     return _operation() <= static_cast<myCol >(*baseExt);
00102 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 103 of file vCollection.cpp.

References _operation().

00103                                                  {
00104     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00105     return _operation() >  static_cast<myCol >(*baseExt);
00106 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 107 of file vCollection.cpp.

References _operation().

00107                                                  {
00108     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00109     return _operation() <  static_cast<myCol >(*baseExt);
00110 }

Here is the call graph for this function:

virtual myCol vValue::Expr::Collection::ColUnary::_operation ( void   )  const [inline, protected, virtual]

Reimplemented in vValue::Expr::Collection::ColPickOne.

Definition at line 148 of file vCollection.h.

References vValue::Expr::Collection::BaseExt::GetCol(), and m_child.

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

00148                                          {
00149         //      return m_child->GetCol();
00150         Base *base = m_child->copy();
00151         BaseExt const *baseExt = dynamic_cast<BaseExt*>(base);
00152         return baseExt->GetCol();
00153     };

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

BasePtr vValue::Expr::Collection::ColUnary::m_child [protected]

Definition at line 127 of file vCollection.h.

Referenced by _operation(), and vValue::Expr::Collection::ColPickOne::_operation().


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