Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TypeAdapter Class Reference

Dynamically typed wrapper for basic types and objects. More...

#include <TypeAdapter.h>

List of all members.

Public Types

enum  TYPE {
  NONE, INT, DOUBLE, STRING,
  BASE
}

Public Methods

 TypeAdapter ()
 TypeAdapter (int x)
 TypeAdapter (double x)
 TypeAdapter (std::string const &x)
 TypeAdapter (const char *x)
 TypeAdapter (BaseType const *x)
 TypeAdapter (BaseType const &x)
 TypeAdapter (TypeAdapter const &x)
int getInteger () const
double getFloatingPoint () const
std::string getString () const
BaseType const & getBaseType () const
template<typename T> void getBaseTypeAs (T *&t) const
template<typename T> void setBase (T &x) const
template<typename T> void setCoordinate (T &x) const
void set (SimDate &x) const
void set (GeoPos &x) const
void set (LLA &x) const
void set (UTM &x) const
void set (ECEF &x) const
void set (Vector3 &x) const
void set (Matrix3 &x) const
void set (Real &x) const
void set (Curve &x) const
void set (Table &x) const
void set (Table1 &x) const
void set (Table2 &x) const
void set (Table3 &x) const
void set (External &x) const
void set (Key &x) const
void set (Path &x) const
void set (short &x) const
void set (char &x) const
void set (int &x) const
void set (bool &x) const
void set (float &x) const
void set (double &x) const
void set (unsigned int &x) const
void set (std::string &x) const
void set (EnumLink &x) const
void set (LinkBase &x) const
template<typename Q> void set (Link< Q > &x) const
bool isType (TYPE t) const
const std::string __repr__ () const

Static Public Attributes

const char * TypeNames [] = {"NONE", "Integer", "Double", "String", "Base"}


Detailed Description

Dynamically typed wrapper for basic types and objects.

For internal use only. This class is used to pass typed data as parameters to virtual member functions (which are not compatible with templates). It works for a number of basic types, and for objects derived from the Object base class.

Author:
Mark Rose <mrose@stm.lbl.gov>


Member Enumeration Documentation

enum TypeAdapter::TYPE
 

Enumeration values:
NONE 
INT 
DOUBLE 
STRING 
BASE 


Constructor & Destructor Documentation

TypeAdapter::TypeAdapter   [inline]
 

TypeAdapter::TypeAdapter int    x [inline, explicit]
 

TypeAdapter::TypeAdapter double    x [inline, explicit]
 

TypeAdapter::TypeAdapter std::string const &    x [inline, explicit]
 

TypeAdapter::TypeAdapter const char *    x [inline, explicit]
 

TypeAdapter::TypeAdapter BaseType const *    x [inline, explicit]
 

TypeAdapter::TypeAdapter BaseType const &    x [inline, explicit]
 

TypeAdapter::TypeAdapter TypeAdapter const &    x [inline]
 


Member Function Documentation

const std::string TypeAdapter::__repr__   const [inline]
 

BaseType const& TypeAdapter::getBaseType   const [inline]
 

template<typename T>
void TypeAdapter::getBaseTypeAs T *&    t const [inline]
 

double TypeAdapter::getFloatingPoint   const [inline]
 

int TypeAdapter::getInteger   const [inline]
 

std::string TypeAdapter::getString   const [inline]
 

bool TypeAdapter::isType TYPE    t const [inline]
 

template<typename Q>
void TypeAdapter::set Link< Q > &    x const [inline]
 

void TypeAdapter::set LinkBase   x const [inline]
 

void TypeAdapter::set EnumLink   x const [inline]
 

void TypeAdapter::set std::string &    x const [inline]
 

void TypeAdapter::set unsigned int &    x const [inline]
 

void TypeAdapter::set double &    x const [inline]
 

void TypeAdapter::set float &    x const [inline]
 

void TypeAdapter::set bool &    x const [inline]
 

void TypeAdapter::set int &    x const [inline]
 

void TypeAdapter::set char &    x const [inline]
 

void TypeAdapter::set short &    x const [inline]
 

void TypeAdapter::set Path   x const [inline]
 

void TypeAdapter::set Key   x const [inline]
 

void TypeAdapter::set External   x const [inline]
 

void TypeAdapter::set Table3   x const [inline]
 

void TypeAdapter::set Table2   x const [inline]
 

void TypeAdapter::set Table1   x const [inline]
 

void TypeAdapter::set Table   x const [inline]
 

void TypeAdapter::set Curve   x const [inline]
 

void TypeAdapter::set Real   x const [inline]
 

void TypeAdapter::set Matrix3   x const [inline]
 

void TypeAdapter::set Vector3   x const [inline]
 

void TypeAdapter::set ECEF   x const [inline]
 

void TypeAdapter::set UTM   x const [inline]
 

void TypeAdapter::set LLA   x const [inline]
 

void TypeAdapter::set GeoPos   x const [inline]
 

void TypeAdapter::set SimDate   x const [inline]
 

template<typename T>
void TypeAdapter::setBase T &    x const [inline]
 

template<typename T>
void TypeAdapter::setCoordinate T &    x const [inline]
 


Member Data Documentation

NAMESPACE_SIMDATA const char * TypeAdapter::TypeNames = {"NONE", "Integer", "Double", "String", "Base"} [static]
 


The documentation for this class was generated from the following files:
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:42 2003, using Doxygen 1.2.18.

[SF.net]