C++ main module for gpm Package  1.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
GPM_Variable Class Reference

This class describes a node. More...

#include <GPM_Variable.h>

Inheritance diagram for GPM_Variable:
Inheritance graph
[legend]
Collaboration diagram for GPM_Variable:
Collaboration graph
[legend]

Public Member Functions

const double & operator[] (const int &i) const
 
double & operator[] (const int &i)
 
virtual void copy (const GPM_Variable &var)
 copy the vraiable More...
 
virtual void copy (SPC::GPM_Variable var)
 copy the vraiable More...
 
void setCardinality (const int &n)
 set the cardinalty of the variable More...
 
void setType (const tFlag &t)
 set the type of the variable More...
 
void setIsGlobal (const tBoolean &t)
 set if the variable is global More...
 
void setValue (const int &cardinality, const double *values, const tFlag &type)
 set the variable More...
 
void setValue (const tString &value)
 set the variable More...
 
void setValue (const int &n, const double *value)
 set the variable More...
 
void setValue (const double &value)
 set the variable More...
 
int getCardinality () const
 get the cardinality More...
 
tFlag getType () const
 
tBoolean isGlobal () const
 return true if the vraibale is global More...
 
void getValue (tString &values) const
 get the variable value More...
 
void getValue (int &n, double *values) const
 get the variable value More...
 
double getValue () const
 get the variable value More...
 
tBoolean isEqual (const GPM_Variable &var) const
 return true if the 2 variables are equal More...
 
tBoolean isEqual (const GPM_Variable &var, const double &eps) const
 return tre if the 2 variables are equal More...
 
tBoolean isEqual (const GPM_Variable *var) const
 return tre if the 2 variables are equal More...
 
tBoolean isEqual (const SPC::GPM_Variable var) const
 return tre if the 2 variables are equal More...
 
void parse (const tString &value)
 parse the string : reverse method of toString More...
 
virtual tString toString () const
 to string More...
 
void getSharedPointer (SP::CORE_Object &p)
 get the shared pointer of this class into p More...
 
void getSharedPointer (SPC::CORE_Object &p) const
 get the shared pointer of this class into p More...
 
tString getClassName () const
 return the class name of the object More...
 
tString getIdentityString () const
 return the identity string of the object of the form className_at_address More...
 
tString getPointerAddress () const
 return the identity string of the object More...
 
template<class T >
tBoolean isInstanceOf () const
 return true if the object is an instance of T More...
 
virtual void print ()
 print the class More...
 
virtual ostream & print (ostream &out) const
 print the class More...
 
virtual void print (const tString &message)
 print the class More...
 
virtual void print (const tInteger &str)
 print More...
 
virtual void print (const tRelativeInteger &str)
 print More...
 
virtual void print (const tReal &str)
 print More...
 
virtual void print (const int &str)
 print More...
 

Static Public Member Functions

static SP::GPM_Variable New ()
 
static void turnBodyTextToLine (tString &bdy)
 
static void turnBodyLineToText (tString &bdy)
 
static tString getClassName (const tString &identityString)
 return the class name of the object using only the identity string More...
 
template<class T >
static tString getTypeName ()
 get type name More...
 
static tBoolean is64Architecture ()
 return true if the machine is a 64 bits machine More...
 
static tBoolean is32Architecture ()
 return true if the machine is a 32 bits machine More...
 
static tString pointer2String (const void *obj)
 return the string represantation of a pointer More...
 
static void setOutput (ostream &out)
 set output More...
 
static ostream & getOutput ()
 get output More...
 
static void printObjectsInMemory ()
 print object in memory More...
 
static ostream & print (ostream &out, const tString &message)
 print the class More...
 
static void outputPrint (const tString &message)
 

Static Public Attributes

static const tFlag UNDEFINED =0
 
static const tFlag REAL =1
 
static const tFlag BOOLEAN =3
 
static const tFlag INTEGER =2
 
static const tFlag STRING =4
 
static const tFlag SINGLE =1
 
static const tFlag MULTIPLE =0
 
static tBoolean mIsMemoryTesting =false
 indicator to store all classes created and deleted only for debuging version More...
 

Protected Member Functions

 GPM_Variable (void)
 create an object More...
 
virtual ~GPM_Variable (void)
 destroy an object. More...
 
void setThis (SP::CORE_Object p)
 set this weak shared pointer called toDoAfterThis setting method More...
 
virtual void setType (tString type)
 set the type of the object More...
 
virtual void toDoAfterThisSetting ()
 method called after setThis() method this method can oly be called once. More...
 

Detailed Description

This class describes a node.

Author
Stéphane Despréaux
Version
1.0

Constructor & Destructor Documentation

GPM_Variable::GPM_Variable ( void  )
protected

create an object

References REAL.

Referenced by New().

Here is the caller graph for this function:

GPM_Variable::~GPM_Variable ( void  )
protectedvirtual

destroy an object.

Member Function Documentation

void GPM_Variable::copy ( const GPM_Variable var)
virtual

copy the vraiable

References getCardinality(), getType(), and isGlobal().

Referenced by GPMG_EnvironmentPanel::componentClicked(), copy(), and GPM_GraphElement::setVariable().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void GPM_Variable::copy ( SPC::GPM_Variable  var)
inlinevirtual

copy the vraiable

References copy(), and null.

Here is the call graph for this function:

int GPM_Variable::getCardinality ( ) const
inline

get the cardinality

Referenced by GPM_Rule::buildEnvironment(), copy(), and isEqual().

Here is the caller graph for this function:

static tString CORE_Object::getClassName ( const tString identityString)
inlinestaticinherited

return the class name of the object using only the identity string

Referenced by CORE_Object::printObjectsInMemory().

Here is the caller graph for this function:

tString CORE_Object::getClassName ( ) const
inherited

return the class name of the object

Returns
the class name of the object

References tString.

Referenced by CORE_Object::getIdentityString().

Here is the caller graph for this function:

tString CORE_Object::getIdentityString ( ) const
inlineinherited

return the identity string of the object of the form className_at_address

Returns
the identity string of the object

References CORE_Object::getClassName(), CORE_Object::pointer2String(), and tString.

Referenced by CORE_Object::toString().

Here is the call graph for this function:

Here is the caller graph for this function:

static ostream& CORE_Object::getOutput ( )
inlinestaticinherited

get output

tString CORE_Object::getPointerAddress ( ) const
inlineinherited

return the identity string of the object

Returns
the identity string of the object

References CORE_Object::pointer2String().

Here is the call graph for this function:

void CORE_Object::getSharedPointer ( SP::CORE_Object &  p)
inlineinherited
void CORE_Object::getSharedPointer ( SPC::CORE_Object &  p) const
inlineinherited

get the shared pointer of this class into p

tFlag GPM_Variable::getType ( ) const
inline

get the type

Referenced by GPM_Rule::buildEnvironment(), copy(), GPM_GraphElement::getVariableType(), and isEqual().

Here is the caller graph for this function:

template<class T >
static tString CORE_Object::getTypeName ( )
inlinestaticinherited

get type name

References tString.

void GPM_Variable::getValue ( tString values) const
inline

get the variable value

void GPM_Variable::getValue ( int &  n,
double *  values 
) const
inline

get the variable value

double GPM_Variable::getValue ( ) const
inline

get the variable value

Referenced by toString().

Here is the caller graph for this function:

static tBoolean CORE_Object::is32Architecture ( )
inlinestaticinherited

return true if the machine is a 32 bits machine

References CORE_Object::is64Architecture().

Here is the call graph for this function:

tBoolean CORE_Object::is64Architecture ( )
staticinherited

return true if the machine is a 64 bits machine

Referenced by CORE_Object::is32Architecture().

Here is the caller graph for this function:

tBoolean GPM_Variable::isEqual ( const GPM_Variable var) const
inline

return true if the 2 variables are equal

Referenced by isEqual().

Here is the caller graph for this function:

tBoolean GPM_Variable::isEqual ( const GPM_Variable var,
const double &  eps 
) const

return tre if the 2 variables are equal

References getCardinality(), getType(), and tBoolean.

Here is the call graph for this function:

tBoolean GPM_Variable::isEqual ( const GPM_Variable var) const
inline

return tre if the 2 variables are equal

References isEqual(), and null.

Here is the call graph for this function:

tBoolean GPM_Variable::isEqual ( const SPC::GPM_Variable  var) const
inline

return tre if the 2 variables are equal

References isEqual(), and null.

Here is the call graph for this function:

tBoolean GPM_Variable::isGlobal ( ) const
inline

return true if the vraibale is global

Referenced by copy().

Here is the caller graph for this function:

template<class T >
tBoolean CORE_Object::isInstanceOf ( ) const
inlineinherited

return true if the object is an instance of T

References null.

Referenced by MATH_BinaryOperator::insertInTree(), MATH_UnaryOperator::insertInTree(), and MATH_EndBlock::insertInTree().

Here is the caller graph for this function:

static SP::GPM_Variable GPM_Variable::New ( )
inlinestatic
const double& GPM_Variable::operator[] ( const int &  i) const
inline

References ASSERT_IN.

double& GPM_Variable::operator[] ( const int &  i)
inline

References ASSERT_IN.

void CORE_Object::outputPrint ( const tString message)
staticinherited

print on output

References null, and CORE_Object::print().

Referenced by CORE_Exception::CORE_Exception().

Here is the call graph for this function:

Here is the caller graph for this function:

void GPM_Variable::parse ( const tString value)

parse the string : reverse method of toString

References BOOLEAN, INTEGER, CORE_String::New(), CORE_Real::parseReal(), REAL, STRING, CORE_String::string2Boolean(), CORE_String::trim(), and tString.

Here is the call graph for this function:

tString CORE_Object::pointer2String ( const void *  obj)
staticinherited

return the string represantation of a pointer

References tString.

Referenced by CORE_Object::CORE_Object(), CORE_Object::getIdentityString(), CORE_Object::getPointerAddress(), and CORE_Object::~CORE_Object().

Here is the caller graph for this function:

virtual void CORE_Object::print ( )
inlinevirtualinherited

print the class

References CORE_Object::toString().

Referenced by CORE_Object::outputPrint(), CORE_Out::print(), CORE_Object::print(), CORE_Out::printInt(), CORE_Out::println(), CORE_Out::printReal(), CORE_Out::printString(), and CORE_Out::setAction().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual ostream& CORE_Object::print ( ostream &  out) const
inlinevirtualinherited

print the class

References CORE_Object::print(), and CORE_Object::toString().

Here is the call graph for this function:

void CORE_Object::print ( const tString message)
virtualinherited

print the class

Reimplemented in CORE_Out.

References null, and CORE_Object::print().

Here is the call graph for this function:

void CORE_Object::print ( const tInteger str)
virtualinherited

print

References null.

void CORE_Object::print ( const tRelativeInteger str)
virtualinherited

print

References null.

void CORE_Object::print ( const tReal str)
virtualinherited

print

References null.

void CORE_Object::print ( const int &  str)
virtualinherited

print

References null.

static ostream& CORE_Object::print ( ostream &  out,
const tString message 
)
inlinestaticinherited

print the class

void CORE_Object::printObjectsInMemory ( )
staticinherited

print object in memory

References CORE_Object::getClassName(), CORE_Object::getSharedPointer(), and CORE_Object::mIsMemoryTesting.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void GPM_Variable::setCardinality ( const int &  n)
inline

set the cardinalty of the variable

void GPM_Variable::setIsGlobal ( const tBoolean t)
inline

set if the variable is global

static void CORE_Object::setOutput ( ostream &  out)
inlinestaticinherited

set output

void CORE_Object::setThis ( SP::CORE_Object  p)
inlineprotectedinherited

set this weak shared pointer called toDoAfterThis setting method

References CORE_Object::toDoAfterThisSetting().

Here is the call graph for this function:

void GPM_Variable::setType ( const tFlag t)
inline

set the type of the variable

Referenced by GPM_ModelFunction::addGlobalVariables().

Here is the caller graph for this function:

virtual void CORE_Object::setType ( tString  type)
inlineprotectedvirtualinherited
void GPM_Variable::setValue ( const int &  cardinality,
const double *  values,
const tFlag type 
)

set the variable

Referenced by GPM_ModelFunction::addGlobalVariables(), setValue(), and GPM_GraphElement::setVariableValue().

Here is the caller graph for this function:

void GPM_Variable::setValue ( const tString value)
inline

set the variable

References STRING.

void GPM_Variable::setValue ( const int &  n,
const double *  value 
)
inline

set the variable

References setValue().

Here is the call graph for this function:

void GPM_Variable::setValue ( const double &  value)
inline

set the variable

References setValue().

Here is the call graph for this function:

virtual void CORE_Object::toDoAfterThisSetting ( )
inlineprotectedvirtualinherited
tString GPM_Variable::toString ( ) const
virtual

to string

Reimplemented from CORE_Object.

References BOOLEAN, CORE_String::boolean2String(), getValue(), INTEGER, REAL, STRING, CORE_Real::toString(), CORE_Integer::toString(), and tString.

Here is the call graph for this function:

static void GPM_Object::turnBodyLineToText ( tString bdy)
inlinestaticinherited

brief turn the body from the line to text

References CORE_String::replaceAll().

Referenced by GPMG_Project::loadFromUIClass(), and GPM_ModelFunction::readRulesFromFile().

Here is the call graph for this function:

Here is the caller graph for this function:

static void GPM_Object::turnBodyTextToLine ( tString bdy)
inlinestaticinherited

brief turn the body from the text to line

References CORE_String::replaceAll().

Referenced by GPM_ModelFunction::saveRulesToFile(), and GPMG_Project::saveToUIClass().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

const tFlag GPM_Variable::BOOLEAN =3
static
const tFlag GPM_Variable::INTEGER =2
static
tBoolean CORE_Object::mIsMemoryTesting =false
staticinherited

indicator to store all classes created and deleted only for debuging version

Referenced by CORE_Object::CORE_Object(), main(), CORE_Object::printObjectsInMemory(), and CORE_Object::~CORE_Object().

const tFlag GPM_Variable::MULTIPLE =0
static
const tFlag GPM_Variable::REAL =1
static
const tFlag GPM_Variable::SINGLE =1
static
const tFlag GPM_Variable::STRING =4
static
const tFlag GPM_Variable::UNDEFINED =0
static

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