DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::accounting::GeneralLedger Class Reference

Represents a general ledger that manages and facilitates financial transactions, account ledgers, and general accounting operations. More...

#include <LedgerBooks.h>

Collaboration diagram for drn::accounting::GeneralLedger:

Public Member Functions

 GeneralLedger ()
 Default construction of an empty valid general ledger.
 
 GeneralLedger (std::map< AccountNumber, LedgerAccount > ledgers, std::optional< AccountNumber > openingAccountNumber={})
 Fully initalises the object to the supplied values.
 
AccountCode accountCode (const AccountNumber &accountNumber) const
 Provides the account code for a requested account number.
 
std::set< AccountCodeaccountCodes () const noexcept
 Provides all the known account codes in the general ledger.
 
std::set< AccountCodeaccountCodes (const AccountTypes &type) const noexcept
 Provides all the known account codes in the general ledger of a specific type.
 
std::set< AccountCodeaccountCodes (const std::set< AccountNumber > &accountNumbers) const
 Provides the account codes for a requested selection of account numbers.
 
std::set< Accountaccounts () const noexcept
 Provides all the known accounts in the general ledger.
 
std::optional< TransactionNumberadd (const Account &toAdd, AccountNumberGenerator &generator)
 Adds a new account to general ledger books.
 
bool canRemove (const AccountCode &code) const noexcept
 Determines if an account can be removed.
 
void clear (const std::set< TransactionNumber > &txnNums)
 Marks all the transactions supplied as cleared.
 
void clear (const TransactionNumber &txnNum)
 Marks the transaction for both accounts involved in the transaction as cleared.
 
void clear (const TransactionNumber &txnNum, const AccountNumber &actNum)
 Marks the transaction of a single ledger account as cleared.
 
void close (const AccountNumber &an)
 Closes a ledger account.
 
void convertTo (const AccountNumber &convertAccount, const pecunia::Currency &code, AccountNumberGenerator &generator)
 Converts a ledger account's running balance from one currency into another. If the opening balance account is not created, it'll be created.
 
bool hasLedger (const AccountCode &code) const noexcept
 Determines if an account ledger book exits in the general ledger.
 
bool hasLedger (const AccountNumber &number) const noexcept
 Determines if an account ledger book exits in the general ledger.
 
bool isEmpty () const noexcept
 Determines if the general ledger is empty.
 
const LedgerAccountledger (const AccountCode &code) const
 Provides access to the ledger of a specific account.
 
const LedgerAccountledger (const AccountNumber &number) const
 Provides access to the ledger of a specific account.
 
const std::map< AccountNumber, LedgerAccount > & ledgers () const noexcept
 An accessor to the current ledgers in the general ledger.
 
std::set< AccountNumberlookUpChildren (const AccountNumber &parent) const noexcept
 Finds and retrieves the identifiers of all child accounts linked to the specified parent account. This method queries accounts hierarchically tied to the given parent and returns the results for further processing or display.
 
std::set< AccountNumberlookUpChildren (const AccountNumber &parent, const OpenStates &openState) const noexcept
 Identifies and retrieves all child accounts for a specified parent account, filtering by their open or closed status.
 
std::optional< TransactionlookUpTransaction (const TransactionNumber &txnNum) const noexcept
 Searches for a specific transaction.
 
void open (const AccountCode &code)
 Opens a ledger.
 
const std::optional< AccountNumber > & openingAccountNumber () const noexcept
 Provides the account code number for the ledger book tracking the opening account balances.
 
std::optional< TransactionopeningTransaction (const AccountNumber &account) const noexcept
 Locates the opening balance transaction of an account. The oldest transaction involving the general ledger's opening account is considered to be the opening balance.
 
bool operator!= (const GeneralLedger &other) const
 Inequality operator compares all members.
 
bool operator== (const GeneralLedger &other) const
 Equality operator compares all members.
 
TransactionNumber post (const Transaction &transaction)
 Posts a supplied transaction to the debiting and crediting accounts.
 
void recode (const AccountCode &toRecode, const AccountCode &recodeAs)
 Changes the code of a ledger book and recodes all transactions.
 
void reconcile (const std::set< TransactionNumber > &txnNums)
 Reconciles all transactions supplied.
 
void reconcile (const TransactionNumber &txnNum)
 Reconciles the transaction supplied.
 
void reconcile (const TransactionNumber &txnNum, const AccountNumber &actNum)
 Reconciles only those transactions supplied for a given account number.
 
TransactionNumber refund (const TransactionNumber &txnNum, const pecunia::Money &amount)
 Processes a refund for a previously recorded transaction.
 
void remove (const AccountNumber &an)
 Attempts to remove an account from the general ledger. This operation modifies the ledger books by erasing the specified account.
 
void remove (const std::set< TransactionNumber > &transactionNumbers)
 Removes all the transactions supplied.
 
void remove (const TransactionNumber &number)
 Removes the transaction supplied.
 
void repost (const TransactionNumber &number, const Transaction &transaction)
 Replaces a non-reconciled transaction with a new transaction.
 
void unreconcile (const std::set< TransactionNumber > &txnNums)
 Marks all the transactions supplied as unreconciled.
 
void unreconcile (const TransactionNumber &txnNum)
 Marks the transaction supplied as unreconciled.
 
void unreconcile (const TransactionNumber &txnNum, const AccountNumber &actNum)
 Marks the transaction supplied as unreconciled.
 

Friends

DRN_ACCOUNTING_EXPORT std::ostream & operator<< (std::ostream &o, const GeneralLedger &gl)
 Stream insertion operator for a human readable general ledger account.
 

Detailed Description

Represents a general ledger that manages and facilitates financial transactions, account ledgers, and general accounting operations.

It is used to handle bookkeeping operations by tracking accounts and their transactions. It upholds financial integrity by validating data during these operations. Furthermore, it contains all the account information relating to the accounting system’s assets, liabilities, capital, revenue, and expenses.

Constructor & Destructor Documentation

◆ GeneralLedger() [1/2]

drn::accounting::GeneralLedger::GeneralLedger ( )

Default construction of an empty valid general ledger.

Here is the caller graph for this function:

◆ GeneralLedger() [2/2]

drn::accounting::GeneralLedger::GeneralLedger ( std::map< AccountNumber, LedgerAccount > ledgers,
std::optional< AccountNumber > openingAccountNumber = {} )
explicit

Fully initalises the object to the supplied values.

Exceptions
AccountErrorWhen the opening account code is not present in the ledgers.
AccountErrorWhen the opening account code is not an AccountTypes::Capital type.
AccountErrorWhen the mapped account code does not match the ledger's account code.
AccountErrorWhen the account for a parent does not exist.
AccountErrorWhen a parent account refers to a child account.
TransactionErrorWhen a ledger account contains an invalid transaction number.
TransactionErrorWhen a ledger account contains a transaction for a debiting account that does not exist.
TransactionErrorWhen a ledger account contains a transaction for a crediting account that does not exist.
TransactionErrorWhen a ledger account contains a transaction that does not contain a matching transaction in the other ledger account.
TransactionErrorWhen a ledger account contains a transaction number that is not mapped to the same number.
Parameters
ledgersThe ledgers to store in the general ledger.
openingAccountNumberThe account number to use for the opening balance when opening an account.
Here is the call graph for this function:

Member Function Documentation

◆ accountCode()

AccountCode drn::accounting::GeneralLedger::accountCode ( const AccountNumber & accountNumber) const
nodiscard

Provides the account code for a requested account number.

Exceptions
AccountErrorWhen an account number does not have an account code.
Parameters
accountNumberThe account number to get the account code for.
Returns
The fully populated account code for the requested account number.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ accountCodes() [1/3]

std::set< AccountCode > drn::accounting::GeneralLedger::accountCodes ( ) const
nodiscardnoexcept

Provides all the known account codes in the general ledger.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ accountCodes() [2/3]

std::set< AccountCode > drn::accounting::GeneralLedger::accountCodes ( const AccountTypes & type) const
nodiscardnoexcept

Provides all the known account codes in the general ledger of a specific type.

Parameters
typeThe type of account to provide the codes for.
Here is the call graph for this function:

◆ accountCodes() [3/3]

std::set< AccountCode > drn::accounting::GeneralLedger::accountCodes ( const std::set< AccountNumber > & accountNumbers) const
nodiscard

Provides the account codes for a requested selection of account numbers.

Exceptions
AccountErrorWhen an account number does not have an account code.
Parameters
accountNumbersThe account numbers to get the account codes for.
Returns
The fully populated account codes for the requested account numbers.
Here is the call graph for this function:

◆ accounts()

std::set< Account > drn::accounting::GeneralLedger::accounts ( ) const
nodiscardnoexcept

Provides all the known accounts in the general ledger.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add()

std::optional< TransactionNumber > drn::accounting::GeneralLedger::add ( const Account & toAdd,
AccountNumberGenerator & generator )
nodiscard

Adds a new account to general ledger books.

Exceptions
AccountErrorWhen the account already exists.
AccountErrorWhen the account is closed.
AccountErrorWhen the account type is not known.
AccountErrorWhen the account code is not valid.
AccountErrorWhen the parent account type is different than the adding account.
Parameters
toAddThe new account to add to the ledger books.
generatorThe generator for new account numbers already to be used.
Postcondition
The general ledger contains a new ledger book for the account supplied. If there's an opening balance, it is entered as the first of the previous month.
Returns
The number of the transaction of the posted opening balance when there is one, not set when there isn't a balance to post.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ canRemove()

bool drn::accounting::GeneralLedger::canRemove ( const AccountCode & code) const
nodiscardnoexcept

Determines if an account can be removed.

Parameters
codeThe account code that should be checked.
Returns
Gives true when the criteria for removing an account is true, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear() [1/3]

void drn::accounting::GeneralLedger::clear ( const std::set< TransactionNumber > & txnNums)

Marks all the transactions supplied as cleared.

Parameters
txnNumsThe numbers of the transactions to be cleared.
Here is the call graph for this function:

◆ clear() [2/3]

void drn::accounting::GeneralLedger::clear ( const TransactionNumber & txnNum)

Marks the transaction for both accounts involved in the transaction as cleared.

Exceptions
ErrorWhen the transaction number does not exist in the ledger books.
Parameters
txnNumThe number of the transaction to be cleared.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear() [3/3]

void drn::accounting::GeneralLedger::clear ( const TransactionNumber & txnNum,
const AccountNumber & actNum )

Marks the transaction of a single ledger account as cleared.

Exceptions
TransactionErrorWhen the transaction number does not exist in the ledger books.
AccountErrorWhen the account number does not exist in the ledger books.
Parameters
txnNumThe number of the transaction to be cleared.
actNumThe number of the ledger account whose transaction should be cleared.
Here is the call graph for this function:

◆ close()

void drn::accounting::GeneralLedger::close ( const AccountNumber & an)

Closes a ledger account.

Exceptions
AccountErrorThrown if the account does not exist in the ledger.
AccountErrorThrown if the account has non-reconciled transactions.
AccountErrorThrown if the account is a parent account of other non-closed accounts.
Parameters
anThe unique identifier of the account to be closed.
Postcondition
The specified account is marked as closed.
If the account is the opening account, the opening account reference is reset.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convertTo()

void drn::accounting::GeneralLedger::convertTo ( const AccountNumber & convertAccount,
const pecunia::Currency & code,
AccountNumberGenerator & generator )

Converts a ledger account's running balance from one currency into another. If the opening balance account is not created, it'll be created.

Exceptions
TransactionErrorWhen the supplied currency code to convert to is unknown.
TransactionErrorWhen the account to convert is closed.
AccountErrorWhen the account to convert does not exist.
AccountErrorWhen the account in already in the currency code to convert to.
Parameters
convertAccountThe ledger account to convert.
codeThe currency to convert the ledger account into.
generatorThe generator for new account numbers already to be used.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasLedger() [1/2]

bool drn::accounting::GeneralLedger::hasLedger ( const AccountCode & code) const
nodiscardnoexcept

Determines if an account ledger book exits in the general ledger.

Parameters
codeThe account code whose ledger status is desired.
Returns
Gives true when the account ledger exists, false else-wise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasLedger() [2/2]

bool drn::accounting::GeneralLedger::hasLedger ( const AccountNumber & number) const
nodiscardnoexcept

Determines if an account ledger book exits in the general ledger.

Parameters
numberThe account number whose ledger status is desired.
Returns
Gives true when the account ledger exists, false else-wise.
Here is the call graph for this function:

◆ isEmpty()

bool drn::accounting::GeneralLedger::isEmpty ( ) const
nodiscardnoexcept

Determines if the general ledger is empty.

Returns
Gives true when there are not any accounts, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ledger() [1/2]

const LedgerAccount & drn::accounting::GeneralLedger::ledger ( const AccountCode & code) const
nodiscard

Provides access to the ledger of a specific account.

Exceptions
AccountErrorWhen the ledger book for the supplied account code does not exist.
Parameters
codeThe account code whose ledger is desired.
Returns
The immutable account ledger book.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ledger() [2/2]

const LedgerAccount & drn::accounting::GeneralLedger::ledger ( const AccountNumber & number) const
nodiscard

Provides access to the ledger of a specific account.

Exceptions
AccountErrorWhen the ledger book for the supplied account code does not exist.
Parameters
numberThe account number whose ledger is desired.
Returns
The immutable account ledger book.
Here is the call graph for this function:

◆ ledgers()

const std::map< AccountNumber, LedgerAccount > & drn::accounting::GeneralLedger::ledgers ( ) const
nodiscardnoexcept

An accessor to the current ledgers in the general ledger.

Returns
The stored ledger accounts each indexed by its account number.
Here is the caller graph for this function:

◆ lookUpChildren() [1/2]

std::set< AccountNumber > drn::accounting::GeneralLedger::lookUpChildren ( const AccountNumber & parent) const
nodiscardnoexcept

Finds and retrieves the identifiers of all child accounts linked to the specified parent account. This method queries accounts hierarchically tied to the given parent and returns the results for further processing or display.

Parameters
parentThe identifier of the parent account whose child accounts are to be retrieved.
Returns
A set containing the identifiers of the child accounts if there are any linked to the specified parent, or an empty set if no children exist.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lookUpChildren() [2/2]

std::set< AccountNumber > drn::accounting::GeneralLedger::lookUpChildren ( const AccountNumber & parent,
const OpenStates & openState ) const
nodiscardnoexcept

Identifies and retrieves all child accounts for a specified parent account, filtering by their open or closed status.

This function parses through a collection of accounts, finding those that are directly subordinate to a specified parent account. It allows filtering based on whether the accounts are open, closed, or regardless of their state.

Parameters
parentThe account identifier for which child accounts are sought.
openStateThe desired open or closed status of accounts to be included in the result set.
Returns
A collection of account identifiers representing the child accounts of the specified parent account, filtered by the open or closed status.
Here is the call graph for this function:

◆ lookUpTransaction()

std::optional< Transaction > drn::accounting::GeneralLedger::lookUpTransaction ( const TransactionNumber & txnNum) const
nodiscardnoexcept

Searches for a specific transaction.

Parameters
txnNumThe transaction to search for.
Returns
Gives the transaction found with the given number, otherwise null.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ open()

void drn::accounting::GeneralLedger::open ( const AccountCode & code)

Opens a ledger.

Exceptions
AccountErrorWhen the account does not exist.
AccountErrorWhen the account to open is a child account whose parent is closed.
Parameters
codeThe account code of the account ledger book to open.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openingAccountNumber()

const std::optional< AccountNumber > & drn::accounting::GeneralLedger::openingAccountNumber ( ) const
nodiscardnoexcept

Provides the account code number for the ledger book tracking the opening account balances.

Returns
When set provides the account code number in the ledger book, otherwise null.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openingTransaction()

std::optional< Transaction > drn::accounting::GeneralLedger::openingTransaction ( const AccountNumber & account) const
nodiscardnoexcept

Locates the opening balance transaction of an account. The oldest transaction involving the general ledger's opening account is considered to be the opening balance.

Parameters
accountThe account number of the ledger to search for the opening balance.
Returns
Gives the opening transaction when it is present, null otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator!=()

bool drn::accounting::GeneralLedger::operator!= ( const GeneralLedger & other) const
nodiscard

Inequality operator compares all members.

Parameters
otherThe other object whose members should be not equal.
Returns
When any member variable is not the same it'll give true, else false.
Here is the call graph for this function:

◆ operator==()

bool drn::accounting::GeneralLedger::operator== ( const GeneralLedger & other) const
nodiscard

Equality operator compares all members.

Parameters
otherThe other object whose members should all be equal.
Returns
When all member variables are the same it'll give true, else false.
Here is the call graph for this function:

◆ post()

TransactionNumber drn::accounting::GeneralLedger::post ( const Transaction & transaction)
nodiscard

Posts a supplied transaction to the debiting and crediting accounts.

Exceptions
TransactionErrorWhen the transaction has a debiting account that is not in the ledger books.
TransactionErrorWhen the ledger book for the debiting account is closed.
TransactionErrorWhen the transaction has a crediting account that is not in the ledger books.
TransactionErrorWhen the ledger book for the crediting account is closed.
TransactionErrorWhen the transaction is not unreconciled.
AccountErrorWhen the transaction is for a currency that is unknown and the opening account does not exist.
TransactionErrorWhen the transaction is for a currency that is unknown.
Parameters
transactionThe transaction that is to be posted.
Returns
The transaction number for the posted transaction.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ recode()

void drn::accounting::GeneralLedger::recode ( const AccountCode & toRecode,
const AccountCode & recodeAs )

Changes the code of a ledger book and recodes all transactions.

Exceptions
AccountErrorWhen the current account does not exist.
AccountErrorWhen the account is closed.
AccountErrorWhen the changed account code is already in use.
AccountErrorWhen the account for a parent does not exist.
AccountErrorWhen a parent account refers to a child account.
Parameters
toRecodeThe account code of the account ledger book to change.
recodeAsThe account code of the account ledger book to change to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reconcile() [1/3]

void drn::accounting::GeneralLedger::reconcile ( const std::set< TransactionNumber > & txnNums)

Reconciles all transactions supplied.

Parameters
txnNumsThe numbers of the transactions to be reconciled.
Here is the call graph for this function:

◆ reconcile() [2/3]

void drn::accounting::GeneralLedger::reconcile ( const TransactionNumber & txnNum)

Reconciles the transaction supplied.

Exceptions
TransactionErrorWhen the transaction number does not exist in the ledger books.
Parameters
txnNumThe number of the transaction to be reconciled.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reconcile() [3/3]

void drn::accounting::GeneralLedger::reconcile ( const TransactionNumber & txnNum,
const AccountNumber & actNum )

Reconciles only those transactions supplied for a given account number.

Exceptions
TransactionErrorWhen a transaction number does not exist in the ledger books.
AccountErrorWhen the account to only reconcile is not a part of the transaction.
AccountErrorWhen the account to reconcile does not exist.
Parameters
actNumThe account whose transactions are to be reconciled.
txnNumThe numbers of the transactions to be reconciled.
Here is the call graph for this function:

◆ refund()

TransactionNumber drn::accounting::GeneralLedger::refund ( const TransactionNumber & txnNum,
const pecunia::Money & amount )
nodiscard

Processes a refund for a previously recorded transaction.

Exceptions
TransactionErrorif the specified original transaction does not exist.
TransactionErrorif the refund amount is greater than the original transaction amount.
Parameters
txnNumThe identifier of the transaction for which the refund is to be made.
amountThe amount to be refunded.
Postcondition
A new transaction is created to record the refund and is posted to the ledger.
Returns
The transaction number of the newly created refund transaction.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [1/3]

void drn::accounting::GeneralLedger::remove ( const AccountNumber & an)

Attempts to remove an account from the general ledger. This operation modifies the ledger books by erasing the specified account.

Exceptions
AccountErrorThrown when the account is not present in the ledger books.
AccountErrorThrown when the account is already closed.
AccountErrorThrown when attempting to remove an opening account with transactions.
AccountErrorThrown when attempting to remove a parent account with dependent child accounts.
Parameters
anRefers to the unique identifier of the account to be removed.
Postcondition
The specified account, if successfully removed, is no longer present in the ledger books.
If the specified account is the opening account, it will no longer be designated as such after the removal.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove() [2/3]

void drn::accounting::GeneralLedger::remove ( const std::set< TransactionNumber > & transactionNumbers)

Removes all the transactions supplied.

Exceptions
ErrorWhen a transaction number does not exist in the ledger books.
TransactionErrorWhen a transaction in the ledger books is already reconciled.
Parameters
transactionNumbersThe numbers of the transactions to be removed.
Here is the call graph for this function:

◆ remove() [3/3]

void drn::accounting::GeneralLedger::remove ( const TransactionNumber & number)

Removes the transaction supplied.

Exceptions
ErrorWhen a transaction number does not exist in the ledger books.
TransactionErrorWhen a transaction in the ledger books is already reconciled.
Parameters
numberThe number of the transaction to be removed.
Here is the call graph for this function:

◆ repost()

void drn::accounting::GeneralLedger::repost ( const TransactionNumber & number,
const Transaction & transaction )

Replaces a non-reconciled transaction with a new transaction.

Exceptions
TransactionErrorWhen the new transaction has a debiting account that is not in the ledger books.
TransactionErrorWhen the ledger book for the debiting account is closed.
TransactionErrorWhen the new transaction has a crediting account that is not in the ledger books.
TransactionErrorWhen the ledger book for the crediting account is closed.
TransactionErrorWhen the supplied original transaction number does not exist.
TransactionErrorWhen the original transaction is already reconciled.
TransactionErrorWhen the new transaction is not unreconciled.
TransactionErrorWhen the new transaction is for a currency that is unknown.
Parameters
numberThe transaction number of the original transaction to replace.
transactionThe new transaction that will replace the original one.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unreconcile() [1/3]

void drn::accounting::GeneralLedger::unreconcile ( const std::set< TransactionNumber > & txnNums)

Marks all the transactions supplied as unreconciled.

Exceptions
ErrorWhen a transaction number does not exist in the ledger books.
Parameters
txnNumsThe numbers of the transactions to be unreconciled.
Here is the call graph for this function:

◆ unreconcile() [2/3]

void drn::accounting::GeneralLedger::unreconcile ( const TransactionNumber & txnNum)

Marks the transaction supplied as unreconciled.

Exceptions
ErrorWhen the transaction number does not exist in the ledger books.
Parameters
txnNumThe number of the transaction to be unreconciled.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unreconcile() [3/3]

void drn::accounting::GeneralLedger::unreconcile ( const TransactionNumber & txnNum,
const AccountNumber & actNum )

Marks the transaction supplied as unreconciled.

Exceptions
TransactionErrorWhen the transaction number does not exist in the ledger books.
AccountErrorWhen the account number does not exist in the ledger books.
Parameters
txnNumThe number of the transaction to be unreconciled.
actNumThe number of the ledger account whose transaction should be cleared.
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

DRN_ACCOUNTING_EXPORT std::ostream & operator<< ( std::ostream & o,
const GeneralLedger & gl )
friend

Stream insertion operator for a human readable general ledger account.

Parameters
oThe stream to insert the information into.
laThe ledgers to generate the information for.
Postcondition
The stream's filled with the information in the form: Member Name (Member Value).
Returns
The stream populated with the information.