vValue::Expr::Collection::ColPickOne Class Reference

#include <vCollection.h>

Inheritance diagram for vValue::Expr::Collection::ColPickOne:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ColPickOne (BasePtr child=BasePtr(new Base()))
 ColPickOne (const ColPickOne &other)
virtual ~ColPickOne ()
Basecopy (void) const
 Returns an exact copy of this object.

Protected Member Functions

virtual myCol _operation (void) const


Detailed Description

Definition at line 161 of file vCollection.h.


Constructor & Destructor Documentation

vValue::Expr::Collection::ColPickOne::ColPickOne ( BasePtr  child = BasePtr( new Base() )  )  [inline]

Definition at line 163 of file vCollection.h.

Referenced by copy().

00163 : ColUnary(child) { };

Here is the caller graph for this function:

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

Definition at line 165 of file vCollection.h.

00165 : ColUnary(other) { };

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

Definition at line 166 of file vCollection.h.

00166 { };


Member Function Documentation

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

Definition at line 168 of file vCollection.h.

References ColPickOne().

00168 { return new ColPickOne(*this); };

Here is the call graph for this function:

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

Reimplemented from vValue::Expr::Collection::ColUnary.

Definition at line 113 of file vCollection.cpp.

References asdf, vValue::Expr::Collection::getCol(), and vValue::Expr::Collection::ColUnary::m_child.

00114 {
00115     myCol ijk = getCol(ColUnary::m_child);
00116 
00117     myCol tempCol;
00118     int number = ijk.size();
00119     if(number != 0) {
00120         int ran = number / 2;
00121 
00122         myCol::iterator iter = ijk.begin();
00123         int i=0;
00124         for (i=0; i<ran; i++)
00125             ++iter;
00126         BasePtr asdf((*iter)->copy());
00127         tempCol.insert(asdf);
00128     }
00129     return tempCol;
00130 }

Here is the call graph for this function:


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