#include <variant.h>
Collaboration diagram for casac::variant:

Definition at line 12 of file variant.h.
Public Types | |
| enum | TYPE |
Public Member Functions | |
| variant * | clone () const |
| int | compare (const variant *) const |
| variant () | |
| variant (const variant &) | |
| variant (bool arg) | |
| variant (int arg) | |
| variant (double arg) | |
| variant (std::complex< double > arg) | |
| variant (const char *arg) | |
| variant (const std::string &arg) | |
| variant (const std::vector< bool > &arg) | |
| variant (const std::vector< bool > &arg, const std::vector< int > &theshape) | |
| variant (std::vector< bool > *arg) | |
| variant (std::vector< bool > *arg, std::vector< int > &theshape) | |
| variant (const std::vector< int > &arg) | |
| variant (const std::vector< int > &arg, const std::vector< int > &theshape) | |
| variant (std::vector< int > *arg) | |
| variant (std::vector< int > *arg, std::vector< int > &theshape) | |
| variant (const std::vector< double > &arg) | |
| variant (const std::vector< double > &arg, const std::vector< int > &theshape) | |
| variant (std::vector< double > *arg) | |
| variant (std::vector< double > *arg, std::vector< int > &theshape) | |
| variant (const std::vector< std::complex< double > > &arg) | |
| variant (const std::vector< std::complex< double > > &arg, const std::vector< int > &theshape) | |
| variant (std::vector< std::complex< double > > *arg) | |
| variant (std::vector< std::complex< double > > *arg, std::vector< int > &theshape) | |
| variant (const std::vector< std::string > &arg, const std::vector< int > &theshape) | |
| variant (const std::vector< std::string > &arg) | |
| variant (std::vector< std::string > *arg) | |
| variant (std::vector< std::string > *arg, std::vector< int > &theshape) | |
| variant (record &arg) | |
| variant (record *arg) | |
| ~variant () | |
| bool | toBool () const |
| int | toInt () const |
| double | toDouble () const |
| std::complex< double > | toComplex () const |
| std::string | toString (bool no_brackets=false) const |
| std::vector< bool > | toBoolVec () const |
| std::vector< int > | toIntVec () const |
| std::vector< double > | toDoubleVec () const |
| std::vector< std::complex< double > > | toComplexVec () const |
| std::vector< std::string > | toStringVec () const |
| bool & | asBool () |
| Yet to be implemented. | |
| int & | asInt () |
| double & | asDouble () |
| std::complex< double > & | asComplex () |
| std::string & | asString () |
| std::vector< int > & | asIntVec (int size=-1) |
| std::vector< bool > & | asBoolVec (int size=-1) |
| std::vector< double > & | asDoubleVec (int size=-1) |
| std::vector< std::complex< double > > & | asComplexVec (int size=-1) |
| std::vector< std::string > & | asStringVec (int size=-1) |
| casac::record & | asRecord () |
| void | as (TYPE t, int size=-1) |
| const bool | getBool () const throw (error) |
| Const ---------------------------------------------------. | |
| const int | getInt () const throw (error) |
| const double | getDouble () const throw (error) |
| const std::complex< double > & | getComplex () const throw (error) |
| const std::string & | getString () const throw (error) |
| const std::vector< int > & | getIntVec () const throw (error) |
| const std::vector< bool > & | getBoolVec () const throw (error) |
| const std::vector< double > & | getDoubleVec () const throw (error) |
| const std::vector< std::complex< double > > & | getComplexVec () const throw (error) |
| const std::vector< std::string > & | getStringVec () const throw (error) |
| const record & | getRecord () const throw (error) |
| const std::vector< int > & | shape () const |
| const std::vector< int > & | arrayshape () const |
| bool & | getBoolMod () throw (error) |
| Modify ---------------------------------------------------. | |
| int & | getIntMod () throw (error) |
| double & | getDoubleMod () throw (error) |
| std::complex< double > & | getComplexMod () throw (error) |
| std::string & | getStringMod () throw (error) |
| std::vector< int > & | getIntVecMod () throw (error) |
| std::vector< bool > & | getBoolVecMod () throw (error) |
| std::vector< double > & | getDoubleVecMod () throw (error) |
| std::vector< std::complex< double > > & | getComplexVecMod () throw (error) |
| std::vector< std::string > & | getStringVecMod () throw (error) |
| record & | getRecordMod () throw (error) |
| std::vector< int > & | shape () |
| std::vector< int > & | arrayshape () |
| const std::string & | typeString () const |
| TYPE | type () const |
| void | push (bool, bool conform=true) |
| void | push (int, bool conform=true) |
| void | push (double, bool conform=true) |
| void | push (std::complex< double >, bool conform=true) |
| void | push (const std::string &, bool conform=true) |
| void | place (bool, unsigned int index, bool conform=true) |
| void | place (int, unsigned int index, bool conform=true) |
| void | place (double, unsigned int index, bool conform=true) |
| void | place (std::complex< double >, unsigned int index, bool conform=true) |
| void | place (const std::string &, unsigned int index, bool conform=true) |
| int | size () const |
| void | resize (int size) |
Static Public Member Functions | |
| static TYPE | compatible_type (TYPE one, TYPE two) |
Private Member Functions | |
| int | shape_size () const |
| what size does the shape imply | |
| int | vec_size () const |
| std::string | create_message (const std::string s) const |
Private Attributes | |
| TYPE | typev |
| union { | |
| bool b | |
| std::vector< bool > * bv | |
| int i | |
| std::vector< int > * iv | |
| double d | |
| std::vector< double > * dv | |
| std::complex< double > * c | |
| std::vector< std::complex< double > > * cv | |
| std::string * s | |
| std::vector< std::string > * sv | |
| record * recordv | |
| } | val |
| std::vector< int > | shape_ |
Static Private Attributes | |
| static unsigned int | record_id_count |
| 4294967295 | |
Classes | |
| class | error |
| class | overflow |
| enum casac::variant::TYPE |
| casac::variant::variant | ( | ) |
Referenced by clone().
| casac::variant::variant | ( | const variant & | ) |
| casac::variant::variant | ( | bool | arg | ) | [inline] |
| casac::variant::variant | ( | int | arg | ) | [inline] |
| casac::variant::variant | ( | double | arg | ) | [inline] |
| casac::variant::variant | ( | std::complex< double > | arg | ) | [inline] |
| casac::variant::variant | ( | const char * | arg | ) | [inline] |
| casac::variant::variant | ( | const std::string & | arg | ) | [inline] |
| casac::variant::variant | ( | const std::vector< bool > & | arg | ) | [inline] |
| casac::variant::variant | ( | const std::vector< bool > & | arg, | |
| const std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | std::vector< bool > * | arg | ) | [inline] |
| casac::variant::variant | ( | std::vector< bool > * | arg, | |
| std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | const std::vector< int > & | arg | ) | [inline] |
| casac::variant::variant | ( | const std::vector< int > & | arg, | |
| const std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | std::vector< int > * | arg | ) | [inline] |
| casac::variant::variant | ( | std::vector< int > * | arg, | |
| std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | const std::vector< double > & | arg | ) | [inline] |
| casac::variant::variant | ( | const std::vector< double > & | arg, | |
| const std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | std::vector< double > * | arg | ) | [inline] |
| casac::variant::variant | ( | std::vector< double > * | arg, | |
| std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | const std::vector< std::complex< double > > & | arg | ) | [inline] |
| casac::variant::variant | ( | const std::vector< std::complex< double > > & | arg, | |
| const std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | std::vector< std::complex< double > > * | arg | ) | [inline] |
| casac::variant::variant | ( | std::vector< std::complex< double > > * | arg, | |
| std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | const std::vector< std::string > & | arg, | |
| const std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | const std::vector< std::string > & | arg | ) | [inline] |
| casac::variant::variant | ( | std::vector< std::string > * | arg | ) | [inline] |
| casac::variant::variant | ( | std::vector< std::string > * | arg, | |
| std::vector< int > & | theshape | |||
| ) | [inline] |
| casac::variant::variant | ( | record & | arg | ) |
| casac::variant::variant | ( | record * | arg | ) |
| casac::variant::~variant | ( | ) |
| variant* casac::variant::clone | ( | ) | const [inline] |
| int casac::variant::compare | ( | const variant * | ) | const |
| bool casac::variant::toBool | ( | ) | const |
| int casac::variant::toInt | ( | ) | const |
| double casac::variant::toDouble | ( | ) | const |
| std::complex<double> casac::variant::toComplex | ( | ) | const |
| std::string casac::variant::toString | ( | bool | no_brackets = false |
) | const |
| std::vector<bool> casac::variant::toBoolVec | ( | ) | const |
| std::vector<int> casac::variant::toIntVec | ( | ) | const |
| std::vector<double> casac::variant::toDoubleVec | ( | ) | const |
| std::vector<std::complex<double> > casac::variant::toComplexVec | ( | ) | const |
| std::vector<std::string> casac::variant::toStringVec | ( | ) | const |
| bool& casac::variant::asBool | ( | ) |
Yet to be implemented.
Modify ---------------------------------------------------
| int& casac::variant::asInt | ( | ) |
| double& casac::variant::asDouble | ( | ) |
| std::complex<double>& casac::variant::asComplex | ( | ) |
| std::string& casac::variant::asString | ( | ) |
| std::vector<int>& casac::variant::asIntVec | ( | int | size = -1 |
) |
| std::vector<bool>& casac::variant::asBoolVec | ( | int | size = -1 |
) |
| std::vector<double>& casac::variant::asDoubleVec | ( | int | size = -1 |
) |
| std::vector<std::complex<double> >& casac::variant::asComplexVec | ( | int | size = -1 |
) |
| std::vector<std::string>& casac::variant::asStringVec | ( | int | size = -1 |
) |
| casac::record& casac::variant::asRecord | ( | ) |
| void casac::variant::as | ( | TYPE | t, | |
| int | size = -1 | |||
| ) |
| const bool casac::variant::getBool | ( | ) | const throw (error) |
Const ---------------------------------------------------.
| const int casac::variant::getInt | ( | ) | const throw (error) |
| const double casac::variant::getDouble | ( | ) | const throw (error) |
| const std::complex<double>& casac::variant::getComplex | ( | ) | const throw (error) |
| const std::string& casac::variant::getString | ( | ) | const throw (error) |
| const std::vector<int>& casac::variant::getIntVec | ( | ) | const throw (error) |
| const std::vector<bool>& casac::variant::getBoolVec | ( | ) | const throw (error) |
| const std::vector<double>& casac::variant::getDoubleVec | ( | ) | const throw (error) |
| const std::vector<std::complex<double> >& casac::variant::getComplexVec | ( | ) | const throw (error) |
| const std::vector<std::string>& casac::variant::getStringVec | ( | ) | const throw (error) |
| const std::vector<int>& casac::variant::shape | ( | ) | const |
Referenced by arrayshape().
| const std::vector<int>& casac::variant::arrayshape | ( | ) | const [inline] |
| bool& casac::variant::getBoolMod | ( | ) | throw (error) |
Modify ---------------------------------------------------.
| int& casac::variant::getIntMod | ( | ) | throw (error) |
| double& casac::variant::getDoubleMod | ( | ) | throw (error) |
| std::complex<double>& casac::variant::getComplexMod | ( | ) | throw (error) |
| std::string& casac::variant::getStringMod | ( | ) | throw (error) |
| std::vector<int>& casac::variant::getIntVecMod | ( | ) | throw (error) |
| std::vector<bool>& casac::variant::getBoolVecMod | ( | ) | throw (error) |
| std::vector<double>& casac::variant::getDoubleVecMod | ( | ) | throw (error) |
| std::vector<std::complex<double> >& casac::variant::getComplexVecMod | ( | ) | throw (error) |
| std::vector<std::string>& casac::variant::getStringVecMod | ( | ) | throw (error) |
| std::vector<int>& casac::variant::shape | ( | ) |
| std::vector<int>& casac::variant::arrayshape | ( | ) | [inline] |
| const std::string& casac::variant::typeString | ( | ) | const |
| TYPE casac::variant::type | ( | ) | const [inline] |
| void casac::variant::push | ( | bool | , | |
| bool | conform = true | |||
| ) |
| void casac::variant::push | ( | int | , | |
| bool | conform = true | |||
| ) |
| void casac::variant::push | ( | double | , | |
| bool | conform = true | |||
| ) |
| void casac::variant::push | ( | std::complex< double > | , | |
| bool | conform = true | |||
| ) |
| void casac::variant::push | ( | const std::string & | , | |
| bool | conform = true | |||
| ) |
| void casac::variant::place | ( | bool | , | |
| unsigned int | index, | |||
| bool | conform = true | |||
| ) |
| void casac::variant::place | ( | int | , | |
| unsigned int | index, | |||
| bool | conform = true | |||
| ) |
| void casac::variant::place | ( | double | , | |
| unsigned int | index, | |||
| bool | conform = true | |||
| ) |
| void casac::variant::place | ( | std::complex< double > | , | |
| unsigned int | index, | |||
| bool | conform = true | |||
| ) |
| void casac::variant::place | ( | const std::string & | , | |
| unsigned int | index, | |||
| bool | conform = true | |||
| ) |
| int casac::variant::size | ( | ) | const [inline] |
| void casac::variant::resize | ( | int | size | ) |
| int casac::variant::shape_size | ( | ) | const [private] |
what size does the shape imply
| int casac::variant::vec_size | ( | ) | const [private] |
Referenced by size().
| std::string casac::variant::create_message | ( | const std::string | s | ) | const [private] |
unsigned int casac::variant::record_id_count [static, private] |
TYPE casac::variant::typev [private] |
bool casac::variant::b [private] |
std::vector<bool>* casac::variant::bv [private] |
int casac::variant::i [private] |
std::vector<int>* casac::variant::iv [private] |
double casac::variant::d [private] |
std::vector<double>* casac::variant::dv [private] |
std::complex<double>* casac::variant::c [private] |
std::vector<std::complex<double> >* casac::variant::cv [private] |
std::string* casac::variant::s [private] |
std::vector<std::string>* casac::variant::sv [private] |
record* casac::variant::recordv [private] |
union { ... } casac::variant::val [private] |
Referenced by variant().
std::vector<int> casac::variant::shape_ [private] |
1.5.1