1 // vim: set expandtab tabstop=4 shiftwidth=4:
14 * Hooks vs IT Template Engine.
16 * Hooks vs IT (HIT) is a simple template implementation, based on hooks
17 * and IT template systems.
19 * @todo Implementar buffers?
24 /// Root directory where to search for templates.
26 /// Postfix added to the blockname to convert it to a filename.
28 // bool search_path = false
29 // TODO - Para subclases
35 * Gets file name based on the blockname.
37 * @param blockname Name of the block to get the filename.
38 * @return Block's filename.
40 virtual string getFileName(const string&);
45 * @param filename Name of the file to get the content.
46 * @return File content.
48 virtual string getFileContent(const string&);
54 * @param root Root directory from where to get the templates.
55 * @param postfix Postfix of the template files.
57 HIT(const string& = string("."), const string& = string(".tpl"));
65 * Parses a block replacing keys with values in the hash.
67 * @param blockname Name of the block to parse.
68 * @param vars Hash containing the variable names and their values.
69 * @return Parsed block with variables replaced.
71 string parse(const string&, Hash&);