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

Class IConstraint. More...

#include <constraint.h>

Inheritance diagram for NLAISCRIPT::IConstraint:

NLAIC::IPointerGestion NLMISC::IStreamable NLMISC::IClassable NLAISCRIPT::CConstraintChkMethodeType NLAISCRIPT::CConstraintDebug NLAISCRIPT::CConstraintMethode NLAISCRIPT::IOpType NLAISCRIPT::CConstraintFindRun NLAISCRIPT::CConstraintStackComp NLAISCRIPT::COperandAnyObject NLAISCRIPT::COperandListType NLAISCRIPT::COperandSimple NLAISCRIPT::COperandSimpleListOr NLAISCRIPT::COperandUnknown NLAISCRIPT::COperandVoid NLAISCRIPT::COperationType NLAISCRIPT::COperationTypeGD List of all members.

Public Types

enum  ConstraintTypeEnum {
  constraintMethode, constraintChkMethodeType, operandSimple, operandSimpleListOr,
  operandAnyObject, operandVoid, operandUnknown, operationType,
  operationTypeGD, operandListType, constraintStackComp, constraintDebug,
  constraintFindRun
}
 This enum define all IConstraint class type defined. More...


Public Methods

 IConstraint ()
virtual void run (CCompilateur &)=0
 Run with a CCompilateur dependency. More...

virtual void run (IConstraint *)=0
 Run with a IConstraint dependency. More...

virtual bool satisfied ()=0
 If the constraint is resolved. More...

virtual void addIndex (int n, CCodeBrancheRun *opcodePtr)=0
 Add a op-code dependency. More...

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

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

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

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

virtual bool operator== (const IConstraint &) const=0
virtual const NLAIC::CIdentTypegetConstraintTypeOf ()=0
 Type of the expression that it have to be resolve by constraint. More...

virtual const IConstraint * clone () const=0
 Get a clone pointer memory. More...

virtual const char * getInfo ()=0
 Get a string info. More...

virtual bool dependOn (const IConstraint *) const=0
 If this constraint depond on other constraint. More...

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

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

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

virtual ~IConstraint ()

Private Attributes

std::list< IConstraint * > _ConstraintList
 List of constraint dependency. When constraint is resolve it call all constraint contain in this list and run its. More...


Detailed Description

Class IConstraint.

This class is a abstract class used for all back prossing work needed for the compiler. Earlier than do multy passing parssing, we chose to push all expression needed to be clarify in a list of IConstraint where its can auto-call them self.

Author:
Chafik sameh , Nevrax France
Date:
2000

Definition at line 129 of file constraint.h.


Member Enumeration Documentation

enum NLAISCRIPT::IConstraint::ConstraintTypeEnum
 

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.

Referenced by NLAISCRIPT::COperandListType::getTypeOfClass, NLAISCRIPT::COperationTypeGD::getTypeOfClass, NLAISCRIPT::COperationType::getTypeOfClass, NLAISCRIPT::COperandUnknown::getTypeOfClass, NLAISCRIPT::COperandSimpleListOr::getTypeOfClass, NLAISCRIPT::COperandSimple::getTypeOfClass, NLAISCRIPT::COperandAnyObject::getTypeOfClass, NLAISCRIPT::COperandVoid::getTypeOfClass, NLAISCRIPT::CConstraintChkMethodeType::getTypeOfClass, NLAISCRIPT::CConstraintStackComp::getTypeOfClass, NLAISCRIPT::CConstraintFindRun::getTypeOfClass, NLAISCRIPT::CConstraintDebug::getTypeOfClass, and NLAISCRIPT::CConstraintMethode::getTypeOfClass.


Constructor & Destructor Documentation

NLAISCRIPT::IConstraint::IConstraint   [inline]
 

Definition at line 173 of file constraint.h.

Referenced by addConstraint, NLAISCRIPT::CConstraintChkMethodeType::CConstraintChkMethodeType, NLAISCRIPT::CConstraintMethode::CConstraintMethode, NLAISCRIPT::COperandListType::clone, NLAISCRIPT::COperationTypeGD::clone, NLAISCRIPT::COperationType::clone, NLAISCRIPT::COperandUnknown::clone, NLAISCRIPT::COperandSimpleListOr::clone, NLAISCRIPT::COperandSimple::clone, NLAISCRIPT::COperandAnyObject::clone, NLAISCRIPT::COperandVoid::clone, NLAISCRIPT::CConstraintChkMethodeType::clone, NLAISCRIPT::CConstraintStackComp::clone, NLAISCRIPT::CConstraintFindRun::clone, NLAISCRIPT::CConstraintDebug::clone, NLAISCRIPT::CConstraintMethode::clone, NLAISCRIPT::COperandUnknown::COperandUnknown, NLAISCRIPT::COperandListType::dependOn, NLAISCRIPT::COperationTypeGD::dependOn, NLAISCRIPT::COperationType::dependOn, NLAISCRIPT::COperandUnknown::dependOn, NLAISCRIPT::COperandSimpleListOr::dependOn, NLAISCRIPT::COperandSimple::dependOn, NLAISCRIPT::COperandAnyObject::dependOn, NLAISCRIPT::COperandVoid::dependOn, NLAISCRIPT::CConstraintChkMethodeType::dependOn, NLAISCRIPT::CConstraintMethode::dependOn, NLAISCRIPT::COperandListType::operator==, NLAISCRIPT::COperationTypeGD::operator==, NLAISCRIPT::COperationType::operator==, NLAISCRIPT::COperandUnknown::operator==, NLAISCRIPT::COperandSimpleListOr::operator==, NLAISCRIPT::COperandSimple::operator==, NLAISCRIPT::COperandAnyObject::operator==, NLAISCRIPT::COperandVoid::operator==, NLAISCRIPT::CConstraintMethode::operator==, NLAISCRIPT::COperationTypeGD::run, NLAISCRIPT::COperationType::run, NLAISCRIPT::COperandUnknown::run, NLAISCRIPT::IOpType::run, NLAISCRIPT::CConstraintMethode::run, and runConnexcion.

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

Definition at line 224 of file constraint.h.


Member Function Documentation

void NLAISCRIPT::IConstraint::addConstraint IConstraint *    c [inline]
 

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 IConstraint.

virtual void NLAISCRIPT::IConstraint::addIndex int    n,
CCodeBrancheRun   opcodePtr
[pure virtual]
 

Add a op-code dependency.

the integer n is the index of the opcode in in the opcodePtr pointer.

Implemented in NLAISCRIPT::CConstraintMethode.

virtual const IConstraint* NLAISCRIPT::IConstraint::clone   const [pure virtual]
 

Get a clone pointer memory.

Implemented in NLAISCRIPT::CConstraintMethode.

virtual bool NLAISCRIPT::IConstraint::dependOn const IConstraint *    const [pure virtual]
 

If this constraint depond on other constraint.

Implemented in NLAISCRIPT::CConstraintMethode.

virtual int NLAISCRIPT::IConstraint::getColone   const [pure virtual]
 

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

Implemented in NLAISCRIPT::CConstraintMethode.

virtual const NLAIC::CIdentType* NLAISCRIPT::IConstraint::getConstraintTypeOf   [pure virtual]
 

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

Implemented in NLAISCRIPT::CConstraintMethode.

Referenced by NLAISCRIPT::IOpType::eval, and NLAISCRIPT::IOpType::evalParam.

virtual void NLAISCRIPT::IConstraint::getError char *    const [pure virtual]
 

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

Implemented in NLAISCRIPT::CConstraintMethode.

virtual const char* NLAISCRIPT::IConstraint::getInfo   [pure virtual]
 

Get a string info.

Implemented in NLAISCRIPT::CConstraintMethode.

virtual int NLAISCRIPT::IConstraint::getLine   const [pure virtual]
 

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

Implemented in NLAISCRIPT::CConstraintMethode.

virtual ConstraintTypeEnum NLAISCRIPT::IConstraint::getTypeOfClass   const [pure virtual]
 

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

Implemented in NLAISCRIPT::CConstraintMethode.

virtual bool NLAISCRIPT::IConstraint::operator== const IConstraint &    const [pure virtual]
 

Implemented in NLAISCRIPT::CConstraintMethode.

void NLAISCRIPT::IConstraint::popConstraint IConstraint *    c
 

pop the last constaint dependency.

Definition at line 32 of file constraint.cpp.

References _ConstraintList.

virtual void NLAISCRIPT::IConstraint::run IConstraint *    [pure virtual]
 

Run with a IConstraint dependency.

Implemented in NLAISCRIPT::CConstraintMethode.

virtual void NLAISCRIPT::IConstraint::run CCompilateur   [pure virtual]
 

Run with a CCompilateur dependency.

Implemented in NLAISCRIPT::CConstraintMethode.

void NLAISCRIPT::IConstraint::runConnexcion   [inline]
 

When a constraint is resoved,we call all dependency.

Definition at line 214 of file constraint.h.

References IConstraint.

Referenced by NLAISCRIPT::CConstraintChkMethodeType::run, NLAISCRIPT::CConstraintFindRun::setOpCode, and NLAISCRIPT::CConstraintMethode::setOpCode.

virtual bool NLAISCRIPT::IConstraint::satisfied   [pure virtual]
 

If the constraint is resolved.

Implemented in NLAISCRIPT::CConstraintMethode.


Member Data Documentation

std::list<IConstraint *> NLAISCRIPT::IConstraint::_ConstraintList [private]
 

List of constraint dependency. When constraint is resolve it call all constraint contain in this list and run its.

Definition at line 170 of file constraint.h.

Referenced by popConstraint.


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