00001
00002
00003
00004
00005
00006
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OFX_AGGREGATE_H
00021 #define OFX_AGGREGATE_H
00022
00023 #include <string>
00024
00025 using namespace std;
00026
00042 class OfxAggregate
00043 {
00044 public:
00050 OfxAggregate( const string& tag ): m_tag( tag )
00051 {}
00052
00059 void Add( const string& tag, const string& data )
00060 {
00061 m_contents += string("<") + tag + string(">") + data + string("\r\n");
00062 }
00063
00069 void Add( const OfxAggregate& sub )
00070 {
00071 m_contents += sub.Output();
00072 }
00073
00079 string Output( void ) const
00080 {
00081 return string("<") + m_tag + string(">\r\n") + m_contents + string("</") + m_tag + string(">\r\n");
00082 }
00083
00084 private:
00085 string m_tag;
00086 string m_contents;
00087 };
00088
00089 #endif // OFX_AGGREGATE_H