[Compbench-devel] CompBenchmarks++/libcompbenchmarks/CEL CEL-Include.cpp, NONE, 1.1 CEL-Include.h,
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-03-06 19:30:19
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/CEL In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29963 Added Files: CEL-Include.cpp CEL-Include.h Log Message: First import. --- NEW FILE: CEL-Include.h --- /* ---------------------------------------------------------------------------- $Id: CEL-Include.h,v 1.1 2007/03/06 19:30:01 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #ifndef H_CBM_CELINCLUDE #define H_CBM_CELINCLUDE 1 #include <CEL/CEL-Atom.h> namespace CBM { /** \brief ? */ class CelInclude : public CelAtom { protected: virtual std::string xmlEntityName(void); public: CelInclude(); virtual std::string Evaluate(void); virtual ~CelInclude(); }; } #endif --- NEW FILE: CEL-Include.cpp --- /* ---------------------------------------------------------------------------- $Id: CEL-Include.cpp,v 1.1 2007/03/06 19:30:01 xfred Exp $ This is free software. For details, see the GNU Public License in the COPYING file, or Look http://www.fsf.org ------------------------------------------------------------------------- */ #include <CEL/CEL-Include.h> #include <CEL/CEL-Reader.h> using namespace CBM; CelInclude::CelInclude() : CelAtom() { } std::string CelInclude::xmlEntityName(void) { return("cel-include"); } std::string CelInclude::Evaluate(void) { int n = childs.size(); int i; CelAtom *N; CelAtom *I; std::string r; if (!n) return("0"); for(i=0; i<n; i++) { N=childs[i]; CelReader R(N->Evaluate()); I=R.parse(); r=I->Evaluate(); } return(r); } CelInclude::~CelInclude() { } |