X-Git-Url: https://git.llucax.com/software/bife/bife%20%20.git/blobdiff_plain/0271add7a00a56a975c4e8da67fd3dbbeab2483b..993710aae023efaccb75b56eee2347c340bdc71d:/main.cpp/software/bife/bife++.git/blobdiff_plain/0271add7a00a56a975c4e8da67fd3dbbeab2483b..993710aae023efaccb75b56eee2347c340bdc71d:/main.cpp?ds=sidebyside diff --git a/main.cpp b/main.cpp index 92fbb6a..80de24d 100644 --- a/main.cpp +++ b/main.cpp @@ -6,8 +6,10 @@ #include "hit.h" #include "ghit.h" #include "chit.h" +#include "string.h" using namespace std; +using namespace bife; int main(void) { const string indent = " "; @@ -37,7 +39,7 @@ int main(void) { cout << "CHIT example:" << endl; cout << "=============" << endl; - CHIT c("././././././", ".tpl.html"); + CHIT chit("././././././", ".tpl.html"); const int n = 65; for (int i = n; i < (n+10); i++) { stringstream ssi, ssc; @@ -45,6 +47,18 @@ int main(void) { 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; }