conexpr.hh string gecode/flatzinc/ast.hh /usr/include/gecode/flatzinc/parser.hh /usr/include/gecode/flatzinc.hh Gecode::FlatZinc::ConExpr Gecode Gecode::FlatZinc /*-*-mode:C++;c-basic-offset:2;indent-tabs-mode:nil-*-*/ /* *Mainauthors: *GuidoTack<tack@gecode.org> * *Copyright: *GuidoTack,2007 * *Lastmodified: *$Date:2011-08-2308:45:41+0200(Tue,23Aug2011)$by$Author:tack$ *$Revision:12336$ * *ThisfileispartofGecode,thegenericconstraint *developmentenvironment: *http://www.gecode.org * *Permissionisherebygranted,freeofcharge,toanypersonobtaining *acopyofthissoftwareandassociateddocumentationfiles(the *"Software"),todealintheSoftwarewithoutrestriction,including *withoutlimitationtherightstouse,copy,modify,merge,publish, *distribute,sublicense,and/orsellcopiesoftheSoftware,andto *permitpersonstowhomtheSoftwareisfurnishedtodoso,subjectto *thefollowingconditions: * *Theabovecopyrightnoticeandthispermissionnoticeshallbe *includedinallcopiesorsubstantialportionsoftheSoftware. * *THESOFTWAREISPROVIDED"ASIS",WITHOUTWARRANTYOFANYKIND, *EXPRESSORIMPLIED,INCLUDINGBUTNOTLIMITEDTOTHEWARRANTIESOF *MERCHANTABILITY,FITNESSFORAPARTICULARPURPOSEAND *NONINFRINGEMENT.INNOEVENTSHALLTHEAUTHORSORCOPYRIGHTHOLDERSBE *LIABLEFORANYCLAIM,DAMAGESOROTHERLIABILITY,WHETHERINANACTION *OFCONTRACT,TORTOROTHERWISE,ARISINGFROM,OUTOFORINCONNECTION *WITHTHESOFTWAREORTHEUSEOROTHERDEALINGSINTHESOFTWARE. * */ #ifndef__GECODE_FLATZINC_CONEXPR_HH__ #define__GECODE_FLATZINC_CONEXPR_HH__ #include<string> #include<gecode/flatzinc/ast.hh> namespaceGecode{namespaceFlatZinc{ classConExpr{ public: std::stringid; AST::Array*args; ConExpr(conststd::string&id0,AST::Array*args0); AST::Node*operator[](inti)const; intsize(void)const; ~ConExpr(void); }; forceinline ConExpr::ConExpr(conststd::string&id0,AST::Array*args0) :id(id0),args(args0){} forceinlineAST::Node* ConExpr::operator[](inti)const{returnargs->a[i];} forceinlineint ConExpr::size(void)const{returnargs->a.size();} forceinline ConExpr::~ConExpr(void){ deleteargs; } }} #endif //STATISTICS:flatzinc-any