#include <constraint_debug.h>
Inheritance diagram for NLAISCRIPT::CConstraintDebug:
Nevrax France
Definition at line 41 of file constraint_debug.h.
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 } |
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. | |
void | addIndex (int i, CCodeBrancheRun *c) |
CConstraintDebug (int lin, int col) | |
Error message. | |
sint32 | decRef () |
Decrement the reference of an object. | |
int | getColone () const |
Get the opCode colone number in source texte. | |
virtual void | getDebugString (std::string &t) const |
void | getError (char *) const |
Get the error message. | |
int | getLine () const |
Get the opCode line number in source texte. | |
const sint32 & | getRef () 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 | ~CConstraintDebug () |
Destructor. | |
IConstraint method. | |
const IConstraint * | clone () const |
Get a clone pointer memory. | |
ConstraintTypeEnum | getTypeOfClass () const |
get the type of class. the type must be in the ConstraintTypeEnum enumeration. | |
void | run (IConstraint *c) |
Run with a IConstraint dependency. | |
void | run (CCompilateur &c) |
Run with a CCompilateur dependency. | |
bool | satisfied () |
If the constraint is resolved. | |
IConstraint method. | |
Not used. | |
bool | dependOn (const IConstraint *) const |
Not used. | |
const NLAIC::CIdentType * | getConstraintTypeOf () |
Not used. | |
const char * | getInfo () |
Not used. | |
bool | operator== (const IConstraint &) const |
Not used. | |
Private Attributes | |
CCodeBrancheRun * | _Code |
Index in the CCodeBrancheRun. | |
int | _Col |
OpCode line number in source texte. | |
int | _I |
OpCode colone number in source texte. | |
int | _Lin |
Is the constraint satified ? | |
bool | _Satisfied |
char * | _Txt |
Pointer to the CCodeBrancheRun. |
|
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.
Definition at line 138 of file constraint.h.
00139 { 00141 constraintMethode, 00143 constraintChkMethodeType, 00145 operandSimple, 00147 operandSimpleListOr, 00149 operandAnyObject, 00151 operandVoid, 00153 operandUnknown, 00155 operationType, 00157 operationTypeGD, 00159 operandListType, 00161 constraintStackComp, 00163 constraintDebug, 00165 constraintFindRun 00166 }; |
|
Error message. Constructor param lin Line number in the source code. param col Colonne number in the source code. Definition at line 30 of file constraint_debug.cpp. Referenced by clone().
00030 : 00031 _Satisfied(false),_Lin(lin),_Col(col) 00032 { 00033 _Code = NULL; 00034 _Txt = NULL; 00035 } |
|
Destructor.
Definition at line 37 of file constraint_debug.cpp.
|
|
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 } |
|
Fix the opCode adress. It must be call before run(CCompilateur & c). WARNING : This function will self-destruct the constraint.
Implements NLAISCRIPT::IConstraint. Definition at line 47 of file constraint_debug.cpp. References NLAISCRIPT::CCodeBrancheRun::getType(), NLAIC::IPointerGestion::release(), and NLAISCRIPT::CCodeBrancheRunDebug::setLineCode().
|
|
Get a clone pointer memory.
Implements NLAISCRIPT::IConstraint. Definition at line 87 of file constraint_debug.cpp. References CConstraintDebug(), and x.
00088 { 00089 IConstraint *x = new CConstraintDebug(_Lin,_Col); 00090 return x; 00091 } |
|
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 }
|
|
Not used.
Implements NLAISCRIPT::IConstraint. Definition at line 100 of file constraint_debug.cpp.
00101 { 00102 return false; 00103 } |
|
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 } |
|
Get the opCode colone number in source texte.
Implements NLAISCRIPT::IConstraint. Definition at line 85 of file constraint_debug.h.
00085 {return _Col;} |
|
Not used.
Implements NLAISCRIPT::IConstraint. Definition at line 82 of file constraint_debug.cpp.
00083 {
00084 return NULL;
00085 }
|
|
|
Get the error message.
Implements NLAISCRIPT::IConstraint. Definition at line 70 of file constraint_debug.cpp.
00071 { 00072 strcpy(txt,_Txt); 00073 } |
|
Not used.
Implements NLAISCRIPT::IConstraint. Definition at line 94 of file constraint_debug.cpp.
00095 { 00096 return "Y ?"; 00097 } |
|
Get the opCode line number in source texte.
Implements NLAISCRIPT::IConstraint. Definition at line 82 of file constraint_debug.h.
00082 {return _Lin;} |
|
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 }
|
|
get the type of class. the type must be in the ConstraintTypeEnum enumeration.
Implements NLAISCRIPT::IConstraint. Definition at line 67 of file constraint_debug.h.
00067 {return constraintDebug;} |
|
|
Not used.
Implements NLAISCRIPT::IConstraint. Definition at line 76 of file constraint_debug.cpp.
00077 { 00078 return false; 00079 } |
|
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 } |
|
|
Run with a IConstraint dependency.
Implements NLAISCRIPT::IConstraint. Definition at line 65 of file constraint_debug.cpp.
00066 { 00067 _Satisfied = true; 00068 } |
|
Run with a CCompilateur dependency.
Implements NLAISCRIPT::IConstraint. Definition at line 60 of file constraint_debug.cpp.
00061 {; 00062 _Satisfied = true; 00063 } |
|
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 NLAISCRIPT::CConstraintMethode::setOpCode().
00215 { 00216 while(_ConstraintList.size()) 00217 { 00218 IConstraint *a = _ConstraintList.back(); 00219 _ConstraintList.pop_back(); 00220 a->run(this); 00221 } 00222 } |
|
If the constraint is resolved.
Implements NLAISCRIPT::IConstraint. Definition at line 42 of file constraint_debug.cpp.
00043 { 00044 return _Satisfied; 00045 } |
|
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 } |
|
Index in the CCodeBrancheRun.
Definition at line 48 of file constraint_debug.h. |
|
OpCode line number in source texte.
Definition at line 46 of file constraint_debug.h. |
|
OpCode colone number in source texte.
Definition at line 47 of file constraint_debug.h. |
|
Is the constraint satified ?
Definition at line 45 of file constraint_debug.h. |
|
Definition at line 44 of file constraint_debug.h. |
|
Pointer to the CCodeBrancheRun.
Definition at line 49 of file constraint_debug.h. |