# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLAISCRIPT::CCodeBrancheRun Class Reference

Class CCodeBrancheRun. More...

#include <codage.h>

Inheritance diagram for NLAISCRIPT::CCodeBrancheRun:

NLAISCRIPT::ICodeBranche NLAISCRIPT::IOpCode NLAIAGENT::IObjectIA NLAIAGENT::IBasicObjectIA NLAIC::IBasicInterface NLAIC::IBasicType NLAIC::IPointerGestion NLMISC::IStreamable NLMISC::IClassable NLAISCRIPT::CCodeBrancheRunDebug List of all members.

Public Methods

 CCodeBrancheRun (const CCodeBrancheRun &l)
 copy constructor of the class. More...

 CCodeBrancheRun (const tListCode &l)
 you can construct the class with a liste of op code. More...

 CCodeBrancheRun (int N, const IOpCode &op)
 the constructor built a class with N op code copy of the op parametre. More...

 CCodeBrancheRun (int N)
 the constructor built a class with N NUL op code. More...

 CCodeBrancheRun (NLMISC::IStream &is)
 the constructor built a class with a stream. More...

virtual ~CCodeBrancheRun ()
void initCode (const tListCode &l)
void initCode (const CCodeBrancheRun &l)
IOpCode *& operator[] (int i)
 allow us to acces to an element in the internal table of the class. More...

void operator= (uint32 l)
 set the code pointer to l range. More...

void operator+= (uint32 l)
 move the ip pointer at l element. More...

 operator uint32 ()
 get the ip pointer. More...

void init ()
IOpCodenextCode ()
 get the op code from the curent position. More...

ICodeBranche method.
virtual const NLAIAGENT::IObjectIA::CProcessResultrun (NLAIAGENT::IObjectIA &self)
 Run for a given self class. The method create a new context. More...

virtual const NLAIAGENT::IObjectIA::CProcessResultrun (CCodeContext &)
 Run with a given context. More...

NLAIAGENT::TProcessStatement runOpCode (CCodeContext &context)
 Computation of the op-code with a given context. More...

void getDebugResult (std::string &str, CCodeContext &context) const
 gets debug string from the op-code. More...

IBasicInterface method.
void save (NLMISC::IStream &f)
 Save the class in a stream. More...

void load (NLMISC::IStream &f)
 Load the class from a stream. More...

void getDebugString (std::string &) const
 This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user. More...

const NLAIC::CIdentTypegetType () const
 getType return a unique string how represente the class, it can be the name of the class. More...

const NLAIC::IBasicTypeclone () const
 This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne. More...

const NLAIC::IBasicTypenewInstance () const
 This function allow a new instance, that mean that the class is a class factory. More...

IBasicObjectIA method.
bool isEqual (const NLAIAGENT::IBasicObjectIA &a) const
IObjectIA method.
virtual const NLAIAGENT::IObjectIA::CProcessResultrun ()
 Some where Run method define the process of the agen. More...


Static Public Attributes

NLAIC::IIOInputOutput = NULL
const NLAIC::CIdentType IdCodeBrancheRun

Protected Methods

void del ()
 del allow the class to del and reinitialize the class. More...


Protected Attributes

IOpCode ** _TableCode
 Table for storage the op code. More...

int _Ip
 The code pointer index of the curent op code in run. More...

int _Count
 The count of the op code table. More...

NLAIAGENT::IObjectIA::CProcessResult _RunState
 The state of tje last run method called. More...


Detailed Description

Class CCodeBrancheRun.

Define a table for storage and run op-code.

Author:
Chafik sameh , Nevrax France
Date:
2000

Definition at line 504 of file codage.h.


Constructor & Destructor Documentation

NLAISCRIPT::CCodeBrancheRun::CCodeBrancheRun const CCodeBrancheRun &    l [inline]
 

copy constructor of the class.

Definition at line 540 of file codage.h.

References NLAISCRIPT::l.

Referenced by newInstance.

NLAISCRIPT::CCodeBrancheRun::CCodeBrancheRun const tListCode   l [inline]
 

you can construct the class with a liste of op code.

Definition at line 551 of file codage.h.

References NLAISCRIPT::l.

NLAISCRIPT::CCodeBrancheRun::CCodeBrancheRun int    N,
const IOpCode   op
 

the constructor built a class with N op code copy of the op parametre.

Definition at line 205 of file codage.cpp.

References _Count, _TableCode, and NLAISCRIPT::IOpCode::IOpCode.

NLAISCRIPT::CCodeBrancheRun::CCodeBrancheRun int    N
 

the constructor built a class with N NUL op code.

Definition at line 215 of file codage.cpp.

References _Count, _TableCode, and NLAISCRIPT::IOpCode::IOpCode.

NLAISCRIPT::CCodeBrancheRun::CCodeBrancheRun NLMISC::IStream   is [inline]
 

the constructor built a class with a stream.

Definition at line 563 of file codage.h.

virtual NLAISCRIPT::CCodeBrancheRun::~CCodeBrancheRun   [inline, virtual]
 

Definition at line 568 of file codage.h.


Member Function Documentation

const NLAIC::IBasicType* NLAISCRIPT::CCodeBrancheRun::clone   const [inline, virtual]
 

This function allow a pointer copy, that mean that the new class have the sam attributs caracteristics as the owne.

Implements NLAIC::IBasicType.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 653 of file codage.h.

References x.

void NLAISCRIPT::CCodeBrancheRun::del   [inline, protected]
 

del allow the class to del and reinitialize the class.

Definition at line 522 of file codage.h.

Referenced by NLAISCRIPT::CCodeBrancheRunDebug::initCode, and load.

void NLAISCRIPT::CCodeBrancheRun::getDebugResult std::string &    str,
CCodeContext   context
const [virtual]
 

gets debug string from the op-code.

Implements NLAISCRIPT::IOpCode.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 225 of file codage.cpp.

References _Ip, and _TableCode.

void NLAISCRIPT::CCodeBrancheRun::getDebugString std::string &    const [virtual]
 

This is a Debug function, text is an character pointer to receive the debug text output, the debug text containe all think sensible to interset user.

Implements NLAIC::IBasicType.

Definition at line 90 of file codage.cpp.

References _Count, NLAIC::stringGetBuild, and t.

const NLAIC::CIdentType & NLAISCRIPT::CCodeBrancheRun::getType   const [virtual]
 

getType return a unique string how represente the class, it can be the name of the class.

This function is used for the sytem regstry class (see the definition of the template class Gen::CRegistry).

Implements NLAIC::IBasicType.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 230 of file codage.cpp.

References IdCodeBrancheRun.

Referenced by save.

void NLAISCRIPT::CCodeBrancheRun::init   [inline]
 

Definition at line 627 of file codage.h.

void NLAISCRIPT::CCodeBrancheRun::initCode const CCodeBrancheRun &    l [inline]
 

Definition at line 589 of file codage.h.

References NLAISCRIPT::l.

void NLAISCRIPT::CCodeBrancheRun::initCode const tListCode   l [inline]
 

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 574 of file codage.h.

References NLAISCRIPT::l.

bool NLAISCRIPT::CCodeBrancheRun::isEqual const NLAIAGENT::IBasicObjectIA   a const [inline]
 

Definition at line 664 of file codage.h.

void NLAISCRIPT::CCodeBrancheRun::load NLMISC::IStream   f [virtual]
 

Load the class from a stream.

Implements NLAIC::IBasicInterface.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 61 of file codage.cpp.

References _Count, _TableCode, NLAIC::CIdentTypeAlloc::allocClass, del, id, NLAISCRIPT::IOpCode::IOpCode, s, NLMISC::IStream::serial, and sint32.

const NLAIC::IBasicType * NLAISCRIPT::CCodeBrancheRun::newInstance   const [virtual]
 

This function allow a new instance, that mean that the class is a class factory.

Implements NLAIC::IBasicType.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 84 of file codage.cpp.

References CCodeBrancheRun, and x.

IOpCode& NLAISCRIPT::CCodeBrancheRun::nextCode   [inline, virtual]
 

get the op code from the curent position.

Implements NLAISCRIPT::ICodeBranche.

Definition at line 633 of file codage.h.

Referenced by NLAISCRIPT::CCodeBrancheRunDebug::runOpCode, and runOpCode.

NLAISCRIPT::CCodeBrancheRun::operator uint32   [inline]
 

get the ip pointer.

Definition at line 622 of file codage.h.

void NLAISCRIPT::CCodeBrancheRun::operator+= uint32    l [inline]
 

move the ip pointer at l element.

Definition at line 616 of file codage.h.

References NLAISCRIPT::l, and uint32.

void NLAISCRIPT::CCodeBrancheRun::operator= uint32    l [inline]
 

set the code pointer to l range.

Definition at line 610 of file codage.h.

References NLAISCRIPT::l, and uint32.

IOpCode*& NLAISCRIPT::CCodeBrancheRun::operator[] int    i [inline]
 

allow us to acces to an element in the internal table of the class.

Definition at line 604 of file codage.h.

const NLAIAGENT::IObjectIA::CProcessResult & NLAISCRIPT::CCodeBrancheRun::run   [virtual]
 

Some where Run method define the process of the agen.

Implements NLAIAGENT::IObjectIA.

Definition at line 95 of file codage.cpp.

References _RunState, InputOutput, NLAIAGENT::IObjectIA::CProcessResult::Result, and NLAIAGENT::IObjectIA::CProcessResult::ResultState.

Referenced by NLAISCRIPT::CCodeBrancheRunDebug::run, and run.

const NLAIAGENT::IObjectIA::CProcessResult & NLAISCRIPT::CCodeBrancheRun::run CCodeContext   [virtual]
 

Run with a given context.

Implements NLAISCRIPT::ICodeBranche.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 138 of file codage.cpp.

References _Ip, _RunState, NLAIAGENT::IObjectIA::CProcessResult::ResultState, runOpCode, sint, and NLAIC::stringGetBuild.

const NLAIAGENT::IObjectIA::CProcessResult & NLAISCRIPT::CCodeBrancheRun::run NLAIAGENT::IObjectIA   self [virtual]
 

Run for a given self class. The method create a new context.

Implements NLAISCRIPT::ICodeBranche.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 112 of file codage.cpp.

References _RunState, InputOutput, NLAIAGENT::IObjectIA::CProcessResult::Result, NLAIAGENT::IObjectIA::CProcessResult::ResultState, and run.

Referenced by NLAIAGENT::CAgentScript::callConstructor, NLAISCRIPT::CAgentClass::initStatics, and NLAIAGENT::CMainAgentScript::runExec.

NLAIAGENT::TProcessStatement NLAISCRIPT::CCodeBrancheRun::runOpCode CCodeContext   context [virtual]
 

Computation of the op-code with a given context.

Implements NLAISCRIPT::IOpCode.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 183 of file codage.cpp.

References NLAISCRIPT::IOpCode::IOpCode, and nextCode.

Referenced by run.

void NLAISCRIPT::CCodeBrancheRun::save NLMISC::IStream   f [virtual]
 

Save the class in a stream.

Implements NLAIC::IBasicInterface.

Reimplemented in NLAISCRIPT::CCodeBrancheRunDebug.

Definition at line 42 of file codage.cpp.

References _Count, _TableCode, getType, NLMISC::IStream::serial, sint32, NLAIC::stringGetBuild, and x.


Member Data Documentation

int NLAISCRIPT::CCodeBrancheRun::_Count [protected]
 

The count of the op code table.

Definition at line 515 of file codage.h.

Referenced by CCodeBrancheRun, NLAISCRIPT::CCodeBrancheRunDebug::CCodeBrancheRunDebug, getDebugString, NLAISCRIPT::CCodeBrancheRunDebug::initCBRD, NLAISCRIPT::CCodeBrancheRunDebug::initCode, NLAISCRIPT::CCodeBrancheRunDebug::load, load, NLAISCRIPT::CCodeBrancheRunDebug::save, and save.

int NLAISCRIPT::CCodeBrancheRun::_Ip [protected]
 

The code pointer index of the curent op code in run.

Definition at line 513 of file codage.h.

Referenced by NLAISCRIPT::CCodeBrancheRunDebug::fixContextDebugMode, NLAISCRIPT::CCodeBrancheRunDebug::getCurrentSourceCodeLineNumber, NLAISCRIPT::CCodeBrancheRunDebug::getDebugResult, getDebugResult, NLAISCRIPT::CCodeBrancheRunDebug::initCode, run, and NLAISCRIPT::CCodeBrancheRunDebug::runOpCode.

NLAIAGENT::IObjectIA::CProcessResult NLAISCRIPT::CCodeBrancheRun::_RunState [protected]
 

The state of tje last run method called.

Definition at line 517 of file codage.h.

Referenced by NLAISCRIPT::CCodeBrancheRunDebug::run, and run.

IOpCode** NLAISCRIPT::CCodeBrancheRun::_TableCode [protected]
 

Table for storage the op code.

Definition at line 511 of file codage.h.

Referenced by CCodeBrancheRun, NLAISCRIPT::CCodeBrancheRunDebug::getDebugResult, getDebugResult, NLAISCRIPT::CCodeBrancheRunDebug::initCode, load, and save.

const NLAIC::CIdentType NLAISCRIPT::CCodeBrancheRun::IdCodeBrancheRun [static]
 

Referenced by getType.

NLAIC::IIO * NLAISCRIPT::CCodeBrancheRun::InputOutput = NULL [static]
 

Definition at line 40 of file codage.cpp.

Referenced by NLAISCRIPT::CCodeBrancheRunDebug::printSourceCodeLine, NLAISCRIPT::CCodeBrancheRunDebug::printVariable, NLAISCRIPT::CCodeBrancheRunDebug::readCommandLine, NLAISCRIPT::CCodeBrancheRunDebug::run, run, and NLAISCRIPT::CCodeBrancheRunDebug::runOpCode.


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