1 // vim: set expandtab tabstop=4 shiftwidth=4:
15 const string indent = " ";
17 vars["NOMBRE"] = "Luca man";
20 cout << "HIT example:" << endl;
21 cout << "============" << endl;
23 cout << indent << h.parse("test", vars) << endl << endl << endl;
25 cout << "GHIT example:" << endl;
26 cout << "=============" << endl;
27 vars["NOMBRE"] = "Pedro";
30 cout << "We are using the default group: '" << g.getGroup() << "'." << endl;
31 cout << indent << g.parse("test", vars) << endl;
32 g.pushGroup("tpldir");
33 cout << "We start using the '" << g.getGroup() << "' group." << endl;
34 cout << indent << g.parse("test2", vars) << endl;
35 cout << "We stop using '";
36 cout << g.popGroup() << "' group, and go back to default one ('";
37 cout << g.getGroup() << "')." << endl;
38 cout << indent << g.parse("test", vars) << endl << endl << endl;
40 cout << "CHIT example:" << endl;
41 cout << "=============" << endl;
42 CHIT chit("././././././", ".tpl.html");
44 for (int i = n; i < (n+10); i++) {
45 stringstream ssi, ssc;
48 vars["NOMBRE"] = "Chit gay " + ssc.str();
49 vars["EDAD"] = ssi.str();
50 cout << indent << chit.parse("test", vars) << endl;
53 cout << "bife::String example:" << endl;
54 cout << "=====================" << endl;
55 string s = "std::string";
56 String a("Un string");
57 String b = "Otro string";
59 cout << "s: '" << s << "' - "
60 << "a: '" << a << "' - "
61 << "b: '" << b << endl;
62 cout << "a.render(): '" << a.render(chit) << "' - "
63 << "b.render(): '" << b.render(chit) << endl;