Modules | Files | Namespaces | Macros | Functions | Variables
BasisCxxUtilities
+ Collaboration diagram for BasisCxxUtilities:

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.cxx
 Main module of project-independent BASIS utilities.
 
file  utilities.h
 Main module of project-independent BASIS utilities.
 

Namespaces

 basis
 

Macros

#define HAVE_LONG_LONG   1
 Whether the long long type is supported by the compiler. More...
 
#define HAVE_PTHREAD   1
 Whether the pthread library is available. More...
 
#define HAVE_SSTREAM   1
 Whether the ANSI string stream classes are available. More...
 
#define HAVE_STRSTREAM   0
 Whether the obsolete string stream classes are available. More...
 
#define HAVE_TR1_TUPLE   0
 Whether the tr1/tuple header file is available. More...
 
#define LINUX   0
 Whether the sources are compiled on a Linux system. More...
 
#define MACOS   0
 Whether the sources are compiled on a Mac OS system. More...
 
#define UNIX   1
 Whether the sources are compiled on a Unix-based system. More...
 
#define WINDOWS   0
 Whether the sources are compiled on a Windows system. More...
 

Functions

int basis::get_terminal_columns ()
 Get maximum number of columns of terminal window. More...
 
int basis::get_terminal_lines ()
 Get maximum number of lines of terminal window. More...
 
void basis::get_terminal_size (int &lines, int &columns)
 Get size of terminal window. More...
 
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. More...
 

Variables

cmake PROJECT_NAMESPACE_CXX
 CMake variable of C++ namespace of project. More...
 

Detailed Description

Macro Definition Documentation

§ HAVE_LONG_LONG

cmake HAVE_LONG_LONG   1

Whether the long long type is supported by the compiler.

Definition at line 67 of file config.h.

§ HAVE_PTHREAD

cmake HAVE_PTHREAD   1

Whether the pthread library is available.

Definition at line 91 of file config.h.

§ HAVE_SSTREAM

cmake HAVE_SSTREAM   1

Whether the ANSI string stream classes are available.

Definition at line 73 of file config.h.

§ HAVE_STRSTREAM

#define HAVE_STRSTREAM   0

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 86 of file config.h.

§ HAVE_TR1_TUPLE

cmake HAVE_TR1_TUPLE   0

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 103 of file config.h.

§ LINUX

#define LINUX   0

Whether the sources are compiled on a Linux system.

Definition at line 30 of file config.h.

§ MACOS

#define MACOS   0

Whether the sources are compiled on a Mac OS system.

Definition at line 50 of file config.h.

§ UNIX

#define UNIX   1

Whether the sources are compiled on a Unix-based system.

Definition at line 60 of file config.h.

§ WINDOWS

#define WINDOWS   0

Whether the sources are compiled on a Windows system.

Definition at line 40 of file config.h.

Function Documentation

§ get_terminal_columns()

int basis::get_terminal_columns ( )

Get maximum number of columns of terminal window.

Returns
Maximum number of columns of terminal window.

Definition at line 91 of file stdio.cxx.

§ get_terminal_lines()

int basis::get_terminal_lines ( )

Get maximum number of lines of terminal window.

Returns
Maximum number of lines of terminal window.

Definition at line 83 of file stdio.cxx.

§ get_terminal_size()

void basis::get_terminal_size ( int &  lines,
int &  columns 
)

Get size of terminal window.

Parameters
[out]linesMaximum number of lines or 0 if it could not be determined.
[out]columnsMaximum number of columns or 0 if it could not be determined.

Definition at line 39 of file stdio.cxx.

§ print_wrapped()

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]osOutput stream.
[in]textText to be printed.
[in]widthMaximum width of each line. Set to a value less or equal to disable automatic wrapping.
[in]indentIndent of text on each line.
[in]offsetAdditional indent of all lines except the first one.

Definition at line 99 of file stdio.cxx.

Variable Documentation

§ PROJECT_NAMESPACE_CXX

cmake PROJECT_NAMESPACE_CXX

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 87 of file ProjectSettings.cmake.