GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Dbo/Accounts/Accounts.h
Go to the documentation of this file.
1#line 2 "src/Dbo/Accounts/Accounts.h"
2
3#ifndef __DBO_ACCOUNTS_H___
4#define __DBO_ACCOUNTS_H___
5
6#include "Item.h"
7
8namespace GCW {
9 namespace Dbo {
10 namespace Accounts {
11
12/*!
13** \brief Load Root Account
14**
15*/
16auto rootAccount()-> Item::Ptr;
17
18/*!
19** \brief Load Account by GUID
20*/
21auto load( const std::string & _guid )-> Item::Ptr;
22
23/*!
24** \brief Load Account by GUID
25*/
26auto byGuid( const std::string & _guid )-> Item::Ptr;
27
28/*!
29** \brief Load Account by 'child name' and 'parent id'
30*/
31auto byChildName( const std::string & _parentGuid, const std::string & _childName )-> Item::Ptr;
32
33/*!
34** \brief Load Account by 'full name' with ':' account separator
35*/
36auto byFullName( const std::string & _fullName )-> Item::Ptr;
37auto byFullName( const Wt::WString & _fullName )-> Item::Ptr;
38
39/*!
40** \brief Load all accounts
41*/
43
44/*!
45** \brief Load accounts as; if( !hidden() && !placeHolder() )
46*/
48
49/*!
50** \brief Account Fullname via GUID
51*/
52auto fullName( const std::string & _guid )-> std::string;
53
54/*!
55** \brief Account Fullname via Item
56*/
57auto fullName( Item::Ptr _item )-> std::string;
58
59/*!
60** \brief Is Account Type
61**
62** This returns .true. if the account is an _type account,
63** meaning, if the acccount itself is not designated as an
64** _type (could be BANK or CASH or something), then the
65** parent tree is walked all the way to root and returns
66** .true. if any of the parent accounts are an _type account.
67*/
68
69auto isType( const Item::Ptr _acctItem, GCW::Dbo::Accounts::Type _type )-> bool ;
70auto isType( const std::string & _guid, GCW::Dbo::Accounts::Type _type )-> bool ;
71
72/*!
73** \brief Account Children Namespace
74*/
75namespace Children {
76
77/*!
78** \brief Child Accounts via parent
79**
80*/
81auto vector( const std::string & _parentGuid )-> Item::Vector;
82
83 } // Children
84 } // Accounts
85 } // Dbo
86} // GCW
87
88
89
90#endif // __DBO_ACCOUNTS_H___
91
92
std::vector< Ptr > Vector
Definition BaseItem.h:41
Wt::Dbo::ptr< Item > Ptr
Definition BaseItem.h:39
auto vector(const std::string &_parentGuid) -> Item::Vector
Child Accounts via parent.
auto rootAccount() -> Item::Ptr
Load Root Account.
auto load(const std::string &_guid) -> Item::Ptr
Load Account by GUID.
auto activeAccounts() -> Item::Vector
Load accounts as; if( !hidden() && !placeHolder() )
auto allAccounts() -> Item::Vector
Load all accounts.
auto isType(const Item::Ptr _acctItem, GCW::Dbo::Accounts::Type _type) -> bool
Is Account Type.
auto byFullName(const std::string &_fullName) -> Item::Ptr
Load Account by 'full name' with ':' account separator.
auto byGuid(const std::string &_guid) -> Item::Ptr
Load Account by GUID.
auto byChildName(const std::string &_parentGuid, const std::string &_childName) -> Item::Ptr
Load Account by 'child name' and 'parent id'.
auto fullName(const std::string &_guid) -> std::string
Account Fullname via GUID.
Definition App.h:18