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