casa
$Rev:20696$
|
#include <variant.h>
Classes | |
class | error |
class | overflow |
Public Types | |
enum | TYPE { RECORD, BOOL, INT, DOUBLE, COMPLEX, STRING, BOOLVEC, INTVEC, DOUBLEVEC, COMPLEXVEC, STRINGVEC } |
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) |
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 |
const char * | sig () 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 |
Referenced by clone().
casa::dbus::variant::variant | ( | const variant & | ) |
casa::dbus::variant::variant | ( | bool | arg | ) | [inline] |
Definition at line 68 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | int | arg | ) | [inline] |
Definition at line 69 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | double | arg | ) | [inline] |
Definition at line 70 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::complex< double > | arg | ) | [inline] |
Definition at line 71 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const char * | arg | ) | [inline] |
casa::dbus::variant::variant | ( | const std::string & | arg | ) | [inline] |
casa::dbus::variant::variant | ( | const std::vector< bool > & | arg | ) | [inline] |
Definition at line 77 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< bool > & | arg, |
const std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 79 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< bool > * | arg | ) | [inline] |
Definition at line 81 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< bool > * | arg, |
std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 83 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< int > & | arg | ) | [inline] |
Definition at line 86 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< int > & | arg, |
const std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 88 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< int > * | arg | ) | [inline] |
Definition at line 90 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< int > * | arg, |
std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 92 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< double > & | arg | ) | [inline] |
Definition at line 95 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< double > & | arg, |
const std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 97 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< double > * | arg | ) | [inline] |
Definition at line 99 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< double > * | arg, |
std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 101 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< std::complex< double > > & | arg | ) | [inline] |
Definition at line 104 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< std::complex< double > > & | arg, |
const std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 106 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< std::complex< double > > * | arg | ) | [inline] |
Definition at line 108 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< std::complex< double > > * | arg, |
std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 110 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< std::string > & | arg, |
const std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 113 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | const std::vector< std::string > & | arg | ) | [inline] |
Definition at line 115 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< std::string > * | arg | ) | [inline] |
Definition at line 117 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | std::vector< std::string > * | arg, |
std::vector< int > & | theshape | ||
) | [inline] |
Definition at line 119 of file variant.h.
References casa::arg(), and val.
casa::dbus::variant::variant | ( | record & | arg | ) |
casa::dbus::variant::variant | ( | record * | arg | ) |
const std::vector<int>& casa::dbus::variant::arrayshape | ( | ) | const [inline] |
std::vector<int>& casa::dbus::variant::arrayshape | ( | ) | [inline] |
void casa::dbus::variant::as | ( | TYPE | t, |
int | size = -1 |
||
) |
bool& casa::dbus::variant::asBool | ( | ) |
Yet to be implemented.
std::vector<bool>& casa::dbus::variant::asBoolVec | ( | int | size = -1 | ) |
std::complex<double>& casa::dbus::variant::asComplex | ( | ) |
std::vector<std::complex<double> >& casa::dbus::variant::asComplexVec | ( | int | size = -1 | ) |
double& casa::dbus::variant::asDouble | ( | ) |
std::vector<double>& casa::dbus::variant::asDoubleVec | ( | int | size = -1 | ) |
int& casa::dbus::variant::asInt | ( | ) |
std::vector<int>& casa::dbus::variant::asIntVec | ( | int | size = -1 | ) |
std::string& casa::dbus::variant::asString | ( | ) |
std::vector<std::string>& casa::dbus::variant::asStringVec | ( | int | size = -1 | ) |
variant* casa::dbus::variant::clone | ( | ) | const [inline] |
int casa::dbus::variant::compare | ( | const variant * | ) | const |
static TYPE casa::dbus::variant::compatible_type | ( | TYPE | one, |
TYPE | two | ||
) | [static] |
std::string casa::dbus::variant::create_message | ( | const std::string | s | ) | const [private] |
const bool casa::dbus::variant::getBool | ( | ) | const throw (error) |
bool& casa::dbus::variant::getBoolMod | ( | ) | throw (error) |
const std::vector<bool>& casa::dbus::variant::getBoolVec | ( | ) | const throw (error) |
std::vector<bool>& casa::dbus::variant::getBoolVecMod | ( | ) | throw (error) |
const std::complex<double>& casa::dbus::variant::getComplex | ( | ) | const throw (error) |
std::complex<double>& casa::dbus::variant::getComplexMod | ( | ) | throw (error) |
const std::vector<std::complex<double> >& casa::dbus::variant::getComplexVec | ( | ) | const throw (error) |
std::vector<std::complex<double> >& casa::dbus::variant::getComplexVecMod | ( | ) | throw (error) |
const double casa::dbus::variant::getDouble | ( | ) | const throw (error) |
double& casa::dbus::variant::getDoubleMod | ( | ) | throw (error) |
const std::vector<double>& casa::dbus::variant::getDoubleVec | ( | ) | const throw (error) |
std::vector<double>& casa::dbus::variant::getDoubleVecMod | ( | ) | throw (error) |
const int casa::dbus::variant::getInt | ( | ) | const throw (error) |
int& casa::dbus::variant::getIntMod | ( | ) | throw (error) |
const std::vector<int>& casa::dbus::variant::getIntVec | ( | ) | const throw (error) |
std::vector<int>& casa::dbus::variant::getIntVecMod | ( | ) | throw (error) |
const record& casa::dbus::variant::getRecord | ( | ) | const throw (error) |
record& casa::dbus::variant::getRecordMod | ( | ) | throw (error) |
const std::string& casa::dbus::variant::getString | ( | ) | const throw (error) |
std::string& casa::dbus::variant::getStringMod | ( | ) | throw (error) |
const std::vector<std::string>& casa::dbus::variant::getStringVec | ( | ) | const throw (error) |
std::vector<std::string>& casa::dbus::variant::getStringVecMod | ( | ) | throw (error) |
void casa::dbus::variant::place | ( | bool | , |
unsigned int | index, | ||
bool | conform = true |
||
) |
void casa::dbus::variant::place | ( | int | , |
unsigned int | index, | ||
bool | conform = true |
||
) |
void casa::dbus::variant::place | ( | double | , |
unsigned int | index, | ||
bool | conform = true |
||
) |
void casa::dbus::variant::place | ( | std::complex< double > | , |
unsigned int | index, | ||
bool | conform = true |
||
) |
void casa::dbus::variant::place | ( | const std::string & | , |
unsigned int | index, | ||
bool | conform = true |
||
) |
void casa::dbus::variant::push | ( | bool | , |
bool | conform = true |
||
) |
void casa::dbus::variant::push | ( | int | , |
bool | conform = true |
||
) |
void casa::dbus::variant::push | ( | double | , |
bool | conform = true |
||
) |
void casa::dbus::variant::push | ( | std::complex< double > | , |
bool | conform = true |
||
) |
void casa::dbus::variant::push | ( | const std::string & | , |
bool | conform = true |
||
) |
void casa::dbus::variant::resize | ( | int | size | ) |
const std::vector<int>& casa::dbus::variant::shape | ( | ) | const |
Referenced by arrayshape().
std::vector<int>& casa::dbus::variant::shape | ( | ) |
int casa::dbus::variant::shape_size | ( | ) | const [private] |
what size does the shape imply
const char* casa::dbus::variant::sig | ( | ) | const |
int casa::dbus::variant::size | ( | ) | const [inline] |
Definition at line 204 of file variant.h.
References BOOLVEC, typev, and vec_size().
bool casa::dbus::variant::toBool | ( | ) | const |
std::vector<bool> casa::dbus::variant::toBoolVec | ( | ) | const |
std::complex<double> casa::dbus::variant::toComplex | ( | ) | const |
std::vector<std::complex<double> > casa::dbus::variant::toComplexVec | ( | ) | const |
double casa::dbus::variant::toDouble | ( | ) | const |
std::vector<double> casa::dbus::variant::toDoubleVec | ( | ) | const |
int casa::dbus::variant::toInt | ( | ) | const |
std::vector<int> casa::dbus::variant::toIntVec | ( | ) | const |
std::string casa::dbus::variant::toString | ( | bool | no_brackets = false | ) | const |
std::vector<std::string> casa::dbus::variant::toStringVec | ( | ) | const |
TYPE casa::dbus::variant::type | ( | ) | const [inline] |
Definition at line 190 of file variant.h.
References typev.
Referenced by casa::FlagPlotServerProxy::draw(), casa::FlagPlotServerProxy::line(), casa::FlagPlotServerProxy::panel(), and casa::FlagPlotServerProxy::raster().
const std::string& casa::dbus::variant::typeString | ( | ) | const |
int casa::dbus::variant::vec_size | ( | ) | const [private] |
Referenced by size().
std::vector<bool>* casa::dbus::variant::bv |
std::complex<double>* casa::dbus::variant::c |
std::vector<std::complex<double> >* casa::dbus::variant::cv |
double casa::dbus::variant::d |
std::vector<double>* casa::dbus::variant::dv |
std::vector<int>* casa::dbus::variant::iv |
unsigned int casa::dbus::variant::record_id_count [static, private] |
std::string* casa::dbus::variant::s |
std::vector<int> casa::dbus::variant::shape_ [private] |
std::vector<std::string>* casa::dbus::variant::sv |
TYPE casa::dbus::variant::typev [private] |
union { ... } casa::dbus::variant::val [private] |
Referenced by variant().