GnuCashew ~ GnuCash Enabled Web
GCW
Functions | Variables
GCW::Core Namespace Reference

helper functions and features More...

Functions

std::vector< std::string > split (const std::string &value, char delim)
 
std::string & rtrim (std::string &s, const char *t=trim_ws)
 
std::string & ltrim (std::string &s, const char *t=trim_ws)
 
std::string & trim (std::string &s, const char *t=trim_ws)
 
std::string toupper (const std::string &s)
 
std::string tolower (const std::string &s)
 
Wt::Json::Object toJson (Wt::WTreeView *_view)
 
std::string hexDump (const std::string &data, int start=-1, int end=-1)
 
auto newGuid () -> std::string
 Generate new GUID string value. More...
 
auto currentDateTime () -> Wt::WDateTime
 Current Date/Time. More...
 
auto currentDateTimeStorageString () -> std::string
 

Variables

const char * trim_ws = " \t\n\r\f\v"
 

Detailed Description

helper functions and features

Function Documentation

◆ currentDateTime()

auto GCW::Core::currentDateTime ( ) -> Wt::WDateTime

Current Date/Time.

This will return the current date/time suitable for back-end storage

Definition at line 259 of file Core.cpp.

Referenced by GCW::Dbo::GnuCashew::Session::addGnuCashewExtensions(), GCW::App::App(), currentDateTimeStorageString(), HtmlResource::handleRequest(), MonitResource::handleRequest(), and ApiResource::handleRequest().

◆ currentDateTimeStorageString()

auto GCW::Core::currentDateTimeStorageString ( ) -> std::string

Definition at line 279 of file Core.cpp.

References currentDateTime(), and GCW_DATE_FORMAT_STORAGE.

◆ hexDump()

auto GCW::Core::hexDump ( const std::string &  data,
int  start = -1,
int  end = -1 
)

Definition at line 169 of file Core.cpp.

◆ ltrim()

std::string & GCW::Core::ltrim ( std::string &  s,
const char *  t = trim_ws 
)

Definition at line 50 of file Core.cpp.

Referenced by trim().

◆ newGuid()

auto GCW::Core::newGuid ( ) -> std::string

Generate new GUID string value.

This GUID is suitable for use as the primary-guid-key value for the data tables.

Definition at line 234 of file Core.cpp.

Referenced by GCW::Dbo::Transactions::Manager::newTransaction(), and GCW::Gui::BillPay::EditWidget::saveData().

◆ rtrim()

std::string & GCW::Core::rtrim ( std::string &  s,
const char *  t = trim_ws 
)

Definition at line 41 of file Core.cpp.

Referenced by trim().

◆ split()

std::vector< std::string > GCW::Core::split ( const std::string &  value,
char  delim 
)

Definition at line 29 of file Core.cpp.

References split().

Referenced by GCW::Dbo::Accounts::byFullName().

◆ toJson()

Wt::Json::Object GCW::Core::toJson ( Wt::WTreeView *  _view)

Definition at line 147 of file Core.cpp.

References iterate().

Referenced by GCW::Gui::AccountsTreeView::saveConfig(), and GCW::Gui::AccountsTreeView::test().

◆ tolower()

std::string GCW::Core::tolower ( const std::string &  s)

Definition at line 77 of file Core.cpp.

◆ toupper()

std::string GCW::Core::toupper ( const std::string &  s)

Definition at line 66 of file Core.cpp.

◆ trim()

std::string & GCW::Core::trim ( std::string &  s,
const char *  t = trim_ws 
)

Definition at line 59 of file Core.cpp.

References ltrim(), and rtrim().

Variable Documentation

◆ trim_ws

const char * GCW::Core::trim_ws = " \t\n\r\f\v"
extern

Definition at line 37 of file Core.cpp.