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
CORE_Integer Class Reference

this class describes an integer More...

#include <CORE_Integer.h>

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

Public Member Functions

void setInteger (const tRelativeInteger &i)
 set the integer to i More...
 
void setInteger (const tString &i)
 set the integer to i More...
 
tRelativeInteger getInteger () const
 get the integer More...
 
int intValue () const
 get the integer More...
 
int shortValue () const
 get the integer More...
 
tString toString () const
 return the string associated to the integer More...
 
void increment ()
 increment the value More...
 
void decrement ()
 decrement the value 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::CORE_Integer New ()
 build an integer object More...
 
static SP::CORE_Integer New (tRelativeInteger i)
 build an integer object More...
 
static tBoolean isInteger (const tString &str)
 return true if the str is an integer More...
 
static int xtoi (const char *buffer, unsigned int *i)
 C function which return the int value corresponding to buffer. More...
 
static char * itoa (int val, char *buf, int base)
 C function which return the val val into string. More...
 
static char * ltoa (long int val, char *buf, int base)
 C function which return the val val into string. More...
 
static char * lltoa (long long int val, char *buf, int base)
 C function which return the val val into string. More...
 
static char * utoa (unsigned int val, char *buf, int base)
 C function which return the val val into string. More...
 
static char * ultoa (unsigned long int val, char *buf, int base)
 C function which return the val val into string. More...
 
static char * ulltoa (unsigned long long int val, char *buf, int base)
 C function which return the val val into string. More...
 
static tString toString (int i)
 return the string associated to the int integer More...
 
static tString toString (long i)
 return the string associated to the int integer More...
 
static tString toString (long long i)
 return the string associated to the int integer More...
 
static tString toString (unsigned int i)
 return the string associated to the int integer More...
 
static tString toString (unsigned long i)
 return the string associated to the int integer More...
 
static tString toString (unsigned long long i)
 return the string associated to the int integer More...
 
static tString toString (const tRelativeInteger &i, const int &nDigits)
 return the string associated to the int integer More...
 
static tString toHexString (const tRelativeInteger &i, const int &nDigits)
 return the hexadecimal string corresponding to the int integer More...
 
static tString toHexString (const tRelativeInteger &i)
 return the hexadecimal string corresponding to the int integer More...
 
static tString toBinString (tRelativeInteger i)
 return the binary string corresponding to the int integer More...
 
static long int parseInt (tString str)
 return the integer associated to the string More...
 
static unsigned long long parseHex (const tString &str)
 return the integer associated to the hex string More...
 
static unsigned long int parseUnsignedInt (tString str)
 return the integer associated to the string More...
 
static tBoolean parseBoolean (const tString &str)
 return the integer associated to a boolean More...
 
static tInteger turnIntoPBase (tString str, tInteger p)
 return the integer associated to str in base P More...
 
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 tBoolean mIsMemoryTesting =false
 indicator to store all classes created and deleted only for debuging version More...
 

Protected Member Functions

 CORE_Integer (const tRelativeInteger &i)
 create an integer initialize to i More...
 
 ~CORE_Integer ()
 destriuctors 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 an integer

Attributes:

Constructor & Destructor Documentation

CORE_Integer::CORE_Integer ( const tRelativeInteger i)
protected

create an integer initialize to i

Referenced by New().

Here is the caller graph for this function:

CORE_Integer::~CORE_Integer ( )
protected

destriuctors

Member Function Documentation

void CORE_Integer::decrement ( )
inline

decrement the value

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:

tRelativeInteger CORE_Integer::getInteger ( ) const
inline

get the integer

Returns
the integer value.
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

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

get type name

References tString.

void CORE_Integer::increment ( )
inline

increment the value

int CORE_Integer::intValue ( ) const
inline

get the integer

Returns
the int value.
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:

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:

tBoolean CORE_Integer::isInteger ( const tString str)
static

return true if the str is an integer

char * CORE_Integer::itoa ( int  val,
char *  buf,
int  base 
)
static

C function which return the val val into string.

References ltoa().

Referenced by toString().

Here is the call graph for this function:

Here is the caller graph for this function:

char * CORE_Integer::lltoa ( long long int  val,
char *  buf,
int  base 
)
static

C function which return the val val into string.

References ulltoa().

Referenced by toString().

Here is the call graph for this function:

Here is the caller graph for this function:

char * CORE_Integer::ltoa ( long int  val,
char *  buf,
int  base 
)
static

C function which return the val val into string.

References ultoa().

Referenced by itoa(), toBinString(), toHexString(), and toString().

Here is the call graph for this function:

Here is the caller graph for this function:

static SP::CORE_Integer CORE_Integer::New ( )
inlinestatic

build an integer object

References CORE_Integer().

Here is the call graph for this function:

static SP::CORE_Integer CORE_Integer::New ( tRelativeInteger  i)
inlinestatic

build an integer object

References CORE_Integer().

Here is the call graph for this function:

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:

static tBoolean CORE_Integer::parseBoolean ( const tString str)
inlinestatic

return the integer associated to a boolean

References parseInt(), and tBoolean.

Here is the call graph for this function:

unsigned long long CORE_Integer::parseHex ( const tString str)
static

return the integer associated to the hex string

Referenced by CORE_Color::setColor().

Here is the caller graph for this function:

long int CORE_Integer::parseInt ( tString  str)
static
unsigned long int CORE_Integer::parseUnsignedInt ( tString  str)
static

return the integer associated to the string

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 CORE_Integer::setInteger ( const tRelativeInteger i)
inline

set the integer to i

Referenced by setInteger().

Here is the caller graph for this function:

void CORE_Integer::setInteger ( const tString i)
inline

set the integer to i

References parseInt(), and setInteger().

Here is the call graph for this function:

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:

virtual void CORE_Object::setType ( tString  type)
inlineprotectedvirtualinherited
int CORE_Integer::shortValue ( ) const
inline

get the integer

Returns
the int value.
tString CORE_Integer::toBinString ( tRelativeInteger  i)
static

return the binary string corresponding to the int integer

Returns
the binary string corresponding to the int integer

References ltoa(), tRelativeInteger, and tString.

Here is the call graph for this function:

virtual void CORE_Object::toDoAfterThisSetting ( )
inlineprotectedvirtualinherited
tString CORE_Integer::toHexString ( const tRelativeInteger i,
const int &  nDigits 
)
static

return the hexadecimal string corresponding to the int integer

Returns
the hexadecimal string corresponding to the int integer

References ltoa(), tRelativeInteger, and tString.

Referenced by CORE_Color::toString().

Here is the call graph for this function:

Here is the caller graph for this function:

tString CORE_Integer::toHexString ( const tRelativeInteger i)
static

return the hexadecimal string corresponding to the int integer

Returns
the hexadecimal string corresponding to the int integer

References ltoa(), tRelativeInteger, and tString.

Here is the call graph for this function:

tString CORE_Integer::toString ( ) const
inlinevirtual

return the string associated to the integer

Returns
the string associated to the integer

Reimplemented from CORE_Object.

References toString().

Referenced by CORE_Array< T >::add(), CORE_Array< T >::addAfterIndices(), GPM_Rule::buildEnvironment(), GPMG_GraphElementWindow::componentClicked(), GPMG_RulesWindow::componentClicked(), CORE_Array< T >::contractToLastElements(), CORE_Array< T >::CORE_Array(), GPM_Graph::executeTriggerActions(), CORE_Time::getWeekIntervalString(), CORE_Array< T >::insert(), GPM_PortGraph::isEdgeValid(), GPMG_Project::loadData(), GPMG_Project::loadFromUIClass(), GPM_PortGraph::loadGraph(), GPM_Graph::merge(), CORE_Array< T >::merge(), GPM_PrintCallback::operator()(), GPM_ModelRootNode::orderRulesByCallTree(), CORE_Out::printInt(), MATH_FunctionNode::readArguments(), GPM_ModelFunction::readRulesFromFile(), CORE_Array< T >::resize(), GPMG_Project::run(), GPMG_MovieGraphDrawPanel::save(), GPMG_Project::saveData(), GPM_2DSnowGraph::saveGraph(), GPM_ConwayGraph::saveGraph(), GPM_PortGraph::saveGraph(), GPMG_Project::saveToUIClass(), CORE_Out::setAction(), CORE_Array< T >::setCapacity(), CORE_Array3D< T >::toString(), GPM_Edge::toString(), toString(), GPM_Variable::toString(), CORE_SharedPointersListVMap< Key, Value >::toString(), GPM_ModelFunction::toString(), CORE_String::toString(), CORE_Color::toString(), CORE_Array2D< T >::toString(), GPM_Graph::toString(), GPM_PatternFunction::toString(), CORE_Array< T >::toString(), CORE_Time::toString(), GPM_ModelFunction::updatePatternGraphStates(), GPM_ModelFunction::updatePTEdgesStates(), GPM_Snow3DFunction::updateTransformerGraphStates(), GPM_ModelFunction::updateTransformerGraphStates(), GPMG_VertexWindow::updateTriggerVariables(), GPMG_EdgeWindow::updateValues(), GPMG_VertexWindow::updateValues(), GPMG_VariablePanel::updateValues(), GPMG_GraphElementWindow::updateValues(), and GPM_ModelFunction::varNameToString().

Here is the call graph for this function:

Here is the caller graph for this function:

tString CORE_Integer::toString ( int  i)
static

return the string associated to the int integer

Returns
the string associated to the int integer

References itoa(), and tString.

Here is the call graph for this function:

tString CORE_Integer::toString ( long  i)
static

return the string associated to the int integer

Returns
the string associated to the int integer

References ltoa(), and tString.

Here is the call graph for this function:

tString CORE_Integer::toString ( long long  i)
static

return the string associated to the int integer

Returns
the string associated to the int integer

References lltoa(), and tString.

Here is the call graph for this function:

tString CORE_Integer::toString ( unsigned int  i)
static

return the string associated to the int integer

Returns
the string associated to the int integer

References tString, and utoa().

Here is the call graph for this function:

tString CORE_Integer::toString ( unsigned long  i)
static

return the string associated to the int integer

Returns
the string associated to the int integer

References tString, and ultoa().

Here is the call graph for this function:

tString CORE_Integer::toString ( unsigned long long  i)
static

return the string associated to the int integer

Returns
the string associated to the int integer

References tString, and ulltoa().

Here is the call graph for this function:

tString CORE_Integer::toString ( const tRelativeInteger i,
const int &  nDigits 
)
static

return the string associated to the int integer

Returns
the string associated to the int integer with n digits

References ltoa(), tRelativeInteger, and tString.

Here is the call graph for this function:

tInteger CORE_Integer::turnIntoPBase ( tString  str,
tInteger  p 
)
static

return the integer associated to str in base P

turnIntoPBase("OO1",2)=1 turnIntoPBase("O1",2)=1 turnIntoPBase("11",2)=3

References tCharacter, and tInteger.

char * CORE_Integer::ulltoa ( unsigned long long int  val,
char *  buf,
int  base 
)
static

C function which return the val val into string.

Referenced by lltoa(), and toString().

Here is the caller graph for this function:

char * CORE_Integer::ultoa ( unsigned long int  val,
char *  buf,
int  base 
)
static

C function which return the val val into string.

Referenced by ltoa(), toString(), and utoa().

Here is the caller graph for this function:

char * CORE_Integer::utoa ( unsigned int  val,
char *  buf,
int  base 
)
static

C function which return the val val into string.

References ultoa().

Referenced by toString().

Here is the call graph for this function:

Here is the caller graph for this function:

int CORE_Integer::xtoi ( const char *  buffer,
unsigned int *  i 
)
static

C function which return the int value corresponding to buffer.

References tString.

Member Data Documentation

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().


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