1 // vim: set expandtab tabstop=4 shiftwidth=4:
14 const string indent = " ";
16 vars["NOMBRE"] = "Luca man";
19 cout << "HIT example:" << endl;
20 cout << "============" << endl;
22 cout << indent << h.parse("test", vars) << endl << endl << endl;
24 cout << "GHIT example:" << endl;
25 cout << "=============" << endl;
26 vars["NOMBRE"] = "Pedro";
29 cout << "We are using the default group: '" << g.getGroup() << "'." << endl;
30 cout << indent << g.parse("test", vars) << endl;
31 g.pushGroup("tpldir");
32 cout << "We start using the '" << g.getGroup() << "' group." << endl;
33 cout << indent << g.parse("test2", vars) << endl;
34 cout << "We stop using '";
35 cout << g.popGroup() << "' group, and go back to default one ('";
36 cout << g.getGroup() << "')." << endl;
37 cout << indent << g.parse("test", vars) << endl << endl << endl;
39 cout << "CHIT example:" << endl;
40 cout << "=============" << endl;
41 CHIT c("././././././", ".tpl.html");
43 for (int i = n; i < (n+10); i++) {
44 stringstream ssi, ssc;
47 vars["NOMBRE"] = "Chit gay " + ssc.str();
48 vars["EDAD"] = ssi.str();
49 cout << indent << c.parse("test", vars) << endl;