Generated from ./src/account.cpp with ROBODoc v4.0.2 on Sun May 25 16:39:22 2003

Anvil/Account

NAME

  Account class

USAGE

  #include "account.h"
  Account a = new Account();

AUTHOR

  Joseph M. Robertson, jmr, jmrobert5@mchsi.com

COPYRIGHT

 (c) 2001 by Joseph M. Robertson

CREATION DATE

  11/18/99

HISTORY



Anvil/Account::Name

NAME

  Name - the account name, a string.

SYNOPSIS

  string Account::Name()
  void Account::Name(string value)

PURPOSE

  Use to get/set the account name.
  More than one account may be created, and this provides a convenient
  way to list, search and choose accounts.  This is free and is not
  linked to any other inputs.

Anvil/Account::State

NAME

  State - the account state, a string.

SYNOPSIS

  string Account::State()
  void Account::State(string value)

PURPOSE

  Use to get/set the account state.
  Accounts can have a state of operation regarding the datas validity.
  Open accounts are current and working.
  Closed accounts are inactive but still show in lists for reporting
    purposes.
  Inactive accounts are archived.  They are only available for special
    reporting purposes.  But generally are not visible.

Anvil/Account::Type

NAME

  Type - the account type, a string.

SYNOPSIS

  string Account::Type()
  void Account::Type(string value)

PURPOSE

  Use to get/set the account type.
  Accounts are typed within Quicken.  This is defined by the first line
  of the qif file (the ! line item).  Generally speaking we should not 
  allow changes to the type, but it is a library and we can create
  new accounts so its here.

Anvil/Account::Balance

NAME

  Balance - the account balance, a float value.

SYNOPSIS

  float Account::Balance()

PURPOSE

  Use to get the account balance.
  Account balances are tracked at each transaction (they are a part of 
  the transaction class).  So whenever a transaction is altered a 
  calculation occurs from that point to the end of the list to recalc 
  all the balances.

Anvil/Account::Size

NAME

  Size - the number of transactions in the account, a int value.

SYNOPSIS

  int Account::Size()

PURPOSE

  Use to get the number of transactions in the account.

Anvil/Account::File

NAME

  File - the account filename,  a string value.

SYNOPSIS

  string Account::File()

PURPOSE

  Use to get the filename that was read or that the account will
  be written to.

Anvil/Account::Read

NAME

  Read - open a qif file and populate the account.

SYNOPSIS

  void Account::Read(string file)

PURPOSE

  Use to open a qif data file and populate the account
  transaction list.

SIDE EFFECTS

  Sets the filename value returned in Account::File and 
  also used in Account::Write below.

Anvil/Account::Write

NAME

  Write - write the qif file to disk.

SYNOPSIS

  void Account::Write()
  void Account::Write(string file)

PURPOSE

  Use to save a qif data file to disk.  If no input is given write
  will use 'filename' value set internally by the Account::Read
  method.  Otherwise, a passed in value will be the filename.
  Normal POSIX path specs apply.

Anvil/Account::Add

NAME

  Add - add a new, blank transaction to the account transaction list.

SYNOPSIS

  void Account::Add()

PURPOSE

  Use to add a new, blank transaction to the account transaction list.

TODO

  jmr...
  I think we should overload this.  If given a delimited string, then
  populate the transaction before adding it the the vector. 

Anvil/Account::Update

NAME

  Update - updates a transaction in the account
           with a new transaction object.

SYNOPSIS

  void Account::Update(int index, Transaction *trans)

PURPOSE

  To update the transaction item in the transaction list maintained 
  by the account. 

ERRORS

  Throws a Msg::Msg exception to the caller. 

TODO

  jmr...
  Implement a method that puts string data into a transaction
  object.

Anvil/Account::Delete

NAME

  Delete - deletes a transaction in the account.

SYNOPSIS

  void Account::Delete(int index)

PURPOSE

  To delete the transaction item from the account transaction list.

ERRORS

  Throws a Msg::Msg exception to the caller. 

SIDE EFFECTS

  Calls Account::Rebalance to recalculate the account balances for 
  each transaction after 'index'.

Anvil/Account::Void

NAME

  Void - voids a transaction in the account.

SYNOPSIS

  void Account::Void(int index)

PURPOSE

  To void the transaction item from the account transaction list.

SIDE EFFECTS

  Calls Account::Rebalance to recalculate the account balances for 
  each transaction after 'index'.

Anvil/Account::Get

NAME

  Get - retrieves a transaction in the account.

SYNOPSIS

  Transaction Account::Get(int index)

PURPOSE

  To retrieve a transaction item from the account transaction list.

RETURN VALUE

  A copy of a Transaction object.
  See Tranaction class docs for methods that can be used.

Anvil/Account::Rebalance

NAME

  Rebalance - recalculates the account balance.

TAGS

  Private Method - for developers only

SYNOPSIS

  void Account::Rebalance(int index)

PURPOSE

  To recalculate the balance of each transaction item in the account 
  transaction list after the point 'index'.

ERRORS

  Throws a Msg::Msg exception to the caller.