|
class | Arg |
| A class which holds a represention of the argc/argv command line array, and supports simple command-line parsing. More...
|
|
class | Base64 |
| A base64 codec class. More...
|
|
class | basic_imembuf |
| An input streambuf that takes its data from a fixed-size const buffer. More...
|
|
class | basic_omembuf |
| An output streambuf that writes to a fixed-size char buffer. More...
|
|
class | BasicAddress |
| A structure that holds a network address as a string with no dependency on any low-level network library. More...
|
|
class | BatchFile |
| A class for reading and writing windows-style startup batch files containing a single command-line, optionally using "start". More...
|
|
class | BrokenDownTime |
| An encapsulation of 'struct std::tm'. More...
|
|
struct | Buffer |
| A substitute for std::vector<char> that has more useful alignment guarantees and explicitly avoids default initialisation of each element. More...
|
|
class | CallFrame |
| An object to represent a nested execution context. More...
|
|
class | CallStack |
| A linked list of CallFrame pointers. More...
|
|
class | Cleanup |
| A static interface for registering cleanup functions that are called when the process terminates abnormally. More...
|
|
class | CleanupImp |
|
class | Convert |
| A static class which provides string encoding conversion functions between UTF-8 and wchar_t. More...
|
|
class | Daemon |
| A static interface for daemonising the calling process. More...
|
|
class | Date |
| A day-month-year date class. More...
|
|
class | DateTime |
| A static class that knows about timezone offsets. More...
|
|
class | Directory |
| An encapsulation of a file system directory that works with G::DirectoryIterator. More...
|
|
class | DirectoryIterator |
| A iterator that returns unsorted filenames in a directory. More...
|
|
class | DirectoryIteratorImp |
| A pimple-pattern implementation class for DirectoryIterator using opendir()/readdir().
|
|
class | DirectoryList |
| A iterator similar to G::DirectoryIterator but doing all file i/o in one go and providing a sorted result. More...
|
|
class | Environment |
| Holds a set of environment variables and also provides static methods to wrap getenv() and putenv(). More...
|
|
class | Exception |
| A general-purpose exception class derived from std::exception and containing an error message. More...
|
|
class | ExecutableCommand |
| A structure representing an external program, holding a path and a set of arguments. More...
|
|
class | fbuf |
| A simple file streambuf using a "file descriptor" and three function pointers for read, write and close operations. More...
|
|
class | File |
| A simple static class for dealing with files. More...
|
|
class | format |
| A simple version of boost::format for formatting strings in an i18n-friendly way. More...
|
|
class | GetOpt |
| A command-line option parser. More...
|
|
class | Hash |
| A class for creating HMACs using an arbitrary cryptographic hash function as per RFC-2104. More...
|
|
class | HashState |
| Functions for representing the intermediate state of a hash function as a non-printable string. More...
|
|
class | HashStateImp |
| The non-template part of G::HashState.
|
|
class | Identity |
| A combination of user-id and group-id, with a very low-level interface to the get/set/e/uid/gid functions. More...
|
|
class | IdnImp |
|
struct | Limits |
| A set of compile-time buffer sizes. More...
|
|
struct | Limits< G::Scale::Normal > |
| Normal specialisation of G::Limits. More...
|
|
struct | Limits< G::Scale::Small > |
| Small-memory specialisation of G::Limits. More...
|
|
class | LogOutput |
| Controls and implements low-level logging output, as used by G::Log. More...
|
|
struct | LogStream |
| A non-throwing copyable wrapper for std::ostream, used by G::LogOutput and associated logging macros. More...
|
|
class | MapFile |
| A class for reading, writing and editing key=value files, supporting variable expansion of percent-key-percent values, comments, creation of backup files, and logging. More...
|
|
class | Md5 |
| MD5 message digest class. More...
|
|
class | Msg |
| Wrappers for sendmsg() and recvmsg(). More...
|
|
class | NewProcess |
| A class for creating new processes. More...
|
|
class | NewProcessImp |
|
class | NewProcessWaitable |
| Holds the parameters and future results of a waitpid() system call. More...
|
|
struct | Option |
| A structure representing a G::Options command-line option. More...
|
|
class | optional |
| A class template like a simplified c++17 std::optional. More...
|
|
class | OptionMap |
| A multimap-like container for command-line options and their values. More...
|
|
class | OptionParser |
| A parser for command-line arguments that operates according to an Options specification and returns an OptionValue multimap. More...
|
|
class | OptionReader |
| Provides a static function to read options from a config file. More...
|
|
class | Options |
| A class to assemble a list of command-line options and provide access by name. More...
|
|
class | OptionsUsage |
| Provides help text for a set of options. More...
|
|
class | OptionValue |
| A simple structure encapsulating the value of a command-line option. More...
|
|
class | Pam |
| A thin interface to the system PAM library, with two pure virtual methods that derived classes should implement: the converse() method supplies passwords etc. More...
|
|
class | PamImp |
| A pimple-pattern implementation class for G::Pam.
|
|
class | Path |
| A Path object represents a file system path. More...
|
|
class | PidFile |
| A class for creating pid files. More...
|
|
class | Process |
| A static interface for doing things with processes. More...
|
|
class | ReadWrite |
| An abstract interface for reading and writing from a non-blocking i/o channel. More...
|
|
class | Root |
| A class which acquires the process's special privileges on construction and releases them on destruction. More...
|
|
class | ScopeExit |
| A class that calls an exit function at the end of its scope. More...
|
|
class | ScopeExitSet |
| A class that sets a simple variable to a particular value at the end of its scope. More...
|
|
class | SignalSafe |
| An empty structure that is used to indicate a signal-safe, reentrant implementation. More...
|
|
class | StateMachine |
| A finite state machine class template. More...
|
|
class | StateMachineImp |
| A private non-template implementation class for G::StateMachine.
|
|
class | Str |
| A static class which provides string helper functions. More...
|
|
class | string_view |
| A class like c++17's std::string_view. More...
|
|
class | StringFieldIteratorT |
| A standard forward iterator for G::StringFieldT: More...
|
|
class | StringFieldT |
| A zero-copy string field iterator where the field separators are short fixed strings. More...
|
|
class | StringTokenT |
| A zero-copy string token iterator where the token separators are runs of whitespace characters, with no support for escape characters. More...
|
|
class | StringWrap |
| A word-wrap class. More...
|
|
class | SystemTime |
| Represents a unix-epoch time with microsecond resolution. More...
|
|
class | Test |
| A static interface for enabling test features at run-time. More...
|
|
struct | threading |
| Helper class for std::thread capabilities. More...
|
|
class | Time |
| A simple time-of-day (hh/mm/ss) class. More...
|
|
class | TimeInterval |
| An interval between two G::SystemTime values or two G::TimerTime values. More...
|
|
class | TimerTime |
| A monotonically increasing subsecond-resolution timestamp, notionally unrelated to time_t. More...
|
|
class | Xtext |
| An xtext codec class, encoding space as "+20" etc. More...
|
|
|
G::StringArray::const_iterator | begin (const G::Arg &arg) |
|
G::StringArray::const_iterator | end (const G::Arg &arg) |
|
template<typename Uptr , typename T = char> |
Uptr | buffer_cast (Buffer< T > &buffer) |
|
template<typename Uptr , typename T = char> |
Uptr | buffer_cast (Buffer< T > &buffer, std::nothrow_t) |
|
template<typename Uptr , typename T = char> |
Uptr | buffer_cast (const Buffer< T > &buffer) |
|
template<typename T > |
void | swap (Buffer< T > &a, Buffer< T > &b) noexcept |
|
std::ostream & | operator<< (std::ostream &, const SystemTime &) |
|
std::ostream & | operator<< (std::ostream &, const TimeInterval &) |
|
bool | operator< (const TimerTime &a, const TimerTime &b) noexcept(TimerTime::less_noexcept) |
|
template<typename... T> |
void | gdef_ignore (T &&...) |
|
constexpr bool | is_windows () noexcept |
|
constexpr bool | is_linux () noexcept |
|
constexpr bool | is_free_bsd () noexcept |
|
constexpr bool | is_open_bsd () noexcept |
|
constexpr bool | is_bsd () noexcept |
|
std::ostream & | operator<< (std::ostream &stream, const format &f) |
|
std::string | str (const format &f) |
|
void | gettext_init (const std::string &localedir, const std::string &name) |
| Initialises the gettext() library. More...
|
|
const char * | gettext (const char *) noexcept |
| Returns the message translation in the current locale's codeset, eg. More...
|
|
constexpr const char * | gettext_noop (const char *p) noexcept |
| Returns the parameter. More...
|
|
const char * | txt (const char *p) noexcept |
| A briefer alternative to G::gettext(). More...
|
|
constexpr const char * | tx (const char *p) noexcept |
| A briefer alternative to G::gettext_noop(). More...
|
|
constexpr std::string_view | tx (std::string_view sv) noexcept |
| String view overload. More...
|
|
std::string | hostname () |
| Returns the hostname. More...
|
|
std::ostream & | operator<< (std::ostream &stream, const Identity &identity) |
|
LogStream & | operator<< (LogStream &s, const std::string &) noexcept |
|
LogStream & | operator<< (LogStream &s, const char *) noexcept |
|
LogStream & | operator<< (LogStream &s, char) noexcept |
|
LogStream & | operator<< (LogStream &s, unsigned char) noexcept |
|
LogStream & | operator<< (LogStream &s, int) noexcept |
|
LogStream & | operator<< (LogStream &s, unsigned int) noexcept |
|
LogStream & | operator<< (LogStream &s, long) noexcept |
|
LogStream & | operator<< (LogStream &s, unsigned long) noexcept |
|
LogStream & | operator<< (LogStream &s, void *) noexcept |
|
template<typename T > |
LogStream & | operator<< (LogStream &s, const T &t) noexcept |
|
std::ostream & | operator<< (std::ostream &stream, const Path &path) |
|
Path & | operator/= (Path &p, const std::string &str) |
|
Path | operator/ (const Path &p, const std::string &str) |
|
Path & | operator+= (Path &, const std::string &)=delete |
|
Path & | operator+ (const Path &, const std::string &)=delete |
|
void | swap (Path &p1, Path &p2) noexcept |
|
std::ostream & | operator<< (std::ostream &stream, const G::Process::Id &id) |
|
template<typename T > |
StringFieldIteratorT< T > | begin (StringFieldT< T > &f) noexcept |
|
template<typename T > |
StringFieldIteratorT< T > | end (StringFieldT< T > &) noexcept |
|
G::string_view | sv_substr_noexcept (G::string_view sv, std::size_t pos, std::size_t count=std::string::npos) noexcept |
|
bool | sv_imatch (G::string_view, G::string_view) noexcept |
|
std::ostream & | operator<< (std::ostream &stream, const string_view &sv) |
|
void | swap (string_view &a, string_view b) noexcept |
|
bool | operator== (const std::string &s, string_view sv) |
|
bool | operator!= (const std::string &s, string_view sv) |
|
std::string | sv_to_string (string_view sv) |
|
Low-level classes.
Message msg(
tx(
"world") ) ;
std::cout <<
txt(
"hello") << msg.translated() <<
"\n" ;
const char * txt(const char *p) noexcept
A briefer alternative to G::gettext().
constexpr const char * tx(const char *p) noexcept
A briefer alternative to G::gettext_noop().
The G namespace contains low-level classes for file-system abstraction, date and time representation, string utility functions, logging, command line parsing etc.
Key classes are: