# 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  

constraint_stack_component.h

Go to the documentation of this file.
00001 
00007 /* Copyright, 2000 Nevrax Ltd.
00008  *
00009  * This file is part of NEVRAX NEL.
00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2, or (at your option)
00013  * any later version.
00014 
00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * General Public License for more details.
00019 
00020  * You should have received a copy of the GNU General Public License
00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00023  * MA 02111-1307, USA.
00024  */
00025 #ifndef NL_CONSTRAINT_STACK_COMPONENT_H
00026 #define NL_CONSTRAINT_STACK_COMPONENT_H
00027 
00028 namespace NLAISCRIPT
00029 {
00030 
00040         class CConstraintStackComp: public IOpType              
00041         {
00042         public:
00044                 enum OpCodeType {
00046                         heapCall,
00048                         stackCall,
00050                         heapAffectation
00051                 };
00052         private:
00054                 IOpType *_TypeStack;
00056                 std::list<NLAISCRIPT::CStringType > _MemberName;
00057 
00059 
00060                 sint32 _Lin;
00061                 sint32 _Col;
00062                 bool _Satisfied;
00063                 char *_TxtInfo;
00064                 std::list<std::pair<sint32, CCodeBrancheRun *> > _Code;
00066 
00068                 NLAIC::CIdentType *_Id;
00070                 OpCodeType _OpCodeType;
00072                 sint32  _StackPos;
00073 
00074         public:
00075                 CConstraintStackComp(OpCodeType opCodeType,sint32 stackPos,const std::list<NLAISCRIPT::CStringType > &memberName,IOpType *typeStack,sint32 lign,sint32 col);
00077 
00078                 const char *getInfo() 
00079                 {
00080                         return _TxtInfo;
00081                 }
00082                 void run(CCompilateur &);
00083                 void run(IConstraint *);
00084                 bool satisfied()
00085                 {
00086                         return _Satisfied;
00087                 }
00088                 bool dependOn(const IConstraint *) const;
00089                 bool operator == (const IConstraint &c) const;
00090                 void addIndex(sint32 i,CCodeBrancheRun *c)
00091                 {
00092                         _Code.push_back(std::pair<sint32, CCodeBrancheRun *>(i,c));
00093                 }
00094                 void getError(char *) const;                            
00095                 const IConstraint *clone() const;
00096                 virtual ConstraintTypeEnum getTypeOfClass() const
00097                 {
00098                         return constraintStackComp;
00099                 }
00100 
00101                 const NLAIC::CIdentType *getConstraintTypeOf();
00102                 int getLine() const
00103                 {
00104                         return _Lin;
00105                 }
00106                 int getColone() const
00107                 {
00108                         return _Col;
00109                 }
00111 
00112                 virtual ~CConstraintStackComp();
00113 
00114         };
00115 }
00116 #endif