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 char * _fullName )-> Item::Ptr ;
38auto byFullName( const Wt::WString & _fullName )-> Item::Ptr ;
39
40/*!
41** \brief Load all accounts
42*/
44
45/*!
46** \brief Load accounts as; if( !hidden() && !placeHolder() )
47*/
49
50/*!
51** \brief Account Fullname via GUID
52*/
53auto fullName( const std::string & _guid )-> std::string ;
54
55/*!
56** \brief Account Fullname via Item
57*/
58auto fullName( Item::Ptr _item )-> std::string ;
59
60/*!
61** \brief Is Account Type
62**
63** This returns .true. if the account is an _type account,
64** meaning, if the acccount itself is not designated as an
65** _type (could be BANK or CASH or something), then the
66** parent tree is walked all the way to root and returns
67** .true. if any of the parent accounts are an _type account.
68*/
69
70auto isType( const Item::Ptr _acctItem, GCW::Dbo::Accounts::Type _type )-> bool ;
71auto isType( const std::string & _guid, GCW::Dbo::Accounts::Type _type )-> bool ;
72
73/*!
74** \brief Account Children Namespace
75*/
76namespace Children {
77
78/*!
79** \brief Child Accounts via parent
80**
81*/
82auto byParent( const std::string & _parentGuid )-> Item::Vector;
83
84 } // Children
85 } // Accounts
86 } // Dbo
87} // GCW
88
89
90
91#endif // __DBO_ACCOUNTS_H___
92
93
std::vector< Ptr > Vector
Definition BaseItem.h:41
Wt::Dbo::ptr< Item > Ptr
Definition BaseItem.h:39
auto byParent(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