Auxiliary implementations for use in C++ source code.
More...
Namespaces |
namespace | basis |
Modules |
| Command-line Parsing Library |
| Command-line parsing library for C++.
|
| Testing Framework |
| Testing framework for C++.
|
Files |
file | basis.h |
| BASIS utilities of BASIS project of BASIS package.
|
file | utilities.h |
| Main module of project-independent BASIS utilities.
|
Defines |
#define | HAVE_LONG_LONG 1 |
| Whether the long long type is supported by the compiler.
|
#define | HAVE_PTHREAD 1 |
| Whether the pthread library is available.
|
#define | HAVE_SSTREAM 1 |
| Whether the ANSI string stream classes are available.
|
#define | HAVE_STRSTREAM 0 |
| Whether the obsolete string stream classes are available.
|
#define | HAVE_TR1_TUPLE 1 |
| Whether the tr1/tuple header file is available.
|
#define | LINUX (defined (linux) || defined (__linux)) |
| Whether the sources are compiled on a Linux system.
|
#define | MACOS (defined (__APPLE__) || defined (__OSX__)) |
| Whether the sources are compiled on a Mac OS system.
|
#define | UNIX (!WINDOWS) |
| Whether the sources are compiled on a Unix-based system.
|
#define | WINDOWS (defined (_WIN32) || defined (WIN32) || defined (_WINDOWS)) |
| Whether the sources are compiled on a Windows system.
|
Functions |
int | basis::get_terminal_columns () |
| Get maximum number of columns of terminal window.
|
int | basis::get_terminal_lines () |
| Get maximum number of lines of terminal window.
|
void | basis::get_terminal_size (int &lines, int &columns) |
| Get size of terminal window.
|
std::ostream & | basis::print_wrapped (std::ostream &os, const std::string &text, int width, int indent, int offset) |
| Print text, wrapped at a fixed maximum number of columns.
|
Variables |
cmake | PROJECT_NAMESPACE_CXX |
| CMake variable of C++ namespace of project.
|
Detailed Description
Auxiliary implementations for use in C++ source code.
Define Documentation
Whether the long long type is supported by the compiler.
Definition at line 47 of file config.h.
Whether the pthread library is available.
Definition at line 71 of file config.h.
Whether the ANSI string stream classes are available.
Definition at line 53 of file config.h.
Whether the obsolete string stream classes are available.
- Note:
- As the strstream implementations are obsolete already for a long time, this macro always evaluates to 0.
Definition at line 66 of file config.h.
Whether the tr1/tuple header file is available.
- Note:
- This header file is only more recently supported by compilers and be used by Google Test, for example. If not supported by the compiler, Google Test can use it's own implementation.
Definition at line 83 of file config.h.
#define LINUX (defined (linux) || defined (__linux)) |
Whether the sources are compiled on a Linux system.
Definition at line 23 of file config.h.
#define MACOS (defined (__APPLE__) || defined (__OSX__)) |
Whether the sources are compiled on a Mac OS system.
Definition at line 35 of file config.h.
Whether the sources are compiled on a Unix-based system.
Definition at line 41 of file config.h.
#define WINDOWS (defined (_WIN32) || defined (WIN32) || defined (_WINDOWS)) |
Whether the sources are compiled on a Windows system.
Definition at line 29 of file config.h.
Function Documentation
int basis::get_terminal_columns |
( |
| ) |
|
Get maximum number of columns of terminal window.
- Returns:
- Maximum number of columns of terminal window.
Definition at line 70 of file stdio.cxx.
int basis::get_terminal_lines |
( |
| ) |
|
Get maximum number of lines of terminal window.
- Returns:
- Maximum number of lines of terminal window.
Definition at line 62 of file stdio.cxx.
void basis::get_terminal_size |
( |
int & |
lines, |
|
|
int & |
columns |
|
) |
| |
Get size of terminal window.
- Parameters:
-
[out] | lines | Maximum number of lines or 0 if it could not be determined. |
[out] | columns | Maximum number of columns or 0 if it could not be determined. |
Definition at line 34 of file stdio.cxx.
ostream & basis::print_wrapped |
( |
std::ostream & |
os, |
|
|
const std::string & |
text, |
|
|
int |
width, |
|
|
int |
indent, |
|
|
int |
offset |
|
) |
| |
Print text, wrapped at a fixed maximum number of columns.
This function is inspired by the TCLAP::StdOutput::spacePrint() method written by Michael E. Smoot.
- Parameters:
-
[out] | os | Output stream. |
[in] | text | Text to be printed. |
[in] | width | Maximum width of each line. Set to a value less or equal to disable automatic wrapping. |
[in] | indent | Indent of text on each line. |
[in] | offset | Additional indent of all lines except the first one. |
Definition at line 78 of file stdio.cxx.
Variable Documentation
CMake variable of C++ namespace of project.
The C++ namespace of a BASIS project is made up of the vendor name and the name of the package itself. Moreover, if the project is a module of another project, the name of the module may optionally be used as part of the namespace as well. Namespaces in C++ are usually in lowercase only.
Definition at line 75 of file ProjectSettings.cmake.