34 #ifndef DRAIN_VARIABLE_T
35 #define DRAIN_VARIABLE_T
37 #include <drain/Castable.h>
38 #include <drain/UniTuple.h>
93 typedef std::pair<const char *,const drain::VariableT<T> > init_pair_t;
99 template <
class ...TT>
159 this->assignCastable(x);
171 this->assignCastable(x);
180 this->assignCastable(x);
181 std::cerr << __FILE__ <<
':' << __FUNCTION__ <<
": ? for inner class: "<<
TypeName<T>::str() << std::endl;
192 this->assignCastable(x);
209 this->assignContainer(l,
false);
226 template <
class T2,
size_t N>
229 this->assignContainer(unituple);
247 return Castable::operator==((
const Castable &) v);
253 return Castable::operator==(x);
258 return Castable::operator==(s);
263 bool operator!=(
const VariableT<T2> & v)
const{
264 return ! Castable::operator==((
const Castable &) v);
269 bool operator!=(
const T2 &x)
const {
270 return ! Castable::operator==(x);
274 bool operator!=(
const char *x)
const {
276 return ! Castable::operator==(x);
282 void info(std::ostream & ostr = std::cout)
const {
Definition: Castable.h:76
virtual void info(std::ostream &ostr=std::cout) const
Print value, type and element count.
Definition: Castable.cpp:233
Tuple of N elements of type T.
Definition: UniTuple.h:65
VariableT is a final class applied through typedefs Variable, Reference and FlexibleVariable.
Definition: VariableT.h:87
VariableT(D &arg)
C++ bug? : Copy constructor will not catch.
Definition: VariableT.h:118
VariableT & operator=(const T &x)
Assignment of base classes (VariableLike or Castable)
Definition: VariableT.h:179
VariableT & operator=(const char *x)
Assignment of C strings. [Obligatory].
Definition: VariableT.h:220
VariableT & operator=(const VariableT< T2 > &x)
Assignment of objects of similar classes.
Definition: VariableT.h:170
void info(std::ostream &ostr=std::cout) const
Redefine for "ambivalent" FlexibleVariable: indicate if local or ref.
Definition: VariableT.h:282
virtual bool suggestType(const std::type_info &t)
Sets type, only if unset, and object is not a Reference.
Definition: FlexibleVariable.cpp:60
VariableT & operator=(const VariableT< T > &x)
Assignment of objects of the same class.
Definition: VariableT.h:158
virtual bool requestType(const std::type_info &t)
Sets or changes the type if possible - that is, object is not a Reference.
Definition: FlexibleVariable.cpp:48
VariableT & operator=(const Castable &x)
Assignment of objects of the same class.
Definition: VariableT.h:191
bool operator==(const VariableT< T2 > &v) const
debugging
Definition: VariableT.h:246
virtual bool requestSize(size_t elementCount)
Change the array size, if For Castable (and Reference) does nothing and returns false.
Definition: FlexibleVariable.cpp:70
VariableT & operator=(std::initializer_list< T2 > l)
General assignment operator.
Definition: VariableT.h:208
VariableT(const TT &...args)
Single constructor template, forwarded to init(args...) defined in base classes.
Definition: VariableT.h:101
VariableT & operator=(const T2 &x)
General assignment operator.
Definition: VariableT.h:200
Definition: DataSelector.cpp:1277