39 memset(&data, 0,
sizeof(data));
42 OfxStatementContainer::~OfxStatementContainer()
52 if (identifier ==
"CURDEF")
54 strncpy(data.
currency, value.c_str(), OFX_CURRENCY_LENGTH);
55 data.currency_valid =
true;
57 else if (identifier ==
"MKTGINFO")
59 strncpy(data.
marketing_info, value.c_str(), OFX_MARKETING_INFO_LENGTH);
60 data.marketing_info_valid =
true;
62 else if (identifier ==
"DTSTART")
65 data.date_start_valid =
true;
67 else if (identifier ==
"DTEND")
70 data.date_end_valid =
true;
83 data.ledger_balance_valid = ptr_balance_container->amount_valid;
85 data.ledger_balance_date_valid = ptr_balance_container->date_valid;
90 data.available_balance_valid = ptr_balance_container->amount_valid;
91 data.available_balance_date = ptr_balance_container->
date;
103 if (MainContainer != NULL)
105 return MainContainer->add_container(
this);
115 libofx_context->statementCallback(data);
120 void OfxStatementContainer::add_account(
OfxAccountData * account_data)
122 if (account_data->account_id_valid ==
true)
126 data.account_id_valid =
true;
time_t ledger_balance_date
virtual int gen_event()
Generate libofx.h events.
An abstraction of an account.
A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer.
char account_id[OFX_ACCOUNT_ID_LENGTH]
virtual void add_attribute(const string identifier, const string value)
Add data to a container object.
char marketing_info[OFX_MARKETING_INFO_LENGTH]
char account_id[OFX_ACCOUNT_ID_LENGTH]
int message_out(OfxMsgType error_type, const string message)
Message output function.
time_t ofxdate_to_time_t(const string ofxdate)
Convert a C++ string containing a time in OFX format to a C time_t.
struct OfxAccountData * account_ptr
Various simple functions for type conversion & al.
void add_attribute(const string identifier, const string value)
Add data to a container object.
int available_balance_date_valid
LibOFX internal object code.
Message IO functionality.
char currency[OFX_CURRENCY_LENGTH]
The root container. Created by the <OFX> OFX element or by the export functions.
Represents the <BALANCE> OFX SGML entity.
virtual int add_to_main_tree()
Add this container to the main tree.