NLAISCRIPT::CConstraintMethode Class Reference

#include <constraint.h>

Inheritance diagram for NLAISCRIPT::CConstraintMethode:

NLAISCRIPT::IConstraint NLAIC::IPointerGestion NLMISC::IStreamable NLMISC::IClassable NLAISCRIPT::CConstraintFindRun

Detailed Description

Class CConstraintMethode.

This class is allow to find method.

Author:
Chafik sameh

Nevrax France

Date:
2000

Definition at line 241 of file constraint.h.

IConstraint method.

void addIndex (int i, CCodeBrancheRun *c)
const IConstraintclone () const
 Get a clone pointer memory.

bool dependOn (const IConstraint *c) const
 If this constraint depond on other constraint.

int getColone () const
 get the colone of the expression that it have to be resolve by constraint in the code source.

const NLAIC::CIdentTypegetConstraintTypeOf ()
 Type of the expression that it have to be resolve by constraint.

void getError (char *) const
 get an error string when the constraint is'nt stisfied.

const CFunctionTaggetfunctionTag () const
const char * getInfo ()
 Get a string info.

int getLine () const
 get the line of the expression that it have to be resolve by constraint in the code source.

virtual ConstraintTypeEnum getTypeOfClass () const
 get the type of class. the type must be in the ConstraintTypeEnum enumeration.

bool isEqual (const NLAIAGENT::IBaseGroupType &, const CParam &) const
bool operator== (const IConstraint &c) const
virtual void run (IConstraint *)
 Run with a IConstraint dependency.

virtual void run (CCompilateur &)
 Run with a CCompilateur dependency.

bool satisfied ()
 If the constraint is resolved.

virtual void setOpCode (CCompilateur &comp, IOpCode *x, IConstraint *cType, bool del)

NLMISC::IStreamable method.

virtual std::string getClassName ()
virtual void serial (NLMISC::IStream &) throw (NLMISC::EStream)

Public Types

enum  ConstraintTypeEnum {
  constraintMethode, constraintChkMethodeType, operandSimple, operandSimpleListOr,
  operandAnyObject, operandVoid, operandUnknown, operationType,
  operationTypeGD, operandListType, constraintStackComp, constraintDebug,
  constraintFindRun
}
enum  TCallTypeOpCode {
  normalCall, stackCall, heapCall, newCall,
  searchCall
}

Public Member Functions

void addConstraint (IConstraint *c)
 Add a constraint dependency. We add a constraint dependency when a given constraint want the result of an other constraint.

 CConstraintMethode (TCallTypeOpCode callType, int posHeap, IConstraint *baseClass, NLAIAGENT::IBaseGroupType *methodName, CParam *param, int lin, int col)
sint32 decRef ()
 Decrement the reference of an object.

virtual void getDebugString (std::string &t) const
const sint32getRef () const
 get the refence count.

void incRef ()
 Inc a reference. We use this when we have to conserve a pointer memeory for exemple in a list.

void popConstraint (IConstraint *c)
 pop the last constaint dependency.

virtual void release ()
 Release allow to release the pointer. The last release when the _Ref is nul delete the object.

void runConnexcion ()
 When a constraint is resoved,we call all dependency.

virtual ~CConstraintMethode ()

Protected Attributes

IConstraint_BaseClass
 Type of base class that constain method. A NULL value mean that method is in the last class parsed.

TCallTypeOpCode _CallType
 Type of search.

std::list< std::pair< int,
CCodeBrancheRun * > > 
_Code
int _Col
bool _DelCType
int _Lin
CFunctionTag _M
NLAIAGENT::IBaseGroupType_MethodName
 Hierarchy method name (a hierarchy name is some thing like classBaseName.className.methodName().).

CParam_Param
 Method argument.

int _PosHeap
bool _Satisfied
char * _Txt
char * _TxtInfo
IConstraint_Type


Member Enumeration Documentation

enum NLAISCRIPT::IConstraint::ConstraintTypeEnum [inherited]
 

This enum define all IConstraint class type defined. That is'nt very clean because it is'nt very objects way to do jobs but that make easy to make job with out make heavy the hisarchy class. Because the best way is to derive class form NLAIC::IBasicInterface but we have to register class in class factory, define a save an load ..., in short make a lot of work for an internal work. If later peopole need this kind of class we'll clean it.

Enumeration values:
constraintMethode  Class CConstraintMethode.
constraintChkMethodeType  Class CConstraintChkMethodeType.
operandSimple  Class COperandSimple.
operandSimpleListOr  class COperandSimpleListOr
operandAnyObject  Any class!!!!
operandVoid  Class COperandVoid.
operandUnknown  Class COperandUnknown.
operationType  Class COperationType.
operationTypeGD  Class COperationTypeGD.
operandListType  Class COperandListType.
constraintStackComp  Class CConstraintStackComp.
constraintDebug  Class CConstraintDebug.
constraintFindRun  Class CConstraintFindRun.

Definition at line 138 of file constraint.h.

enum NLAISCRIPT::CConstraintMethode::TCallTypeOpCode
 

This enum allow to define the way to call the method that the class have to find. Later we use this enum to build the correct opcode.

Enumeration values:
normalCall  The call is normal. Base class that constain method is the self class.
stackCall  Call mehod from the stack. Base class that constain method is stored in the stack.
heapCall  Call mehod from the heap. Base class that constain method is stored in the heap.
newCall  Call constructor method.
searchCall  We juste search method.

Definition at line 249 of file constraint.h.

00249                                     {
00251                         normalCall,
00253                         stackCall,
00255                         heapCall,
00257                         newCall,
00259                         searchCall
00260                 };


Constructor & Destructor Documentation

NLAISCRIPT::CConstraintMethode::CConstraintMethode TCallTypeOpCode  callType,
int  posHeap,
IConstraint baseClass,
NLAIAGENT::IBaseGroupType methodName,
CParam param,
int  lin,
int  col
[inline]
 

Definition at line 282 of file constraint.h.

References _BaseClass, _CallType, _Col, _DelCType, _Lin, _PosHeap, _Satisfied, _Txt, _TxtInfo, NLAISCRIPT::CParam::getDebugString(), NLAIC::IBasicType::getDebugString(), param, and NLAIC::stringGetBuild().

Referenced by clone().

00282                                                                                                                                                                  :
00283                         _CallType(callType),_BaseClass(baseClass),_MethodName(methodName),_Param(param),_Satisfied(false),_Lin(lin),_Col(col),_PosHeap(posHeap)
00284                 {                                               
00285                         _Txt = NULL;
00286                         _Type = NULL;
00287                         std::string txt;
00288                         std::string m;
00289                         std::string p;
00290                         _MethodName->getDebugString(m);
00291                         _Param->getDebugString(p);
00292                         txt = "constraint<CConstraintMethode> for";
00293                         txt += m;
00294                         txt += p;
00295                         txt += NLAIC::stringGetBuild(" at line %d",_Lin);
00296                         _TxtInfo = new char [strlen(txt.c_str()) + 1];
00297                         strcpy(_TxtInfo,txt.c_str());                   
00298                         _DelCType = false;
00299                 }

virtual NLAISCRIPT::CConstraintMethode::~CConstraintMethode  )  [inline, virtual]
 

Definition at line 372 of file constraint.h.

References _BaseClass, _DelCType, _Txt, _TxtInfo, and NLAIC::IPointerGestion::release().

00373                 {
00374                         _MethodName->release();
00375                         _Param->release();
00376                         if(_BaseClass)_BaseClass->release();
00377                         if(_Txt != NULL) delete _Txt;
00378                         delete _TxtInfo;                        
00379                         if(_DelCType) _Type->release();
00380                 }


Member Function Documentation

void NLAISCRIPT::IConstraint::addConstraint IConstraint c  )  [inline, inherited]
 

Add a constraint dependency. We add a constraint dependency when a given constraint want the result of an other constraint.

Definition at line 207 of file constraint.h.

References NLAISCRIPT::IConstraint::_ConstraintList.

Referenced by NLAISCRIPT::COperandUnknown::COperandUnknown().

00208                 {
00209                         _ConstraintList.push_back(c);
00210                 }

void NLAISCRIPT::CConstraintMethode::addIndex int  i,
CCodeBrancheRun c
[inline, virtual]
 

Add a op-code dependency. the integer n is the index of the opcode in in the opcodePtr pointer.

Implements NLAISCRIPT::IConstraint.

Definition at line 334 of file constraint.h.

References _Code.

00335                 {                       
00336                         _Code.push_back(std::pair<sint32, CCodeBrancheRun *>(i,c));
00337                 }

const IConstraint * NLAISCRIPT::CConstraintMethode::clone  )  const [virtual]
 

Get a clone pointer memory.

Implements NLAISCRIPT::IConstraint.

Reimplemented in NLAISCRIPT::CConstraintFindRun.

Definition at line 332 of file constraint.cpp.

References _BaseClass, _CallType, _Col, _Lin, _PosHeap, CConstraintMethode(), NLAIC::IPointerGestion::incRef(), and x.

00333         {
00334                 IConstraint *x = new CConstraintMethode(_CallType,_PosHeap,_BaseClass,_MethodName,_Param,_Lin,_Col);
00335                 _BaseClass->incRef();
00336                 _MethodName->incRef();
00337                 _Param->incRef();               
00338                 return x;
00339         }       

sint32 NLAIC::IPointerGestion::decRef  )  [inline, inherited]
 

Decrement the reference of an object.

Definition at line 93 of file abstract_interface.h.

References NLAIC::IPointerGestion::_Ref, and sint32.

Referenced by NLAIC::IPointerGestion::release(), and NLAIAGENT::CAgentTimerHandle::~CAgentTimerHandle().

00094                 {
00095                         return --_Ref;
00096                 }

bool NLAISCRIPT::CConstraintMethode::dependOn const IConstraint c  )  const [inline, virtual]
 

If this constraint depond on other constraint.

Implements NLAISCRIPT::IConstraint.

Definition at line 316 of file constraint.h.

References _BaseClass.

00317                 {
00318                         if( c == _Type || c == _BaseClass || c == this) return true;
00319                         return false;
00320                 }

virtual std::string NLAIC::IPointerGestion::getClassName  )  [inline, virtual, inherited]
 

Implements NLMISC::IClassable.

Reimplemented in NLAIC::CIdentType.

Definition at line 116 of file abstract_interface.h.

Referenced by NLAISCRIPT::CAgentClass::isClassInheritedFrom().

00117                 {
00118                         return std::string("<unnamed>");
00119                 }

int NLAISCRIPT::CConstraintMethode::getColone  )  const [inline, virtual]
 

get the colone of the expression that it have to be resolve by constraint in the code source.

Implements NLAISCRIPT::IConstraint.

Definition at line 366 of file constraint.h.

References _Col.

00367                 {
00368                         return _Col;
00369                 }

const NLAIC::CIdentType* NLAISCRIPT::CConstraintMethode::getConstraintTypeOf  )  [inline, virtual]
 

Type of the expression that it have to be resolve by constraint.

Implements NLAISCRIPT::IConstraint.

Definition at line 347 of file constraint.h.

References NLAISCRIPT::IConstraint::getConstraintTypeOf().

00348                 {                                                       
00349                         return _Type == NULL ? NULL : _Type->getConstraintTypeOf();
00350                 }

virtual void NLAIC::IPointerGestion::getDebugString std::string &  t  )  const [inline, virtual, inherited]
 

Reimplemented in NLAILINK::IOTrace, NLAIAGENT::CActor, NLAIAGENT::CActorScript, NLAIAGENT::IAgent, NLAIAGENT::VectorType, NLAIAGENT::DigitalType, NLAIAGENT::BorneDigitalType, NLAIAGENT::DDigitalType, NLAIAGENT::BorneDDigitalType, NLAIAGENT::IntegerType, NLAIAGENT::ShortIntegerType, NLAIAGENT::CharType, NLAIAGENT::UInt8Type, NLAIAGENT::UInt16Type, NLAIAGENT::UInt32Type, NLAIAGENT::UInt64Type, NLAIAGENT::CLocalAgentMail, NLAIAGENT::CStringType, NLAIAGENT::CPairType, NLAIAGENT::CGroupType, NLAIAGENT::CVectorGroupType, NLAIAGENT::CProxyAgentMail, NLAIAGENT::CAgentScript, NLAIAGENT::CStringVarName, NLAIAGENT::CIndexedVarName, NLAIAGENT::CAgentManagerTimer, NLAIAGENT::CLibTimerManager, NLAIAGENT::CAgentWatchTimer, NLAIAGENT::CAgentTimerHandle, NLAILOGIC::CGoalStack, NLAIAGENT::CLocWordNumRef, NLAIAGENT::IListBasicManager, NLAIAGENT::CLocalMailBox, NLAIAGENT::CMessageScript, NLAIAGENT::IMessageBase, NLAIAGENT::CSuccessMsg, NLAIAGENT::CFailureMsg, NLAIAGENT::CFactMsg, NLAIAGENT::CGetValueMsg, NLAIAGENT::CGoalMsg, NLAIAGENT::CCancelGoalMsg, NLAIAGENT::CMessageGroup, NLAIAGENT::CNotifyParentScript, NLAIAGENT::COnChangeMsg, NLAIAGENT::CSetValueMsg, NLAIAGENT::CObjectIdent, NLAIAGENT::CObjectType, NLAIAGENT::CAgentOperation, NLAIAGENT::CHashTimerManager, NLAIAGENT::CVolatilMemmory, NLAIC::IBasicType, NLAIC::CSelfClassFactory, NLAIC::CBinaryType, NLAICHARACTER::CCharacterChild, NLAIFUZZY::CSimpleFuzzyCond, NLAIFUZZY::CFuzzyFact, NLAIFUZZY::CFuzzyRule, NLAIFUZZY::CFuzzyRuleSet, NLAIFUZZY::CFuzzyInterval, NLAIFUZZY::CRightFuzzySet, NLAIFUZZY::CTriangleFuzzySet, NLAIFUZZY::CTrapezeFuzzySet, NLAIFUZZY::CLeftFuzzySet, NLAIFUZZY::FuzzyType, NLAIFUZZY::CFuzzyVar, NLAILOGIC::CBoolAssert, NLAILOGIC::CBoolOperator, NLAILOGIC::CBoolType, NLAILOGIC::CClause, NLAILOGIC::CFact, NLAILOGIC::CFactBase, NLAILOGIC::CFirstOrderAssert, NLAILOGIC::CFirstOrderOperator, NLAIAGENT::CFsmScript, NLAIAGENT::CSeqFsmScript, NLAILOGIC::CGoal, NLAILOGIC::CInternalGoal, NLAILOGIC::CGoalStack, NLAISCRIPT::COperatorClass, NLAIAGENT::COperatorScript, NLAILOGIC::CRule, NLAILOGIC::CValueSet, NLAILOGIC::CVar, NLAILOGIC::CVarSet, NLAILOGIC::CFactPattern, NLAISCRIPT::CCodeContext, NLAISCRIPT::CCodeBrancheRun, NLAISCRIPT::CContextDebug, NLAISCRIPT::CActorClass, NLAISCRIPT::CFsmClass, NLAISCRIPT::CParam, NLAISCRIPT::CMethodeName, NLAISCRIPT::CClassInterpretFactory, NLAISCRIPT::CAgentClass, NLAISCRIPT::CManagerClass, NLAISCRIPT::CMessageClass, NLAISCRIPT::CCallPrint, NLAISCRIPT::IBlock, NLAISCRIPT::ILoadObject, NLAISCRIPT::CObjectUnknown, NLAISCRIPT::CTellOpCode, NLAISCRIPT::CLdbOpCode, NLAISCRIPT::CLdbMemberOpCode, NLAISCRIPT::CLdbMemberiOpCode, NLAISCRIPT::CLdbStackMemberiOpCode, NLAISCRIPT::CLdbHeapMemberiOpCode, NLAISCRIPT::CScriptDebugSourceFile, NLAISCRIPT::CScriptDebugSourceMemory, NLAISCRIPT::CLibTest, NLAISCRIPT::CVarPStack, NLAISCRIPT::CVarPStackParam, and NLAISCRIPT::IOpRunCode.

Definition at line 104 of file abstract_interface.h.

References t.

00105                 {
00106                         t += "None";
00107                 }

void NLAISCRIPT::CConstraintMethode::getError char *   )  const [virtual]
 

get an error string when the constraint is'nt stisfied.

Implements NLAISCRIPT::IConstraint.

Definition at line 317 of file constraint.cpp.

References _Txt.

00318         {                       
00319                 strcpy(txt,_Txt);
00320         }

const CFunctionTag& NLAISCRIPT::CConstraintMethode::getfunctionTag  )  const [inline]
 

Definition at line 357 of file constraint.h.

References _M.

Referenced by NLAISCRIPT::CConstraintFindRun::run(), and NLAISCRIPT::CConstraintFindRun::setOpCode().

00358                 {
00359                         return _M;
00360                 }

const char* NLAISCRIPT::CConstraintMethode::getInfo  )  [inline, virtual]
 

Get a string info.

Implements NLAISCRIPT::IConstraint.

Definition at line 303 of file constraint.h.

References _TxtInfo.

00304                 {
00305                         return _TxtInfo;
00306                 }               

int NLAISCRIPT::CConstraintMethode::getLine  )  const [inline, virtual]
 

get the line of the expression that it have to be resolve by constraint in the code source.

Implements NLAISCRIPT::IConstraint.

Definition at line 362 of file constraint.h.

References _Lin.

00363                 {
00364                         return _Lin;
00365                 }

const sint32& NLAIC::IPointerGestion::getRef  )  const [inline, inherited]
 

get the refence count.

Definition at line 99 of file abstract_interface.h.

References NLAIC::IPointerGestion::_Ref, and sint32.

Referenced by NLAIAGENT::CAgentTimerHandle::~CAgentTimerHandle().

00100                 {
00101                         return _Ref;
00102                 }

virtual ConstraintTypeEnum NLAISCRIPT::CConstraintMethode::getTypeOfClass  )  const [inline, virtual]
 

get the type of class. the type must be in the ConstraintTypeEnum enumeration.

Implements NLAISCRIPT::IConstraint.

Reimplemented in NLAISCRIPT::CConstraintFindRun.

Definition at line 352 of file constraint.h.

Referenced by operator==().

00353                 {
00354                         return constraintMethode;
00355                 }

void NLAIC::IPointerGestion::incRef  )  [inline, inherited]
 

Inc a reference. We use this when we have to conserve a pointer memeory for exemple in a list.

Definition at line 80 of file abstract_interface.h.

References NLAIC::IPointerGestion::_Ref.

Referenced by NLAIAGENT::CSeqFsmScript::activate(), NLAILOGIC::CFactBase::addAssert(), NLAIAGENT::IAgentComposite::addChild(), NLAILOGIC::IBaseAssert::addInput(), NLAILOGIC::CBoolOperator::addPostcondition(), NLAILOGIC::CBoolOperator::addPrecondition(), NLAILOGIC::CInternalGoal::addPredecessor(), NLAILOGIC::CGoal::addPredecessor(), NLAIFUZZY::CFuzzyVar::addSet(), NLAISCRIPT::CCompilateur::affectation(), NLAILOGIC::CFact::asValueSet(), NLAIAGENT::CAgentWatchTimer::attach(), NLAISCRIPT::CCompilateur::buildObject(), NLAISCRIPT::CAgentClass::buildVMethode(), NLAIAGENT::CAgentOperation::CAgentOperation(), NLAIAGENT::CAgentTimerHandle::CAgentTimerHandle(), NLAISCRIPT::CCompilateur::callFunction(), NLAISCRIPT::CClassInterpretFactory::CClassInterpretFactory(), NLAISCRIPT::CCodeBrancheRunDebug::CCodeBrancheRunDebug(), NLAISCRIPT::CCompilateur::CCompilateur(), NLAISCRIPT::CFactorType::CFactorType(), NLAISCRIPT::CFunctionTag::CFunctionTag(), NLAIAGENT::COperatorScript::checkTrigMsg(), NLAIC::CIdentType::CIdentType(), NLAIAGENT::CIdMethod::CIdMethod(), NLAIAGENT::CKeyObject::CKeyObject(), NLAISCRIPT::CFindRunMsg::clone(), NLAISCRIPT::CObjectUnknown::clone(), NLAISCRIPT::CConstraintStackComp::clone(), NLAISCRIPT::CConstraintFindRun::clone(), clone(), NLAILINK::IOTrace::clone(), NLAISCRIPT::CMethodeName::CMethodeName(), NLAISCRIPT::CAgentClass::CMethodType::CMethodType(), NLAISCRIPT::CObjectUnknown::CObjectUnknown(), NLAIAGENT::CPairType::CPairType(), NLAISCRIPT::CAgentClass::createComponents(), NLAILOGIC::CValueSet::CValueSet(), NLAILOGIC::CVar::CVar(), NLAILOGIC::CValueSet::forward(), NLAIAGENT::IMessageBase::IMessageBase(), NLAIAGENT::CAgentScript::initAgentScript(), NLAISCRIPT::CCompilateur::initMessageManager(), NLAISCRIPT::COperatorClass::isValidFonc(), NLAILOGIC::CValueSet::load(), NLAILOGIC::IBaseOperator::load(), NLAISCRIPT::CAgentClass::load(), NLAISCRIPT::CComponent::load(), NLAISCRIPT::CMethodeName::load(), NLAIAGENT::CVectorGroupType::operator+(), NLAIAGENT::CGroupType::operator+(), NLAISCRIPT::CPramContainer::operator+=(), NLAIAGENT::IMessageBase::operator=(), NLAIAGENT::CKeyObject::operator=(), NLAISCRIPT::CAgentClass::CMethodType::operator=(), NLAISCRIPT::CFunctionTag::operator=(), NLAIAGENT::CIdMethod::operator=(), NLAISCRIPT::CCompilateur::processingVar(), NLAIAGENT::CAgentScript::processMessages(), NLAISCRIPT::CCompilateur::pushParamExpression(), NLAISCRIPT::CConstraintFindRun::run(), NLAIAGENT::IBasicAgent::run(), NLAIAGENT::CAgentScript::runAskGetValue(), NLAIAGENT::IAgent::runChildren(), NLAIAGENT::CMainAgentScript::runExec(), NLAIAGENT::CAgentScript::runInitComponent(), NLAIAGENT::CAgentOperation::runMethodBase(), NLAIAGENT::CAgentWatchTimer::runMethodBase(), NLAIAGENT::CAgentScript::runMethodBase(), NLAIAGENT::CActorScript::runMethodBase(), NLAIAGENT::IMessageBase::runMethodeMember(), NLAIAGENT::IBaseGroupType::runMethodeMember(), NLAIAGENT::IBasicAgent::runMethodeMember(), NLAISCRIPT::CLdbRefOpCode::runOpCode(), NLAISCRIPT::CLdbMemberiOpCode::runOpCode(), NLAISCRIPT::CLdbHeapMemberiOpCode::runOpCode(), NLAISCRIPT::CLdbStackMemberiOpCode::runOpCode(), NLAISCRIPT::CCallStackMethodi::runOpCode(), NLAISCRIPT::CCallStackNewMethodi::runOpCode(), NLAISCRIPT::CLibStackNewMemberMethod::runOpCode(), NLAISCRIPT::CLibStackMemberMethod::runOpCode(), NLAISCRIPT::CAffOpCode::runOpCode(), NLAISCRIPT::CAddParamNameDebug::runOpCode(), NLAISCRIPT::CAffOpCodeDebug::runOpCode(), NLAISCRIPT::CAffHeapMemberiOpCode::runOpCode(), NLAISCRIPT::CAffMemberOpCode::runOpCode(), NLAISCRIPT::CAffMemberiOpCode::runOpCode(), NLAIAGENT::CAgentScript::runTellComponent(), NLAIAGENT::CAgentScript::runTellSetValue(), NLAISCRIPT::CMethodContextDebug::saveContext(), NLAISCRIPT::CMethodContext::saveContext(), NLAIAGENT::CAgentScript::sendBroadCast(), NLAIAGENT::IListManager::sendMessage(), NLAIAGENT::CAgentScript::sendMethodCompoment(), NLAIAGENT::CVolatilMemmory::sendUpdateMessage(), NLAISCRIPT::CFactorType::set(), NLAILOGIC::IBaseOperator::setGoal(), NLAISCRIPT::CCompilateur::setImediateVarNill(), NLAISCRIPT::CCompilateur::setMethodVar(), NLAISCRIPT::CCompilateur::setParamVarName(), NLAISCRIPT::CFunctionTag::setTypeObject(), NLAILOGIC::CVar::setValue(), NLAILOGIC::CValueSet::setValue(), NLAIAGENT::CAgentWatchTimer::tellBroker(), NLAISCRIPT::CCompilateur::typeOfMethod(), NLAILOGIC::CVar::unify(), NLAILOGIC::CValueSet::unify(), and NLAIAGENT::CAgentOperation::update().

00081                 {
00082                         _Ref ++;
00083                 }

bool NLAISCRIPT::CConstraintMethode::isEqual const NLAIAGENT::IBaseGroupType ,
const CParam
const
 

Definition at line 322 of file constraint.cpp.

Referenced by NLAISCRIPT::CCompilateur::getMethodConstraint().

00323         {
00324                 if(((const NLAIAGENT::IBasicObjectIA &)*_MethodName) == ((const NLAIAGENT::IBasicObjectIA &)g) && *_Param == p) return true;
00325                 return false;
00326         }

bool NLAISCRIPT::CConstraintMethode::operator== const IConstraint c  )  const [inline, virtual]
 

Implements NLAISCRIPT::IConstraint.

Definition at line 322 of file constraint.h.

References _BaseClass, _CallType, NLAISCRIPT::IConstraint::getTypeOfClass(), and getTypeOfClass().

00323                 {
00324                         if(getTypeOfClass() == c.getTypeOfClass() && 
00325                                 ((const CConstraintMethode &)c)._CallType == _CallType &&
00326                                 ((const CConstraintMethode &)c)._BaseClass == _BaseClass &&
00327                                 ((const CConstraintMethode &)c).isEqual(*_MethodName,*_Param)) 
00328                         {                               
00329                                 return true;
00330                         }
00331                         return false;
00332                 }               

void NLAISCRIPT::IConstraint::popConstraint IConstraint c  )  [inherited]
 

pop the last constaint dependency.

Definition at line 32 of file constraint.cpp.

References NLAISCRIPT::IConstraint::_ConstraintList.

Referenced by NLAISCRIPT::COperandUnknown::~COperandUnknown().

00033         {
00034                 std::list<IConstraint *>::iterator it = _ConstraintList.begin();
00035                 while(it != _ConstraintList.end())
00036                 {                       
00037                         if(*it == c)
00038                         {
00039                                 _ConstraintList.erase(it);
00040                                 break;
00041                         }
00042                         it ++ ;
00043                 }               
00044         }

virtual void NLAIC::IPointerGestion::release void   )  [inline, virtual, inherited]
 

Release allow to release the pointer. The last release when the _Ref is nul delete the object.

Definition at line 86 of file abstract_interface.h.

References NLAIC::IPointerGestion::decRef().

Referenced by NLAIAGENT::CSeqFsmScript::activate(), NLAISCRIPT::CAgentClass::addBrancheCode(), NLAISCRIPT::CConstraintDebug::addIndex(), NLAISCRIPT::CCompilateur::affectation(), NLAISCRIPT::CCompilateur::affectationMember(), NLAISCRIPT::COperatorClass::backward(), NLAILOGIC::CFirstOrderOperator::backward(), NLAILOGIC::CFirstOrderAssert::backward(), NLAISCRIPT::CCompilateur::buildObject(), NLAILINK::buildScript(), NLAISCRIPT::CCompilateur::callFunction(), NLAIC::CIdentType::CIdentType(), NLAISCRIPT::CCompilateur::clean(), NLAISCRIPT::CParam::clear(), NLAIAGENT::CVectorGroupType::clear(), NLAIAGENT::CGroupType::clear(), NLAIAGENT::CVolatilMemmory::CVolatilMemmory(), NLAISCRIPT::CFactorType::del(), NLAIAGENT::IAgentComposite::deleteListe(), NLAIPYSERVER::endPythonInterface(), NLAIAGENT::CVectorGroupType::erase(), NLAIAGENT::CGroupType::erase(), NLAIAGENT::CVectorGroupType::eraseAll(), NLAIAGENT::CGroupType::eraseAll(), NLAISCRIPT::CCompilateur::errorMethodConstraint(), NLAISCRIPT::CCompilateur::errorTypeConstraint(), NLAISCRIPT::CCompilateur::findMethode(), NLAISCRIPT::COperatorClass::forward(), NLAILOGIC::CFirstOrderOperator::forward(), NLAIAGENT::CComponentHandle::getComponent(), NLAIAGENT::COperatorScript::getDebugString(), NLAIAGENT::CAgentScript::getDebugString(), NLAILOGIC::IBaseOperator::IBaseOperator(), NLAISCRIPT::CCompilateur::ifInterrogation(), NLAISCRIPT::CCompilateur::ifInterrogationEnd(), NLAILOGIC::CFactPattern::init(), NLAILOGIC::CRule::init(), NLAIFUZZY::CTrapezeFuzzySet::init(), NLAIFUZZY::CLeftFuzzySet::init(), NLAIFUZZY::CTriangleFuzzySet::init(), NLAIFUZZY::CRightFuzzySet::init(), NLAIFUZZY::CFuzzyInterval::init(), NLAIFUZZY::CFuzzyRule::init(), NLAIFUZZY::CSimpleFuzzyCond::init(), NLAISCRIPT::CCompilateur::interrogationEnd(), NLAISCRIPT::COperatorClass::isValidFonc(), NLAIAGENT::IAgent::Kill(), NLAILOGIC::CVar::load(), NLAILOGIC::CValueSet::load(), NLAISCRIPT::CLdbOpCode::load(), NLAISCRIPT::CLibCallMethodi::load(), NLAISCRIPT::CLibCallInheritedMethod::load(), NLAISCRIPT::CLibCallMethod::load(), NLAISCRIPT::CLdbNewOpCode::load(), NLAISCRIPT::CAddParamNameDebug::load(), NLAISCRIPT::CFindRunMsg::load(), NLAIAGENT::IListBasicManager::load(), NLAIAGENT::CVectorGroupType::load(), NLAIAGENT::CGroupType::load(), NLAIAGENT::CAgentScript::load(), NLAIAGENT::CStringType::load(), NLAIAGENT::CLocalAgentMail::load(), NLAISCRIPT::CMethodContextDebug::loadContext(), NLAISCRIPT::CCompilateur::onEndClass(), NLAIAGENT::CLocalMailBox::onKill(), NLAIAGENT::IAgent::onKill(), NLAIAGENT::CLocalAgentMail::onKill(), NLAIAGENT::CVectorGroupType::operator-(), NLAIAGENT::CGroupType::operator-(), NLAIAGENT::CKeyObject::operator=(), NLAISCRIPT::CFunctionTag::operator=(), NLAIAGENT::CIdMethod::operator=(), NLAISCRIPT::CCompilateur::PrivateError(), NLAISCRIPT::CCompilateur::processingVar(), NLAIAGENT::CAgentScript::processMessages(), NLAIAGENT::IRefrence::refLoadStream(), NLAISCRIPT::CCompilateur::registerMethod(), NLAIAGENT::IAgentComposite::removeChild(), NLAILOGIC::CFirstOrderAssert::removeFact(), NLAISCRIPT::CConstraintStackComp::run(), NLAISCRIPT::CConstraintFindRun::run(), run(), NLAIAGENT::IBasicAgent::run(), NLAIAGENT::CAgentScript::runInitComponent(), NLAIAGENT::CVolatilMemmory::runMessage(), NLAIAGENT::CAgentOperation::runMethodBase(), NLAISCRIPT::CCompilateur::runMethodConstraint(), NLAILOGIC::CInternalGoal::runMethodeMember(), NLAILOGIC::CGoal::runMethodeMember(), NLAILOGIC::CFact::runMethodeMember(), NLAIAGENT::IObjectIA::runMethodeMember(), NLAISCRIPT::CLdbStackMemberiOpCode::runOpCode(), NLAISCRIPT::CCallStackMethodi::runOpCode(), NLAISCRIPT::CLibHeapMemberMethod::runOpCode(), NLAISCRIPT::CAffOpCode::runOpCode(), NLAISCRIPT::CJFalseOpCode::runOpCode(), NLAISCRIPT::CAffOpCodeDebug::runOpCode(), NLAISCRIPT::CDiffOpCode::runOpCode(), NLAISCRIPT::CInfEqOpCode::runOpCode(), NLAISCRIPT::CSupEqOpCode::runOpCode(), NLAISCRIPT::CEqOpCode::runOpCode(), NLAISCRIPT::CInfOpCode::runOpCode(), NLAISCRIPT::CSupOpCode::runOpCode(), NLAISCRIPT::CMulOpCode::runOpCode(), NLAISCRIPT::CDivOpCode::runOpCode(), NLAISCRIPT::CSubOpCode::runOpCode(), NLAISCRIPT::CAddOpCode::runOpCode(), NLAISCRIPT::CNegOpCode::runOpCode(), NLAIAGENT::CAgentScript::runTellParentNotify(), NLAISCRIPT::CCompilateur::runTypeConstraint(), NLAIAGENT::CHashTimerManager::sendMessage(), NLAIAGENT::CVolatilMemmory::sendMessage(), NLAIAGENT::CLocalMailBox::sendMessage(), NLAIAGENT::IListManager::sendMessage(), NLAIAGENT::CAgentTimerHandle::sendMessage(), NLAIAGENT::CAgentScript::sendMessage(), NLAIAGENT::CAgentScript::sendMethod(), NLAISCRIPT::COperandSimple::serial(), NLAISCRIPT::CObjectUnknown::setBaseType(), NLAISCRIPT::CCompilateur::setChaineVar(), NLAISCRIPT::CClassInterpretFactory::setClass(), NLAIC::CSelfClassFactory::setClass(), NLAISCRIPT::IClassInterpret::setClassName(), NLAISCRIPT::CObjectUnknown::setClassType(), NLAIAGENT::IMessageBase::setContinuation(), NLAILOGIC::IBaseOperator::setGoal(), NLAISCRIPT::COperatorClass::setGoal(), NLAISCRIPT::CCompilateur::setImediateVar(), NLAISCRIPT::CCompilateur::setImediateVarNill(), NLAISCRIPT::CParam::setInfo(), NLAISCRIPT::CAgentClass::setInheritanceName(), NLAISCRIPT::CCompilateur::setListVar(), NLAIAGENT::IMessageBase::setMessageGroup(), NLAISCRIPT::CCompilateur::setMethodVar(), NLAILOGIC::IBaseVar::setName(), NLAIAGENT::CAgentOperation::setName(), NLAISCRIPT::CMethodeName::setName(), NLAIAGENT::IRefrence::setNumRef(), NLAISCRIPT::CConstraintFindRun::setOpCode(), setOpCode(), NLAISCRIPT::CCompilateur::setPerformative(), NLAILOGIC::CInternalGoal::setProperty(), NLAIAGENT::IMessageBase::setReceiver(), NLAIAGENT::IMessageBase::setSender(), NLAILOGIC::CValueSet::setSize(), NLAISCRIPT::CCompilateur::setStackVar(), NLAIAGENT::CMessageScript::setStaticMember(), NLAIAGENT::CAgentScript::setStaticMember(), NLAISCRIPT::IClassInterpret::setType(), NLAISCRIPT::CFunctionTag::setTypeObject(), NLAISCRIPT::CMethodeName::setTypeOfMethode(), NLAILOGIC::CVar::setValue(), NLAIAGENT::CAgentOperation::setValue(), NLAIAGENT::IAgentInput::setValue(), NLAILOGIC::CValueSet::unify(), NLAISCRIPT::COperatorClass::unifyBackward(), NLAILOGIC::CFirstOrderOperator::unifyBackward(), NLAISCRIPT::COperatorClass::unifyForward(), NLAILOGIC::CFirstOrderOperator::unifyForward(), NLAILOGIC::CRule::unifyLiaisonBack(), NLAISCRIPT::CAddParamNameDebug::~CAddParamNameDebug(), NLAISCRIPT::CAgentClass::~CAgentClass(), NLAIAGENT::CAgentOperation::~CAgentOperation(), NLAIAGENT::CAgentScript::~CAgentScript(), NLAIAGENT::CAgentTimerHandle::~CAgentTimerHandle(), NLAIAGENT::CAgentWatchTimer::~CAgentWatchTimer(), NLAISCRIPT::CClassInterpretFactory::~CClassInterpretFactory(), NLAISCRIPT::CCodeBrancheRunDebug::~CCodeBrancheRunDebug(), NLAISCRIPT::CCompilateur::~CCompilateur(), NLAIAGENT::CComponentHandle::~CComponentHandle(), NLAISCRIPT::CConstraintChkMethodeType::~CConstraintChkMethodeType(), ~CConstraintMethode(), NLAISCRIPT::CConstraintStackComp::~CConstraintStackComp(), NLAILOGIC::CFact::~CFact(), NLAISCRIPT::CFindRunMsg::~CFindRunMsg(), NLAILOGIC::CFirstOrderAssert::~CFirstOrderAssert(), NLAISCRIPT::CFunctionTag::~CFunctionTag(), NLAIC::CIdentType::~CIdentType(), NLAIAGENT::CIdMethod::~CIdMethod(), NLAILOGIC::CInternalGoal::~CInternalGoal(), NLAIAGENT::CKeyObject::~CKeyObject(), NLAISCRIPT::CLdbNewOpCode::~CLdbNewOpCode(), NLAISCRIPT::CLdbOpCode::~CLdbOpCode(), NLAISCRIPT::CLibCallInheritedMethod::~CLibCallInheritedMethod(), NLAISCRIPT::CLibCallMethod::~CLibCallMethod(), NLAISCRIPT::CLibCallMethodi::~CLibCallMethodi(), NLAIAGENT::CLocalMailBox::~CLocalMailBox(), NLAIAGENT::CMainAgentScript::~CMainAgentScript(), NLAISCRIPT::CLibTest::CMethodCall::~CMethodCall(), NLAIAGENT::CAgentScript::CMethodCall::~CMethodCall(), NLAISCRIPT::CMethodeName::~CMethodeName(), NLAISCRIPT::CAgentClass::CMethodType::~CMethodType(), NLAISCRIPT::CObjectUnknown::~CObjectUnknown(), NLAISCRIPT::COperandSimple::~COperandSimple(), NLAISCRIPT::COperandUnknown::~COperandUnknown(), NLAISCRIPT::COperationType::~COperationType(), NLAISCRIPT::COperationTypeGD::~COperationTypeGD(), NLAISCRIPT::COperatorClass::~COperatorClass(), NLAIAGENT::CPairType::~CPairType(), NLAIC::CSelfClassFactory::~CSelfClassFactory(), NLAIAGENT::CStringType::~CStringType(), NLAILOGIC::CValueSet::~CValueSet(), NLAILOGIC::CVar::~CVar(), NLAIAGENT::CVolatilMemmory::~CVolatilMemmory(), NLAIAGENT::IAgentInput::~IAgentInput(), NLAILOGIC::IBaseAssert::~IBaseAssert(), NLAILOGIC::IBaseOperator::~IBaseOperator(), NLAILOGIC::IBaseVar::~IBaseVar(), NLAIAGENT::IBasicAgent::~IBasicAgent(), NLAISCRIPT::IBlock::~IBlock(), NLAISCRIPT::IClassInterpret::~IClassInterpret(), NLAILOGIC::IGoal::~IGoal(), NLAIAGENT::IListBasicManager::~IListBasicManager(), NLAIAGENT::IMessageBase::~IMessageBase(), NLAIAGENT::IRefrence::~IRefrence(), and NLAICHARACTER::IZone::~IZone().

00087                 {
00088                         if(decRef() == 0) 
00089                                         delete this;
00090                 }

void NLAISCRIPT::CConstraintMethode::run IConstraint  )  [virtual]
 

Run with a IConstraint dependency.

Implements NLAISCRIPT::IConstraint.

Definition at line 328 of file constraint.cpp.

00329         {
00330         }       

void NLAISCRIPT::CConstraintMethode::run CCompilateur  )  [virtual]
 

Run with a CCompilateur dependency.

Implements NLAISCRIPT::IConstraint.

Reimplemented in NLAISCRIPT::CConstraintFindRun.

Definition at line 50 of file constraint.cpp.

References _BaseClass, _CallType, _M, _PosHeap, _Satisfied, _Txt, NLAISCRIPT::CCompilateur::findMethode(), NLAISCRIPT::IConstraint::getConstraintTypeOf(), NLAISCRIPT::CCompilateur::getDebugMode(), NLAISCRIPT::CParam::getDebugString(), NLAIC::IBasicType::getDebugString(), NLAIC::CIdentType::getFactory(), NLAIAGENT::IBaseGroupType::getFront(), NLAIAGENT::CStringType::getStr(), NLAIC::IBasicType::getType(), NLAISCRIPT::CMethodeName::getTypeOfMethode(), heapCall, id, NLAISCRIPT::CFunctionTag::Inheritance, NLAISCRIPT::CFunctionTag::Member, NLAISCRIPT::CFunctionTag::Method, NLAISCRIPT::CFunctionTag::MethodName, NLAISCRIPT::CFunctionTag::MethodNum, newCall, normalCall, NLAISCRIPT::CFunctionTag::Object, param, NLAIC::IPointerGestion::release(), NLAISCRIPT::CFunctionTag::ReturnType, NLAISCRIPT::IConstraint::run(), NLAISCRIPT::IConstraint::satisfied(), searchCall, setOpCode(), stackCall, NLAIC::stringGetBuild(), type, and x.

00051         {
00052                 if(_Satisfied) return;
00053 #ifdef NL_DEBUG
00054                 std::string mtxt;
00055                 std::string ptxt;
00056                 std::string txt;
00057                 
00058                 _MethodName->getDebugString(mtxt);
00059 
00060                 /*if(mtxt == "[Get]")
00061                 {
00062                         throw;
00063                 }*/
00064                 _Param->getDebugString(ptxt);
00065                 txt = mtxt + ptxt;
00066 #endif  
00067                 const NLAIAGENT::IObjectIA *cl = NULL;
00068                 bool isMember = true;
00069                 
00070                 if(_BaseClass)
00071                 {
00072                         if(!_BaseClass->satisfied()) _BaseClass->run(comp);
00073                         if(_BaseClass->satisfied())
00074                         {
00075                                 cl = (const NLAIAGENT::IObjectIA *)(_BaseClass->getConstraintTypeOf()->getFactory())->getClass();
00076                                 _M = comp.findMethode(cl,*_MethodName,*_Param);
00077                         }
00078                         else
00079                         {       
00080                                 std::string txt;
00081                                 std::string param;
00082                                 std::string Method;
00083                                 
00084                                 _Param->getDebugString(param);
00085                                 _MethodName->getDebugString(Method);
00086                                 txt = NLAIC::stringGetBuild("can't find the method '%s%s'",Method.c_str(),param.c_str());
00087                                 _Txt = new char [strlen(txt.c_str()) + 1];
00088                                 strcpy(_Txt,txt.c_str());
00089                                 return;
00090                         }                       
00091                 }
00092                 else
00093                 {
00094                         try
00095                         {
00096                                 _M = comp.findMethode(*_MethodName,*_Param);
00097                         }
00098                         catch(NLAIE::IException &e)
00099                         {
00100                                 std::string txt;
00101                                 std::string param;
00102                                 std::string Method;
00103                                 
00104                                 _Param->getDebugString(param);
00105                                 _MethodName->getDebugString(Method);
00106                                 txt += NLAIC::stringGetBuild("error '%s' when serch '%s%s'",(char *) e.what(),Method.c_str(),param.c_str());
00107                                 _Txt = new char [strlen(txt.c_str()) + 1];
00108                                 strcpy(_Txt,txt.c_str());
00109                                 return;
00110 
00111                         }
00112                         if(_M.MethodName == NULL)
00113                         {
00114                                 isMember = false;
00115                                 NLAIAGENT::CStringType *lib = (NLAIAGENT::CStringType *)_MethodName->getFront();
00116                                 try
00117                                 {                                       
00118                                         NLAIC::CIdentType id(lib->getStr().getString());
00119                                         _M = comp.findMethode((NLAIAGENT::IObjectIA *)id.getFactory()->getClass() ,*_MethodName,*_Param);
00120 
00121                                 }
00122                                 catch(NLAIE::IException &)
00123                                 {
00124                                         std::string txt;
00125                                         std::string param;
00126                                         std::string Method;
00127                                         
00128                                         _Param->getDebugString(param);
00129                                         _MethodName->getDebugString(Method);
00130                                         txt += NLAIC::stringGetBuild("can't find the method '%s%s'",Method.c_str(),param.c_str());
00131                                         _Txt = new char [strlen(txt.c_str()) + 1];
00132                                         strcpy(_Txt,txt.c_str());
00133                                         
00134                                 }
00135                         }
00136                 }                
00137                 if(_M.MethodName == NULL)
00138                 {                       
00139 
00140                         std::string txt;
00141                         std::string param;
00142                         std::string Method;
00143                         
00144                         _Param->getDebugString(param);
00145                         _MethodName->getDebugString(Method);
00146                         txt += NLAIC::stringGetBuild("can't find the method '%s%s'",Method.c_str(),param.c_str());
00147                         _Txt = new char [strlen(txt.c_str()) + 1];
00148                         strcpy(_Txt,txt.c_str());
00149                 }
00150                 else
00151                 {
00152                         _Satisfied = true;
00153                         IOpCode *x=0;
00154                                                 
00155 
00156                         if(((const NLAIC::CTypeOfObject &)_M.Object->getType()) & NLAIC::CTypeOfObject::tInterpret)
00157                         {                               
00158                                 IMethodContext *methodContex;
00159                                 if (comp.getDebugMode())
00160                                 {
00161                                         methodContex = new CMethodContextDebug();
00162                                 }
00163                                 else
00164                                 {
00165                                         methodContex = new CMethodContext();
00166                                 }
00167                                 
00168                                 switch(_CallType)
00169                                 {
00170                                         case normalCall:
00171                                                 if(!_M.Member.size())
00172                                                 {
00173                                                         x = new CCallMethod(methodContex,_M.Inheritance,_M.MethodNum);
00174                                                 }
00175                                                 else
00176                                                 {
00177                                                         x = new CCallMethodi(methodContex,_M.Inheritance,_M.MethodNum,_M.Member);
00178                                                 }
00179                                                 break;
00180                                         case stackCall:
00181                                                 x = new CCallStackMethodi(methodContex,_M.Inheritance,_M.MethodNum,_M.Member);
00182                                                 break;
00183                                         case heapCall:
00184                                                 x = new CCallHeapMethodi(methodContex,_M.Inheritance,_M.MethodNum,_PosHeap,_M.Member);
00185                                                 break;
00186                                         case newCall:
00187                                                 x = new CCallStackNewMethodi(methodContex,_M.Inheritance,_M.MethodNum,_M.Member);
00188                                                 break;
00189                                         case searchCall:
00190                                                 x = NULL;
00191                                                 delete methodContex;
00192                                                 break;
00193                                 }
00194                         }
00195                         else
00196                         {
00197                                 _Satisfied = true;
00198                                 switch(_CallType)
00199                                 {
00200                                 case normalCall:
00201                                         if(_M.Member.size())
00202                                         {                                               
00203                                                 if(!isMember) x =  new CLibCallMethodi(_M.Inheritance,_M.MethodNum ,_M.Member , *_M.Object);
00204                                                 else
00205                                                 {
00206                                                         x =  new CLibMemberMethodi(_M.Inheritance,_M.MethodNum ,_M.Member );
00207                                                 }
00208                                         }
00209                                         else
00210                                         {
00211                                                 if(_M.Inheritance)
00212                                                 {
00213                                                         if(!isMember) x =  new CLibCallInheritedMethod(_M.Inheritance,_M.MethodNum , *_M.Object);
00214                                                         else
00215                                                         {
00216                                                                 x =  new CLibMemberInheritedMethod(_M.Inheritance,_M.MethodNum);
00217                                                         }
00218                                                 }
00219                                                 else
00220                                                 {
00221                                                         if(!isMember) x =  new CLibCallMethod(_M.MethodNum ,*_M.Object);
00222                                                         else
00223                                                         {                                                               
00224                                                                 x =  new CLibMemberMethod(_M.MethodNum);
00225                                                         }
00226                                                 }
00227                                         }
00228                                         break;
00229                                 case stackCall:
00230                                         x =  new CLibStackMemberMethod(_M.Inheritance,_M.MethodNum ,_M.Member);
00231                                         break;
00232                                 case heapCall:
00233                                         x =  new CLibHeapMemberMethod(_M.Inheritance,_M.MethodNum ,_M.Member,_PosHeap);
00234                                         break;
00235                                 case newCall:                                   
00236                                         x =  new CLibStackNewMemberMethod(_M.Inheritance,_M.MethodNum ,_M.Member);                                      
00237                                         break;
00238 
00239                                 case searchCall:
00240                                         x = NULL;
00241                                         break;
00242                                 }
00243                         }                       
00244                         IConstraint *c;                 
00245 
00246                         if(_M.Method != NULL)
00247                         {
00248                                 c = (IConstraint *)_M.Method->getTypeOfMethode();
00249                                 setOpCode(comp,x,c,false);
00250                                 if(_M.ReturnType != NULL)
00251                                 {
00252                                         _M.ReturnType->release();
00253                                         _M.ReturnType = NULL;
00254                                 }                               
00255                         }
00256                         else
00257                         {
00258                                 if(_M.ReturnType != NULL)
00259                                 {
00260                                         try
00261                                         {
00262                                                 NLAIC::CIdentType type = _M.ReturnType->getType();
00263                                                 NLAIC::CIdentType *tmp = new NLAIC::CIdentType (type);
00264                                                 c = new COperandSimple ( tmp );
00265                                                 setOpCode(comp,x,c,true);                                               
00266                                         }
00267                                         catch(NLAIE::IException &)
00268                                         {       
00269                                                 c = new COperandSimple (new NLAIC::CIdentType (_M.Object->getType()));
00270                                                 setOpCode(comp,x,c,true);
00271                                         }
00272                                         _M.ReturnType->release();
00273                                         _M.ReturnType = NULL;
00274                                 }
00275                                 else
00276                                 {
00277                                         c = new COperandSimple (new NLAIC::CIdentType (_M.Object->getType()));
00278                                         setOpCode(comp,x,c,true);
00279                                 }                               
00280                         }
00281                         
00282                 }               
00283         }

void NLAISCRIPT::IConstraint::runConnexcion  )  [inline, inherited]
 

When a constraint is resoved,we call all dependency.

Definition at line 214 of file constraint.h.

References NLAISCRIPT::IConstraint::_ConstraintList, and NLAISCRIPT::IConstraint::run().

Referenced by NLAISCRIPT::CConstraintChkMethodeType::run(), NLAISCRIPT::CConstraintFindRun::setOpCode(), and setOpCode().

00215                 {
00216                         while(_ConstraintList.size())
00217                         {
00218                                 IConstraint *a = _ConstraintList.back();
00219                                 _ConstraintList.pop_back();
00220                                 a->run(this);
00221                         }               
00222                 }

bool NLAISCRIPT::CConstraintMethode::satisfied  )  [inline, virtual]
 

If the constraint is resolved.

Implements NLAISCRIPT::IConstraint.

Definition at line 311 of file constraint.h.

References _Satisfied.

00312                 {
00313                         return _Satisfied;
00314                 }               

virtual void NLAIC::IPointerGestion::serial NLMISC::IStream  )  throw (NLMISC::EStream) [inline, virtual, inherited]
 

Implements NLMISC::IStreamable.

Reimplemented in NLAIC::CIdentType, NLAIC::IBasicInterface, NLAISCRIPT::COperandVoid, NLAISCRIPT::COperandAnyObject, NLAISCRIPT::COperandSimple, NLAISCRIPT::COperandSimpleListOr, NLAISCRIPT::COperandUnknown, NLAISCRIPT::COperationType, NLAISCRIPT::COperationTypeGD, and NLAISCRIPT::COperandListType.

Definition at line 120 of file abstract_interface.h.

Referenced by NLAISCRIPT::CFindRunMsg::save().

00121                 {
00122                 }

void NLAISCRIPT::CConstraintMethode::setOpCode CCompilateur comp,
IOpCode x,
IConstraint cType,
bool  del
[virtual]
 

Reimplemented in NLAISCRIPT::CConstraintFindRun.

Definition at line 285 of file constraint.cpp.

References _Code, _DelCType, NLAIC::IPointerGestion::release(), NLAISCRIPT::IConstraint::run(), NLAISCRIPT::IConstraint::runConnexcion(), type, and x.

Referenced by run().

00286         {
00287                 if(x != NULL)
00288                 {               
00289                         if(_Code.size())
00290                         {               
00291                                 while(_Code.size())
00292                                 {                       
00293                                         std::pair<int, CCodeBrancheRun *> &p = _Code.back();
00294                                         IOpCode *op = (*p.second)[p.first];//
00295 /*#ifdef NL_DEBUG
00296                                         std::string dbugS;
00297                                         p.second->getDebugString(dbugS);
00298                                         NLAIC::Out("%s \n\tindex <%d> \n\tRef of IOpCode int setOpCode is %d\n", dbugS.c_str(), p.first, op->getRef());
00299 #endif*/
00300                                         op->release();
00301                                         (*p.second)[p.first] = x;
00302                                         _Code.pop_back();                       
00303                                         if(_Code.size()) x->incRef();
00304                                 }
00305                         }
00306                         else
00307                         {
00308                                 x->release();
00309                         }
00310                 }
00311                 _Type = type;
00312                 _Type->run(comp);
00313                 _DelCType = f;
00314                 runConnexcion();
00315         }


Field Documentation

IConstraint* NLAISCRIPT::CConstraintMethode::_BaseClass [protected]
 

Type of base class that constain method. A NULL value mean that method is in the last class parsed.

Definition at line 265 of file constraint.h.

Referenced by CConstraintMethode(), clone(), dependOn(), operator==(), run(), and ~CConstraintMethode().

TCallTypeOpCode NLAISCRIPT::CConstraintMethode::_CallType [protected]
 

Type of search.

Definition at line 263 of file constraint.h.

Referenced by CConstraintMethode(), clone(), operator==(), and run().

std::list<std::pair<int, CCodeBrancheRun *> > NLAISCRIPT::CConstraintMethode::_Code [protected]
 

Definition at line 273 of file constraint.h.

Referenced by addIndex(), and setOpCode().

int NLAISCRIPT::CConstraintMethode::_Col [protected]
 

Definition at line 272 of file constraint.h.

Referenced by CConstraintMethode(), clone(), and getColone().

bool NLAISCRIPT::CConstraintMethode::_DelCType [protected]
 

Definition at line 278 of file constraint.h.

Referenced by CConstraintMethode(), setOpCode(), and ~CConstraintMethode().

int NLAISCRIPT::CConstraintMethode::_Lin [protected]
 

Definition at line 271 of file constraint.h.

Referenced by CConstraintMethode(), clone(), and getLine().

CFunctionTag NLAISCRIPT::CConstraintMethode::_M [protected]
 

Definition at line 279 of file constraint.h.

Referenced by getfunctionTag(), and run().

NLAIAGENT::IBaseGroupType* NLAISCRIPT::CConstraintMethode::_MethodName [protected]
 

Hierarchy method name (a hierarchy name is some thing like classBaseName.className.methodName().).

Definition at line 267 of file constraint.h.

CParam* NLAISCRIPT::CConstraintMethode::_Param [protected]
 

Method argument.

Definition at line 269 of file constraint.h.

int NLAISCRIPT::CConstraintMethode::_PosHeap [protected]
 

Definition at line 277 of file constraint.h.

Referenced by CConstraintMethode(), clone(), and run().

bool NLAISCRIPT::CConstraintMethode::_Satisfied [protected]
 

Definition at line 270 of file constraint.h.

Referenced by CConstraintMethode(), run(), and satisfied().

char* NLAISCRIPT::CConstraintMethode::_Txt [protected]
 

Definition at line 274 of file constraint.h.

Referenced by CConstraintMethode(), getError(), run(), and ~CConstraintMethode().

char* NLAISCRIPT::CConstraintMethode::_TxtInfo [protected]
 

Definition at line 276 of file constraint.h.

Referenced by CConstraintMethode(), getInfo(), and ~CConstraintMethode().

IConstraint* NLAISCRIPT::CConstraintMethode::_Type [protected]
 

Definition at line 275 of file constraint.h.


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 11:29:38 2004 for NeL by doxygen 1.3.6