#include "hit.h"
#include "ghit.h"
#include "chit.h"
+#include "string.h"
+
+using namespace std;
+using namespace bife;
int main(void) {
const string indent = " ";
cout << "=============" << endl;
vars["NOMBRE"] = "Pedro";
vars["EDAD"] = "26";
- GHIT g;
+ GHIT g("./././");
cout << "We are using the default group: '" << g.getGroup() << "'." << endl;
cout << indent << g.parse("test", vars) << endl;
g.pushGroup("tpldir");
cout << "CHIT example:" << endl;
cout << "=============" << endl;
- CHIT c;
+ CHIT chit("././././././", ".tpl.html");
const int n = 65;
for (int i = n; i < (n+10); i++) {
stringstream ssi, ssc;
ssc << char(i);
vars["NOMBRE"] = "Chit gay " + ssc.str();
vars["EDAD"] = ssi.str();
- cout << indent << c.parse("test", vars) << endl;
+ cout << indent << chit.parse("test", vars) << endl;
}
+
+ cout << "bife::String example:" << endl;
+ cout << "=====================" << endl;
+ string s = "std::string";
+ String a("Un string");
+ String b = "Otro string";
+ //String c = s;
+ cout << "s: '" << s << "' - "
+ << "a: '" << a << "' - "
+ << "b: '" << b << endl;
+ cout << "a.render(): '" << a.render(chit) << "' - "
+ << "b.render(): '" << b.render(chit) << endl;
}