#include <vCollection.h>
Public Member Functions | |
ColUnary (BasePtr child) | |
ColUnary (const ColUnary &other) | |
virtual | ~ColUnary () |
Base * | copy (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 |
Definition at line 125 of file vCollection.h.
vValue::Expr::Collection::ColUnary::ColUnary | ( | BasePtr | child | ) | [inline] |
Definition at line 129 of file vCollection.h.
Referenced by copy().
vValue::Expr::Collection::ColUnary::ColUnary | ( | const ColUnary & | other | ) | [inline] |
virtual vValue::Expr::Collection::ColUnary::~ColUnary | ( | ) | [inline, virtual] |
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
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); };
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(); }
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
Reimplemented from vValue::Expr::Core::Base.
Definition at line 83 of file vCollection.cpp.
References _operation().
00083 { return (*_operation().begin())->GetInt(); }
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
Reimplemented from vValue::Expr::Core::Base.
Definition at line 84 of file vCollection.cpp.
References _operation().
00084 { return (*_operation().begin())->GetFloat(); }
myCol vValue::Expr::Collection::ColUnary::GetCol | ( | void | ) | const [virtual] |
Convert the stored data into a collection.
Reimplemented from vValue::Expr::Collection::BaseExt.
Definition at line 85 of file vCollection.cpp.
References _operation().
00085 { return _operation(); }
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 }
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 }
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 }
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 }
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 }
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 }
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 };
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().