#include <vCollection.h>
Public Member Functions | |
ColPickOne (BasePtr child=BasePtr(new Base())) | |
ColPickOne (const ColPickOne &other) | |
virtual | ~ColPickOne () |
Base * | copy (void) const |
Returns an exact copy of this object. | |
Protected Member Functions | |
virtual myCol | _operation (void) const |
Definition at line 161 of file vCollection.h.
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) { };
vValue::Expr::Collection::ColPickOne::ColPickOne | ( | const ColPickOne & | other | ) | [inline] |
virtual vValue::Expr::Collection::ColPickOne::~ColPickOne | ( | ) | [inline, virtual] |
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
Reimplemented from vValue::Expr::Collection::ColUnary.
Definition at line 168 of file vCollection.h.
References ColPickOne().
00168 { return new ColPickOne(*this); };
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 }