X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/blobdiff_plain/0271add7a00a56a975c4e8da67fd3dbbeab2483b..65bbdd707ba33de08101076a7191585d6f44c507:/chit.h/software/bife/bife++.git/blobdiff_plain/0271add7a00a56a975c4e8da67fd3dbbeab2483b..65bbdd707ba33de08101076a7191585d6f44c507:/chit.h diff --git a/chit.h b/chit.h index 22776f5..4043d29 100644 --- a/chit.h +++ b/chit.h @@ -7,48 +7,53 @@ #include "hash.h" #include -using std::string; - -/** - * Cache enabled GHIT. - * - * GHIT with cache capabilities added. The templates are stored in memory once - * they are readed and reused in succesive parse() calls, avoiding disc reads - * overhead. - * - * @todo See if it's really usefull, since the OS is supposed to be in charge - * of disc cache. - */ -class CHIT: public GHIT { - // Attributes. - protected: - /// Cache storage. - Hash cache; - - // Methods. - protected: - /** - * Gets cached file content. - * - * @param filename Name of the file to get the content. - * @return File content. - */ - virtual string getFileContent(string); - - public: - /** - * Constructor. - * - * @param root Root directory from where to get the templates. - * @param postfix Postfix of the template files. - * @param group Starting group. - */ - CHIT(string = string("."), string = string(".tpl"), string = string("")); - - /** - * Destructor. - */ - virtual ~CHIT(void); -}; +namespace bife { + + using std::string; + + /** + * Cache enabled GHIT. + * + * GHIT with cache capabilities added. The templates are stored in memory once + * they are readed and reused in succesive parse() calls, avoiding disc reads + * overhead. + * + * @todo See if it's really usefull, since the OS is supposed to be in charge + * of disc cache. + */ + class CHIT: public GHIT { + // Attributes. + protected: + /// Cache storage. + Hash cache; + + // Methods. + protected: + /** + * Gets cached file content. + * + * @param filename Name of the file to get the content. + * @return File content. + */ + virtual string getFileContent(const string&); + + public: + /** + * Constructor. + * + * @param root Root directory from where to get the templates. + * @param postfix Postfix of the template files. + * @param group Starting group. + */ + CHIT(const string& = string("."), const string& = string(".tpl"), + const string& = string("")); + + /** + * Destructor. + */ + virtual ~CHIT(void); + }; + +} #endif