RTBKit  0.9
Open-source framework to create real-time ad bidding systems.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Friends
RTBKIT::Accounts Struct Reference

List of all members.

Classes

struct  AccountInfo

Public Member Functions

const Account createAccount (const AccountKey &account, AccountType type)
void restoreAccount (const AccountKey &accountKey, const Json::Value &jsonValue, bool overwrite=false)
const Account createBudgetAccount (const AccountKey &account)
const Account createSpendAccount (const AccountKey &account)
const AccountInfo getAccount (const AccountKey &account) const
void checkInvariants () const
Json::Value toJson () const
const Account setBudget (const AccountKey &topLevelAccount, const CurrencyPool &newBudget)
const Account setBalance (const AccountKey &account, CurrencyPool amount, AccountType typeToCreate)
const CurrencyPool getBalance (const AccountKey &account) const
void recuperate (const AccountKey &account)
AccountSummary getAccountSummary (const AccountKey &account, int maxDepth=-1) const
Json::Value getAccountSummariesJson (bool simplified=false, int maxDepth=-1) const
const Account importSpend (const AccountKey &account, const CurrencyPool &amount)
const Account syncFromShadow (const AccountKey &account, const ShadowAccount &shadow)
void markAccountOutOfSync (const AccountKey &account)
bool isAccountOutOfSync (const AccountKey &account) const
void ensureInterAccountConsistency ()
bool isAccountInconsistent (const AccountKey &account) const
bool checkBudgetConsistency (const AccountKey &accountKey, int maxRecursion=-1) const
void getRecycledUp (const AccountKey &accountKey, CurrencyPool &recycledInUp, CurrencyPool &recycledOutUp) const
std::vector< AccountKeygetAccountKeys (const AccountKey &prefix=AccountKey(), int maxDepth=-1) const
void forEachAccount (const std::function< void(const AccountKey &, const Account &)> &onAccount) const
size_t size () const
bool empty () const
Accounts getAccounts (const AccountKey &root, int maxDepth=0)

Static Public Member Functions

static Accounts fromJson (const Json::Value &json)

Public Attributes

Datacratic::Date sessionStart

Friends

class ShadowAccounts

Detailed Description

Definition at line 781 of file account.h.


Member Function Documentation

interaccount consistency

Definition at line 372 of file account.cc.

Accounts RTBKIT::Accounts::getAccounts ( const AccountKey root,
int  maxDepth = 0 
) [inline]

Return a subtree of the accounts.

Definition at line 1115 of file account.h.

const Account RTBKIT::Accounts::setBalance ( const AccountKey account,
CurrencyPool  amount,
AccountType  typeToCreate 
) [inline]

Sets the balance budget for the given account to the given amount, by transferring in from the parent account.

If typeToCreate is not AT_NONE, then the account will be implicitly created if it doesn't exist.

Definition at line 904 of file account.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator