SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes | Friends
Global Class Reference

Represents a single global variable and defines the methods to read it. More...

#include <Globals.hh>

Public Member Functions

 Global ()
 Default constructor, initializes everything to 0. More...
 
 Global (const std::string &val)
 Proper constructor. More...
 
 Global (const Global &global)
 Copy constructor. More...
 
Global & operator= (const Global &global)
 Equality operator. More...
 
 ~Global ()
 Destructor. More...
 
bool AsBool () const
 Returns the variable as a bool. More...
 
int AsInt () const
 Returns the variable as an int. More...
 
long int AsLongInt () const
 Returns the variable as a long int. More...
 
long int AsBase (int base) const
 Returns the variable as an int in the requested base. More...
 
float AsFloat () const
 Returns the variable as a float. More...
 
double AsDouble () const
 Returns the variable as a double. More...
 
void SetDescription (const std::string &des)
 Sets the decription of the varibale. More...
 
const std::string & Description () const
 Returns the decription of the varibale. More...
 
const std::string & AsString () const
 Returns the variable as an std::string. More...
 
bool operator! () const
 Overload the unary ! operator. More...
 
 operator bool () const
 Overload the bool cast operator. More...
 
 operator int () const
 Overload the int cast operator. More...
 
 operator long int () const
 Overload the long int cast operator. More...
 
 operator size_t () const
 Overload the size_t cast operator. More...
 
 operator float () const
 Overload the float cast operator. More...
 
 operator double () const
 Overload the double cast operator. More...
 
 operator std::string () const
 Overload the std::string cast operator. More...
 

Private Attributes

std::string _val
 Global variable stored as an std::string. More...
 
std::string _des
 Description of the global variable. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const Global &global)
 Overloads the ostream operator. More...
 

Detailed Description

Represents a single global variable and defines the methods to read it.

Constructor & Destructor Documentation

Global::Global ( )
inline

Default constructor, initializes everything to 0.

Global::Global ( const std::string &  val)
inline

Proper constructor.

Global::Global ( const Global &  global)
inline

Copy constructor.

Global::~Global ( )
inline

Destructor.

Member Function Documentation

long int Global::AsBase ( int  base) const
inline

Returns the variable as an int in the requested base.

bool Global::AsBool ( ) const
inline

Returns the variable as a bool.

double Global::AsDouble ( ) const
inline

Returns the variable as a double.

float Global::AsFloat ( ) const
inline

Returns the variable as a float.

int Global::AsInt ( ) const
inline

Returns the variable as an int.

long int Global::AsLongInt ( ) const
inline

Returns the variable as a long int.

const std::string& Global::AsString ( ) const
inline

Returns the variable as an std::string.

const std::string& Global::Description ( ) const
inline

Returns the decription of the varibale.

Global::operator bool ( ) const
inline

Overload the bool cast operator.

Global::operator double ( ) const
inline

Overload the double cast operator.

Global::operator float ( ) const
inline

Overload the float cast operator.

Global::operator int ( ) const
inline

Overload the int cast operator.

Global::operator long int ( ) const
inline

Overload the long int cast operator.

Global::operator size_t ( ) const
inline

Overload the size_t cast operator.

Global::operator std::string ( ) const
inline

Overload the std::string cast operator.

bool Global::operator! ( ) const
inline

Overload the unary ! operator.

Global& Global::operator= ( const Global &  global)
inline

Equality operator.

void Global::SetDescription ( const std::string &  des)
inline

Sets the decription of the varibale.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Global &  global 
)
friend

Overloads the ostream operator.

Field Documentation

std::string Global::_des
private

Description of the global variable.

std::string Global::_val
private

Global variable stored as an std::string.


The documentation for this class was generated from the following file: