39 memset(&data, 0,
sizeof(data));
41 if (para_tag_identifier ==
"CCACCTFROM")
45 ASSIGN(data.account_type, data.OFX_CREDITCARD);
47 if (para_tag_identifier ==
"INVACCTFROM")
51 ASSIGN(data.account_type, data.OFX_INVESTMENT);
53 if (parentcontainer != NULL
54 && parentcontainer->type ==
"STATEMENT"
60OfxAccountContainer::~OfxAccountContainer()
71 if ( identifier ==
"BANKID")
76 else if ( identifier ==
"BRANCHID")
81 else if ( identifier ==
"ACCTID")
86 else if ( identifier ==
"ACCTKEY")
90 else if ( identifier ==
"BROKERID")
95 else if ((identifier ==
"ACCTTYPE") || (identifier ==
"ACCTTYPE2"))
97 data.account_type_valid =
true;
98 if (value ==
"CHECKING")
102 else if (value ==
"SAVINGS")
106 else if (value ==
"MONEYMRKT")
110 else if (value ==
"CREDITLINE")
114 else if (value ==
"CMA")
116 data.account_type = data.
OFX_CMA;
121 data.account_type_valid =
false;
133 libofx_context->accountCallback(data);
141 if (MainContainer != NULL)
143 return MainContainer->add_container(
this);
151void OfxAccountContainer::gen_account_id(
void)
162 m_acctid +
" at broker " + m_brokerid);
169 data.account_id_valid =
true;
virtual int gen_event()
Generate libofx.h events.
void add_attribute(const std::string identifier, const std::string value)
Add data to a container object.
int add_to_main_tree()
Add this container to the main tree.
A generic container for an OFX SGML element. Every container inherits from OfxGenericContainer.
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.
Represents a statement for either a bank account or a credit card account.
Main header file containing the LibOfx API.
Message IO functionality.
LibOFX internal object code.
Various simple functions for type conversion & al.
void STRNCPY(T &dest, const std::string &src)
#define ASSIGN_STRNCPY(DEST, VALUE)
#define ASSIGN(DEST, VALUE)
char bank_id[OFX_BANKID_LENGTH]
char account_name[OFX_ACCOUNT_NAME_LENGTH]
char account_number[OFX_ACCTID_LENGTH]
char account_id[OFX_ACCOUNT_ID_LENGTH]