#endif
}
-Container::Container(Hash attrs): Widget(attrs) {
+Container::Container(const Hash& attrs): Widget(attrs) {
#ifdef DEBUG
cerr << "In Container::Container(attrs = {" /* TODO << attrs */ << "});" << endl;
#endif
}
-Container::Container(Hash attrs, Widget& content): Widget(attrs) {
+Container::Container(const Hash& attrs, Widget* content): Widget(attrs) {
// FIXME - this->content.push_back(content);
#ifdef DEBUG
cerr << "In Container::Container(attrs = {" /* TODO << attrs */
#endif
}
-Container::Container(Widget& content, Hash attrs): Widget(attrs) {
+Container::Container(Widget* content, const Hash& attrs): Widget(attrs) {
// FIXME - this->content.push_back(content);
#ifdef DEBUG
cerr << "In Container::Container(content = {" /* TODO << content */
string Container::renderContent(HIT& hit) {
stringstream out;
for (Content::iterator i = content.begin(); i != content.end(); i++) {
- out << i->render(hit);
+ out << (*i)->render(hit);
}
return out.str();
}
+
+void Container::append(Widget* widget) {
+ content.push_back(widget);
+}