GnuCashew ~ GnuCash Enabled Web
GCW
Public Member Functions | Private Attributes | List of all members
GCW::Dbo::GnuCashew::Session Class Reference

GnuCash Native Session. More...

#include <SessionGnuCashew.h>

+ Inheritance diagram for GCW::Dbo::GnuCashew::Session:

Public Member Functions

 Session ()
 
bool open (const std::string &_path)
 Open a database. More...
 
bool hasGnuCashewExtensions ()
 Check GnuCashew Extensions. More...
 
bool addGnuCashewExtensions ()
 Add GnuCashew Extensions. More...
 
bool gnucashIsOpen () const
 
void openGnucash ()
 
void closeGnucash ()
 
auto users () -> Wt::Auth::AbstractUserDatabase &
 
auto login () -> Wt::Auth::Login &
 
- Public Member Functions inherited from GCW::Dbo::AbstractSession
 AbstractSession ()
 
auto open (const std::string &_path) -> bool
 Open a database. More...
 
auto path () const -> const std::string &
 
auto isOpen () const -> bool
 

Private Attributes

std::unique_ptr< GCW::Dbo::Users::UserDatabasem_users
 
Wt::Auth::Login m_login
 

Additional Inherited Members

- Protected Attributes inherited from GCW::Dbo::AbstractSession
std::string m_path
 
bool m_isOpen = false
 

Detailed Description

GnuCash Native Session.

This session controller is designed to interface to a back-end gnucash data structure, without modification.

Definition at line 20 of file SessionGnuCashew.h.

Constructor & Destructor Documentation

◆ Session()

GCW::Dbo::GnuCashew::Session::Session ( )
inline

Definition at line 25 of file SessionGnuCashew.h.

Member Function Documentation

◆ addGnuCashewExtensions()

bool GCW::Dbo::GnuCashew::Session::addGnuCashewExtensions ( )

Add GnuCashew Extensions.

This makes the necessary modifications to the database to include the extensions necessary to support the GnuCashew attributes.

This function can be called repeatedly, as it will check for the presense of each attribute before it is added.

Definition at line 136 of file SessionGnuCashew.cpp.

References GCW::Core::currentDateTime(), GCW::Dbo::Vars::get(), ISO_DATE_FORMAT, GCW::Gui::BillPay::toString(), and TR.

◆ closeGnucash()

void GCW::Dbo::GnuCashew::Session::closeGnucash ( )

◆ gnucashIsOpen()

bool GCW::Dbo::GnuCashew::Session::gnucashIsOpen ( ) const

◆ hasGnuCashewExtensions()

bool GCW::Dbo::GnuCashew::Session::hasGnuCashewExtensions ( )

Check GnuCashew Extensions.

This examines the database tables to determine if the necessary modifications have been made to the database to support the GnuCashew Extensions.

Definition at line 74 of file SessionGnuCashew.cpp.

References GCW::Dbo::Vars::s_tableName.

◆ login()

auto GCW::Dbo::GnuCashew::Session::login ( ) -> Wt::Auth::Login &
inline

Definition at line 60 of file SessionGnuCashew.h.

References m_login.

Referenced by GCW::App::App().

◆ open()

bool GCW::Dbo::GnuCashew::Session::open ( const std::string &  _path)

◆ openGnucash()

void GCW::Dbo::GnuCashew::Session::openGnucash ( )

◆ users()

auto GCW::Dbo::GnuCashew::Session::users ( ) -> Wt::Auth::AbstractUserDatabase &
inline

Definition at line 59 of file SessionGnuCashew.h.

References m_users.

Member Data Documentation

◆ m_login

Wt::Auth::Login GCW::Dbo::GnuCashew::Session::m_login
private

Definition at line 65 of file SessionGnuCashew.h.

Referenced by login().

◆ m_users

std::unique_ptr< GCW::Dbo::Users::UserDatabase > GCW::Dbo::GnuCashew::Session::m_users
private

Definition at line 64 of file SessionGnuCashew.h.

Referenced by open(), and users().


The documentation for this class was generated from the following files: