vValue::Expr::Collection::ColBinary Class Reference

#include <vCollection.h>

Inheritance diagram for vValue::Expr::Collection::ColBinary:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ColBinary (BaseExt *r_value=new BaseExt, BaseExt *l_value=new BaseExt)
 ColBinary (BasePtr &r_value, BasePtr &l_value)
 ColBinary (const ColBinary &other)
virtual ~ColBinary ()
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 r_child
BasePtr l_child


Detailed Description

Definition at line 191 of file vCollection.h.


Constructor & Destructor Documentation

vValue::Expr::Collection::ColBinary::ColBinary ( BaseExt r_value = new BaseExt,
BaseExt l_value = new BaseExt 
) [inline]

Definition at line 197 of file vCollection.h.

Referenced by copy().

00198                                                :
00199             r_child(r_value),
00200             l_child(l_value)
00201     { };
    ColBinary(BasePtr &r_value,

Here is the caller graph for this function:

vValue::Expr::Collection::ColBinary::ColBinary ( BasePtr &  r_value,
BasePtr &  l_value 
) [inline]

Definition at line 202 of file vCollection.h.

00203                                :
00204             r_child(r_value),
00205             l_child(l_value)
00206     { };
    ColBinary(const ColBinary &other) :

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

Definition at line 207 of file vCollection.h.

00207                                       :
00208             BaseExt(other),
00209             r_child(other.r_child->copy()),
00210             l_child(other.l_child->copy())
00211     { };
    virtual ~ColBinary() { };

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

Definition at line 212 of file vCollection.h.

00212 { };


Member Function Documentation

Base* vValue::Expr::Collection::ColBinary::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::ColUnion, vValue::Expr::Collection::ColIntersection, and vValue::Expr::Collection::ColDifference.

Definition at line 214 of file vCollection.h.

References ColBinary().

00214 { return new ColBinary(*this); };

Here is the call graph for this function:

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

Returns the value in its native format.

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

Definition at line 174 of file vCollection.cpp.

References _operation().

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

Here is the call graph for this function:

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

References _operation().

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

Here is the call graph for this function:

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

References _operation().

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

Here is the call graph for this function:

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

References _operation().

00177 { return _operation(); }

Here is the call graph for this function:

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

compares two values

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

Definition at line 149 of file vCollection.cpp.

References _operation().

00149                                                   {
00150     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00151     return _operation() == static_cast<myCol >(*baseExt);
00152 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 153 of file vCollection.cpp.

References _operation().

00153                                                   {
00154     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00155     return _operation() != static_cast<myCol >(*baseExt);
00156 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 157 of file vCollection.cpp.

References _operation().

00157                                                   {
00158     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00159     return _operation() >= static_cast<myCol >(*baseExt);
00160 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 161 of file vCollection.cpp.

References _operation().

00161                                                   {
00162     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00163     return _operation() <= static_cast<myCol >(*baseExt);
00164 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 165 of file vCollection.cpp.

References _operation().

00165                                                   {
00166     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00167     return _operation() >  static_cast<myCol >(*baseExt);
00168 }

Here is the call graph for this function:

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

compares two values

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

Definition at line 169 of file vCollection.cpp.

References _operation().

00169                                                   {
00170     BaseExt const *baseExt = dynamic_cast<BaseExt*>(const_cast<Base*>(&other));
00171     return _operation() <  static_cast<myCol >(*baseExt);
00172 }

Here is the call graph for this function:

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

Reimplemented in vValue::Expr::Collection::ColUnion, vValue::Expr::Collection::ColIntersection, and vValue::Expr::Collection::ColDifference.

Definition at line 133 of file vCollection.cpp.

References a, b, vValue::Expr::Collection::getCol(), l_child, and r_child.

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

00133                                       {
00134     myCol res;
00135 
00136     myCol a = getCol(ColBinary::r_child);
00137     myCol b = getCol(ColBinary::l_child);
00138 
00139     set_union(a.begin(),
00140               a.end(),
00141               b.begin(),
00142               b.end(),
00143               inserter(res, res.begin()),
00144               FooPtrOps());
00145 
00146     return res;
00147 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

BasePtr vValue::Expr::Collection::ColBinary::r_child [protected]

Definition at line 193 of file vCollection.h.

Referenced by vValue::Expr::Collection::ColDifference::_operation(), vValue::Expr::Collection::ColIntersection::_operation(), vValue::Expr::Collection::ColUnion::_operation(), and _operation().

BasePtr vValue::Expr::Collection::ColBinary::l_child [protected]

Definition at line 194 of file vCollection.h.

Referenced by vValue::Expr::Collection::ColDifference::_operation(), vValue::Expr::Collection::ColIntersection::_operation(), vValue::Expr::Collection::ColUnion::_operation(), and _operation().


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