lib/ofx_aggregate.hh
Go to the documentation of this file.
/***************************************************************************
ofx_aggregate.hh
-------------------
copyright : (C) 2005 by Ace Jones
email : acejones@users.sourceforge.net
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef OFX_AGGREGATE_H
#define OFX_AGGREGATE_H
#include <string>
using namespace std;
class OfxAggregate
{
public:
OfxAggregate( const string& tag ): m_tag( tag )
{}
void Add( const string& tag, const string& data )
{
m_contents += string("<") + tag + string(">") + data + string("\r\n");
}
void AddXml( const string& tag, const string& data )
{
m_contents += string("<") + tag + string(">") + data + string("</") + tag + string(">") + string("\r\n");
}
void Add( const OfxAggregate& sub )
{
m_contents += sub.Output();
}
string Output( void ) const
{
return string("<") + m_tag + string(">\r\n") + m_contents + string("</") + m_tag + string(">\r\n");
}
private:
string m_tag;
string m_contents;
};
#endif // OFX_AGGREGATE_H
std
OfxAggregate
A single aggregate as described in the OFX 1.02 specification.
Definition: build/libofx-0.10.0/lib/ofx_aggregate.hh:42
OfxAggregate::Add
void Add(const string &tag, const string &data)
Definition: lib/ofx_aggregate.hh:59
OfxAggregate::Output
string Output(void) const
Definition: build/libofx-0.10.0/lib/ofx_aggregate.hh:90
OfxAggregate::Add
void Add(const OfxAggregate &sub)
Definition: lib/ofx_aggregate.hh:80
OfxAggregate::AddXml
void AddXml(const string &tag, const string &data)
Definition: lib/ofx_aggregate.hh:70
OfxAggregate::OfxAggregate
OfxAggregate(const string &tag)
Definition: lib/ofx_aggregate.hh:50