# 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::IBlock Class Reference

Class IBlock. More...

#include <module.h>

Inheritance diagram for NLAISCRIPT::IBlock:

NLAIC::IBasicInterface NLAIC::IBasicType NLAIC::IPointerGestion NLMISC::IStreamable NLMISC::IClassable List of all members.

Public Methods

 IBlock (bool debugMode, tDicoStr *dico)
 Construct with an active dictionarry and debug mode. More...

 IBlock (bool debugMode)
virtual ~IBlock ()
NLAIAGENT::IObjectIAgetVar (const char *Name)
 Gets a pointer to a locale variable. More...

NLAIAGENT::IObjectIAeraseVar (const char *Name)
tDicoStrlockDictionarry ()
 Locks the dictionnarry and get it. More...

bool allocLocVar (const char *name, NLAIAGENT::IObjectIA *var)
 Allocs a new local var . More...

CCodeBrancheRungetCode ()
 Builds the code, here we update all IConstarint reference. More...

CCodeBrancheRunDebuggetCodeDebug (IScriptDebugSource *sourceCode)
 Build a CCodeBrancheRunDebug. More...

sint32 isCodeMonted ()
 If the code is builded. More...

tListCodelistCode ()
 Get the list of code. More...

void addCode (IOpCode *op)
 Add a op-code pointer, warnning the function increment the ref of the pointer by incRef(). More...

void setCurrentLine (uint16 line)
 Set the current line number in the source code. More...

void setFirstOpCodeInLine (bool b)
 Set the Flag _FirstOpCodeInLine. More...

Base class method.
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...

const NLAIC::CIdentTypegetType () const
 getType return a unique string how represente the class, it can be the name of the class. 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...

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

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

const NLAIAGENT::IObjectIA::CProcessResultrun ()
bool isEqual (const NLAIAGENT::IBasicObjectIA &a) const
Op-code list manipulation.
void pushCode (IOpCode *op)
IOpCodegetBack ()
IOpCodegetFront ()
void pushBagCode (CBagOfCode *bOp)
CBagOfCodegetBagOfCode ()

Static Public Attributes

const NLAIC::CIdentType IdBlock

Protected Types

typedef std::map< NLAISCRIPT::CStringType,
NLAIAGENT::IObjectIA
* >::iterator 
tDicoStrIter
 this typedef define an correct std::map iterator for store local variable in the heap. More...


Private Attributes

CCodeBrancheRun_Cbr
 Op-code that define the block. This object is build at the end of parse. More...

tListCode _ListCode
 This list containe the bag of code. More...

tDicoStr_DicoLocVar
 Local variable is stored here. More...

bool _HaveToDeleteDico
 If user want a reference to the local variable dictionary then we don't have to delete it. More...

bool _Debug
bool _FirstOpCodeInLine
 Switch between a normal CCodeBrancheRun and a debug one. More...

uint16 _CurrentLine
 True while no new opCode as been add since the laste
.
More...



Detailed Description

Class IBlock.

This class allows to store a block of op-code with eachs local variables.

Author:
Chafik sameh , Nevrax France
Date:
2000

Definition at line 43 of file module.h.


Member Typedef Documentation

typedef std::map<NLAISCRIPT::CStringType , NLAIAGENT::IObjectIA *>::iterator NLAISCRIPT::IBlock::tDicoStrIter [protected]
 

this typedef define an correct std::map iterator for store local variable in the heap.

Definition at line 50 of file module.h.

Referenced by ~IBlock.


Constructor & Destructor Documentation

NLAISCRIPT::IBlock::IBlock bool    debugMode,
tDicoStr   dico
[inline]
 

Construct with an active dictionarry and debug mode.

Definition at line 70 of file module.h.

References _Cbr, _CurrentLine, _Debug, _DicoLocVar, _FirstOpCodeInLine, _HaveToDeleteDico, and NLAISCRIPT::tDicoStr.

Referenced by clone.

NLAISCRIPT::IBlock::IBlock bool    debugMode [inline]
 

Definition at line 80 of file module.h.

References _Cbr, _CurrentLine, _Debug, _DicoLocVar, _FirstOpCodeInLine, _HaveToDeleteDico, and NLAISCRIPT::tDicoStr.

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

Definition at line 91 of file module.h.

References _Cbr, _DicoLocVar, and tDicoStrIter.


Member Function Documentation

void NLAISCRIPT::IBlock::addCode IOpCode   op [inline]
 

Add a op-code pointer, warnning the function increment the ref of the pointer by incRef().

Definition at line 246 of file module.h.

References _CurrentLine, _Debug, _FirstOpCodeInLine, and x.

bool NLAISCRIPT::IBlock::allocLocVar const char *    name,
NLAIAGENT::IObjectIA   var
[inline]
 

Allocs a new local var .

Definition at line 148 of file module.h.

References _DicoLocVar, and getVar.

const NLAIC::IBasicType* NLAISCRIPT::IBlock::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.

Definition at line 208 of file module.h.

References _Debug, IBlock, and x.

Referenced by newInstance.

NLAIAGENT::IObjectIA* NLAISCRIPT::IBlock::eraseVar const char *    Name [inline]
 

Definition at line 127 of file module.h.

References _DicoLocVar.

IOpCode* NLAISCRIPT::IBlock::getBack   [inline]
 

Definition at line 269 of file module.h.

CBagOfCode* NLAISCRIPT::IBlock::getBagOfCode   [inline]
 

Definition at line 284 of file module.h.

CCodeBrancheRun* NLAISCRIPT::IBlock::getCode   [inline]
 

Builds the code, here we update all IConstarint reference.

Definition at line 156 of file module.h.

References x.

CCodeBrancheRunDebug* NLAISCRIPT::IBlock::getCodeDebug IScriptDebugSource   sourceCode [inline]
 

Build a CCodeBrancheRunDebug.

Definition at line 178 of file module.h.

References x.

void NLAISCRIPT::IBlock::getDebugString std::string &    const [inline, 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 224 of file module.h.

IOpCode* NLAISCRIPT::IBlock::getFront   [inline]
 

Definition at line 274 of file module.h.

const NLAIC::CIdentType& NLAISCRIPT::IBlock::getType   const [inline, 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.

Definition at line 219 of file module.h.

NLAIAGENT::IObjectIA* NLAISCRIPT::IBlock::getVar const char *    Name [inline]
 

Gets a pointer to a locale variable.

Definition at line 115 of file module.h.

References _DicoLocVar.

Referenced by allocLocVar.

sint32 NLAISCRIPT::IBlock::isCodeMonted   [inline]
 

If the code is builded.

Definition at line 201 of file module.h.

References _Cbr.

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

Definition at line 236 of file module.h.

tListCode& NLAISCRIPT::IBlock::listCode   [inline]
 

Get the list of code.

Definition at line 240 of file module.h.

void NLAISCRIPT::IBlock::load NLMISC::IStream   is [inline, virtual]
 

Load the class from a stream.

Implements NLAIC::IBasicInterface.

Definition at line 232 of file module.h.

tDicoStr* NLAISCRIPT::IBlock::lockDictionarry   [inline]
 

Locks the dictionnarry and get it.

Definition at line 141 of file module.h.

References _DicoLocVar, _HaveToDeleteDico, and NLAISCRIPT::tDicoStr.

const NLAIC::IBasicType* NLAISCRIPT::IBlock::newInstance   const [inline, virtual]
 

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

Implements NLAIC::IBasicType.

Definition at line 214 of file module.h.

References clone.

void NLAISCRIPT::IBlock::pushBagCode CBagOfCode   bOp [inline]
 

Definition at line 279 of file module.h.

void NLAISCRIPT::IBlock::pushCode IOpCode   op [inline]
 

Definition at line 264 of file module.h.

const NLAIAGENT::IObjectIA::CProcessResult & NLAISCRIPT::IBlock::run  
 

Definition at line 28 of file module.cpp.

References NLAIAGENT::IObjectIA::ProcessRun.

void NLAISCRIPT::IBlock::save NLMISC::IStream   os [inline, virtual]
 

Save the class in a stream.

Implements NLAIC::IBasicInterface.

Definition at line 228 of file module.h.

void NLAISCRIPT::IBlock::setCurrentLine uint16    line [inline]
 

Set the current line number in the source code.

Definition at line 291 of file module.h.

References _CurrentLine.

void NLAISCRIPT::IBlock::setFirstOpCodeInLine bool    b [inline]
 

Set the Flag _FirstOpCodeInLine.

Definition at line 297 of file module.h.

References _FirstOpCodeInLine.


Member Data Documentation

CCodeBrancheRun* NLAISCRIPT::IBlock::_Cbr [private]
 

Op-code that define the block. This object is build at the end of parse.

Definition at line 54 of file module.h.

Referenced by IBlock, isCodeMonted, and ~IBlock.

uint16 NLAISCRIPT::IBlock::_CurrentLine [private]
 

True while no new opCode as been add since the laste
.

Definition at line 64 of file module.h.

Referenced by addCode, IBlock, and setCurrentLine.

bool NLAISCRIPT::IBlock::_Debug [private]
 

Definition at line 62 of file module.h.

Referenced by addCode, clone, and IBlock.

tDicoStr* NLAISCRIPT::IBlock::_DicoLocVar [private]
 

Local variable is stored here.

Definition at line 58 of file module.h.

Referenced by allocLocVar, eraseVar, getVar, IBlock, lockDictionarry, and ~IBlock.

bool NLAISCRIPT::IBlock::_FirstOpCodeInLine [private]
 

Switch between a normal CCodeBrancheRun and a debug one.

Definition at line 63 of file module.h.

Referenced by addCode, IBlock, and setFirstOpCodeInLine.

bool NLAISCRIPT::IBlock::_HaveToDeleteDico [private]
 

If user want a reference to the local variable dictionary then we don't have to delete it.

Definition at line 60 of file module.h.

Referenced by IBlock, and lockDictionarry.

tListCode NLAISCRIPT::IBlock::_ListCode [private]
 

This list containe the bag of code.

Definition at line 56 of file module.h.

const NLAIC::CIdentType NLAISCRIPT::IBlock::IdBlock [static]
 


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