1 // vim: set expandtab tabstop=4 shiftwidth=4:
6 using std::stringstream;
15 Fallback::Fallback(const string& name): name(name) {
17 cerr << "In Fallback::Fallback(name = '" << name << "');" << endl;
21 Fallback::Fallback(const string& name, const Hash& attrs):
22 Container(attrs), name(name) {
24 cerr << "In Fallback::Fallback(name = '" << name
25 << "', attrs = {" /* TODO << attrs */ << "});" << endl;
29 Fallback::Fallback(const string& name, const Hash& attrs, Widget& content):
30 Container(attrs, content), name(name) {
31 // FIXME - this->content.push_back(content);
33 cerr << "In Fallback::Fallback(name = '" << name
34 << "', attrs = {" /* TODO << attrs */
35 << "}, content = {" /* TODO << content */ << "});" << endl;
39 Fallback::Fallback(const string& name, Widget& content, const Hash& attrs):
40 Container(content, attrs), name(name) {
41 // FIXME - this->content.push_back(content);
43 cerr << "In Fallback::Fallback(name = '" << name
44 << "', content = {" /* TODO << content */
45 << "}, attrs = {" /* TODO << attrs */ << "});" << endl;
49 Fallback::~Fallback(void) {
51 cerr << "In Fallback destructor." << endl;
56 string Fallback::render(HIT& hit) {
58 out << "Fallback = attributes: [";
59 for (Hash::iterator i = attrs.begin(); i != --attrs.end(); i++) {
60 out << i->first << ": " << i->second << ", ";
62 Hash::iterator i = --attrs.end();
63 out << i->first << ": " << i->second << "] ";
64 out << "content: [" << renderContent(hit) << "]";