]> git.llucax.com Git - software/bife/bife++.git/blob - container.h
Lowercased XML tags.
[software/bife/bife++.git] / container.h
1 // vim: set expandtab tabstop=4 shiftwidth=4:
2
3 #ifndef BIFE_CONTAINER_H
4 #define BIFE_CONTAINER_H
5
6 #include "widget.h"
7 #include "hit.h"
8 #include "hash.h"
9 #include <vector>
10 #include <string>
11
12 namespace bife {
13
14     using std::string;
15
16     /**
17      * Base Container Class.
18      *
19      * @todo 
20      */
21     class Container: public Widget {
22         // Typedefs
23         protected:
24             typedef std::vector<Widget> Content;
25
26         // Attributes.
27         protected:
28             /// Content.
29             Content content;
30
31         // Methods.
32         public:
33             /**
34              * Constructor.
35              */
36             Container(void);
37
38             /**
39              * Constructor.
40              *
41              * @param attrs Widget attributes.
42              */
43             Container(const Hash&);
44
45             /**
46              * Constructor.
47              *
48              * @param attrs   Widget attributes.
49              * @param content Content of the widget.
50              */
51             Container(const Hash&, Widget&);
52
53             /**
54              * Constructor.
55              *
56              * @param content Content of the widget.
57              * @param attrs   Widget attributes.
58              */
59             Container(Widget&, const Hash&);
60
61             /**
62              * Destructor.
63              */
64             virtual ~Container(void);
65
66             /**
67              * Renders the widget using a HIT template.
68              *
69              * @param  hit HIT template to use to render de widget.
70              * @return Rendered widget.
71              */
72             virtual string renderContent(HIT&);
73     };
74
75 }
76
77 #endif