#ifndef RULE_H #define RULE_H #include #include #include #include #include "staticstring.h" class Rule { public: enum Matches { matchOne, matchAll }; enum Perform { perfCommand }; public: Rule( const char *sName ); virtual ~Rule(); const char *getName() { return sName; } void debug(); void addProduces( const char *sProduces ); void setMatches( Matches how, const char *sWhat ); void setPerforms( Perform pwhat, const char *sPerfCmd ); std::list execute( class Builder &bld, std::list lInput ); private: StaticString sName; std::list lProduces; Matches mHow; StaticString sWhat; regex_t rWhat; Perform pHow; StaticString sPerfCmd; }; #endif