39 memset(&data, 0,
sizeof(data));
42OfxStatementContainer::~OfxStatementContainer()
52 if (identifier ==
"CURDEF")
55 data.currency_valid = !value.empty();
57 else if (identifier ==
"MKTGINFO")
61 else if (identifier ==
"DTASOF")
65 else if (identifier ==
"DTSTART")
69 else if (identifier ==
"DTEND")
84 data.ledger_balance_valid = ptr_balance_container->amount_valid;
86 data.ledger_balance_date_valid = ptr_balance_container->
date_valid;
92 data.available_balance_valid = ptr_balance_container->amount_valid;
94 data.available_balance_date_valid = ptr_balance_container->
date_valid;
99 data.available_balance_valid = ptr_balance_container->amount_valid;
101 data.available_balance_date_valid = ptr_balance_container->
date_valid;
106 data.
buying_power = ptr_balance_container->buying_power;
107 data.buying_power_valid = ptr_balance_container->buying_power_valid;
118 if (MainContainer != NULL)
120 return MainContainer->add_container(
this);
130 libofx_context->statementCallback(data);
135void OfxStatementContainer::add_account(
OfxAccountData * account_data)
137 if (account_data->account_id_valid ==
true)
Represents the <BALANCE>, <INVBAL> or <INV401KBAL> OFX SGML entity.
bool margin_balance_valid
A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer.
std::string tag_identifier
virtual void add_attribute(const std::string identifier, const std::string value)
Add data to a container object.
The root container. Created by the <OFX> OFX element or by the export functions.
virtual int gen_event()
Generate libofx.h events.
virtual int add_to_main_tree()
Add this container to the main tree.
void add_attribute(const std::string identifier, const std::string value)
Add data to a container object.
Main header file containing the LibOfx API.
int message_out(OfxMsgType error_type, const std::string message)
Message output function.
Message IO functionality.
LibOFX internal object code.
time_t ofxdate_to_time_t(const std::string &ofxdate)
Convert a C++ string containing a time in OFX format to a C time_t.
Various simple functions for type conversion & al.
void STRNCPY(T &dest, const std::string &src)
#define ASSIGN_STRNCPY(DEST, VALUE)
#define ASSIGN(DEST, VALUE)
An abstraction of an account.
char account_id[OFX_ACCOUNT_ID_LENGTH]
char currency[OFX_CURRENCY_LENGTH]
time_t available_balance_date
time_t ledger_balance_date
struct OfxAccountData * account_ptr
char account_id[OFX_ACCOUNT_ID_LENGTH]
char marketing_info[OFX_MARKETING_INFO_LENGTH]