GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Core.h
Go to the documentation of this file.
1#line 2 "src/Glb/Core.h"
2
3#ifndef __GCW_CORE_H___
4#define __GCW_CORE_H___
5
6#include <string>
7#include <vector>
8
9#include <Wt/Json/Object.h>
10
11#include "Numeric.h"
12
13//#define COUT_FLF __FILE__, __LINE__, __FUNCTION__
14//#define COUT_BEG std::cout << __FILE__ << ":" << __LINE__ << "(" << __PRETTY_FUNCTION__ << ") "
15//#define COUT_END std::endl
16//#define COUT_LINE std::cout << __FILE__ << ":" << __LINE__ << "(" << __PRETTY_FUNCTION__ << ")" << COUT_END
17//#define COUT_(x) COUT_BEG << x << COUT_END
18
19
20namespace GCW {
21
22 /*!
23 ** \brief helper functions and features
24 **
25 */
26 namespace Core {
27
28
29std::vector<std::string> split( const std::string & value, char delim );
30
31extern const char* trim_ws;
32std::string & rtrim( std::string & s, const char* t = trim_ws );
33std::string & ltrim( std::string & s, const char* t = trim_ws );
34std::string & trim( std::string & s, const char* t = trim_ws );
35std::string toupper( const std::string & s );
36std::string tolower( const std::string & s );
37
39
40std::string hexDump( const std::string & data, int start = -1, int end = -1 );
41
42/*!
43** \brief Generate new GUID string value
44**
45** This GUID is suitable for use as the primary-guid-key value for the
46** data tables.
47**
48*/
49auto newGuid()-> std::string ;
50
51/*!
52** \brief Current Date/Time
53**
54** This will return the current date/time suitable for back-end storage
55**
56*/
58auto currentDateTimeStorageString()-> std::string ;
59auto currentDateTimeDisplayString()-> std::string ;
60
61 } // endnamespace Core
62} // endnamespace GCW
63
64#endif
65
const char * trim_ws
Definition Core.cpp:37
std::string toupper(const std::string &s)
Definition Core.cpp:67
auto currentDateTime() -> Wt::WDateTime
Current Date/Time.
Definition Core.cpp:260
std::string tolower(const std::string &s)
Definition Core.cpp:78
std::vector< std::string > split(const std::string &value, char delim)
Definition Core.cpp:30
std::string & trim(std::string &s, const char *t=trim_ws)
Definition Core.cpp:60
std::string & ltrim(std::string &s, const char *t=trim_ws)
Definition Core.cpp:51
auto currentDateTimeDisplayString() -> std::string
Definition Core.cpp:287
std::string hexDump(const std::string &data, int start=-1, int end=-1)
Definition Core.cpp:170
std::string & rtrim(std::string &s, const char *t=trim_ws)
Definition Core.cpp:42
Wt::Json::Object toJson(Wt::WTreeView *_view)
Definition Core.cpp:148
auto newGuid() -> std::string
Generate new GUID string value.
Definition Core.cpp:235
auto currentDateTimeStorageString() -> std::string
Definition Core.cpp:274
Definition App.h:18