Elements
5.8
A C++ base framework for the Euclid Software.
|
Core CMake, C++ and Python utilities. More...
Namespaces | |
Elements | |
Classes | |
class | BoostTestAdapter |
class | GoogleMockSetupFixture |
Macros | |
#define | __attribute__(x) |
#define | ELEMENTS_DEPRECATED __attribute__ ((__deprecated__)) |
#define | ELEMENTS_DEPRECATED_MSG(msg) __attribute__ ((__deprecated__(msg))) |
#define | ELEMENTS_API |
Dummy definitions for the backward compatibility mode. More... | |
#define | ELEMENTS_IMPORT |
#define | ELEMENTS_EXPORT |
#define | ELEMENTS_LOCAL |
#define | LIKELY(x) x |
#define | UNLIKELY(x) x |
#define | ELEMENTS_DEFAULT_LOGLEVEL DEBUG |
#define | CREATE_MANAGER_WITH_ARGS(MANAGER, ELEMENTS_PROGRAM,...) |
#define | CREATE_MANAGER(ELEMENTS_PROGRAM_NAME, MANAGER) CREATE_MANAGER_WITH_ARGS(MANAGER, ELEMENTS_PROGRAM_NAME, ) |
#define | MAIN_FOR_WITH_ARGS(ELEMENTS_PROGRAM,...) |
#define | MAIN_FOR(ELEMENTS_PROGRAM_NAME) MAIN_FOR_WITH_ARGS(ELEMENTS_PROGRAM_NAME, ) |
#define | _xstr(s) str(s) |
#define | _str(s) #s |
#define | ELEMENTS_UNUSED __attribute__ ((unused)) |
Functions | |
constexpr std::uint_least64_t | CALC_PROJECT_VERSION (const std::uint_least64_t maj, const std::uint_least64_t min, const std::uint_least64_t pat) |
Mange major, minor and patch version number into a single integer. More... | |
ELEMENTS_API std::string | Elements::getVersionFromSvnKeywords (const std::string &svnUrl, const std::string &svnId) |
Function returning a version string extracted from SVN keywords. More... | |
ELEMENTS_API std::string | Elements::getVersionString (const unsigned short major, const unsigned short minor, const unsigned short patch=0) |
Function converting the version numbers into a string. More... | |
Core CMake, C++ and Python utilities.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#define __attribute__ | ( | x | ) |
define the attribute macro to nothing if the gcc compiler is earlier than GCC 3.4.
Definition at line 38 of file Attribute.h.
#define _str | ( | s | ) | #s |
Definition at line 40 of file Stringify.h.
#define _xstr | ( | s | ) | str(s) |
helper macro
Macro to convert a preprocessor constant into a string.
#define CREATE_MANAGER | ( | ELEMENTS_PROGRAM_NAME, | |
MANAGER | |||
) | CREATE_MANAGER_WITH_ARGS(MANAGER, ELEMENTS_PROGRAM_NAME, ) |
Macro that declares a program manager with all the needed arguments. It is typically called from the MAIN_FOR(ELEMENTS_PROGRAM_NAME, MANAGER) macro.
ELEMENTS_PROGRAM_NAME | name of the main program class, derived from the class Elements::Program class. |
MANAGER | name of the manager variable to be created. |
#define CREATE_MANAGER_WITH_ARGS | ( | MANAGER, | |
ELEMENTS_PROGRAM, | |||
... | |||
) |
Macro that declares a program manager with custom constructor arguments. It is typically called from the MAIN_FOR(ELEMENTS_PROGRAM_NAME, MANAGER) macro.
ELEMENTS_PROGRAM | call of the main program constructor, derived from the class Elements::Program class. |
MANAGER | name of the manager variable to be created. |
#define ELEMENTS_API |
#define ELEMENTS_DEPRECATED __attribute__ ((__deprecated__)) |
This macro create a warning message for a deprecated function or class
Definition at line 35 of file Deprecated.h.
#define ELEMENTS_DEPRECATED_MSG | ( | msg | ) | __attribute__ ((__deprecated__(msg))) |
This macro create a warning message for a deprecated function or class This version takes a msg as argument. This message will be displayed together with the deprecation warning.
Definition at line 44 of file Deprecated.h.
#define ELEMENTS_UNUSED __attribute__ ((unused)) |
This macro is there to
#define LIKELY | ( | x | ) | x |
#define MAIN_FOR | ( | ELEMENTS_PROGRAM_NAME | ) | MAIN_FOR_WITH_ARGS(ELEMENTS_PROGRAM_NAME, ) |
Macro which must be used to create a main in classes that derived from Elements::Program, i.e., these derived classes must end with the following line:
.
ELEMENTS_PROGRAM_NAME | name of the main program class, derived from the class Elements::Program class. |
#define MAIN_FOR_WITH_ARGS | ( | ELEMENTS_PROGRAM, | |
... | |||
) |
Macro which must be used to create a main in classes that derived from Elements::Program, i.e., these derived classes must end with the following line:
.
ELEMENTS_PROGRAM | name of the main program class, derived from the class Elements::Program class. |
#define UNLIKELY | ( | x | ) | x |
constexpr std::uint_least64_t CALC_PROJECT_VERSION | ( | const std::uint_least64_t | maj, |
const std::uint_least64_t | min, | ||
const std::uint_least64_t | pat | ||
) |
string Elements::getVersionFromSvnKeywords | ( | const std::string & | svnUrl, |
const std::string & | svnId | ||
) |
Function returning a version string extracted from SVN keywords.
ElementsExample/ElementsProgramExample.cpp shows how to use this method to implement a getVersion in a prgram
svnUrl | This is a string that can be filled with the HeadURL svn keywords. Writing #define SVN_URL "SVN $HeadURL$ in a file. |
svnId | This is a string that can be filled with the Id svn keywords. Writing #define SVN_ID "SVN $Id$ in a file. |
the svn keywords will be expanded upon the next commit if the svn client is instructed to do this with svn propset svn:keywords 'Id Revision HeadURL' ElementsProgramExample.cpp
Definition at line 35 of file Version.cpp.
string Elements::getVersionString | ( | const unsigned short | major, |
const unsigned short | minor, | ||
const unsigned short | patch = 0 |
||
) |
Function converting the version numbers into a string.
This function return either 2 numbers separated with a "." if the patch number is zero. Or 3 numbers separated with a "." if the patch is not zero.
major | Major version number |
minor | Minor version number |
patch | Patch version number |
Definition at line 68 of file Version.cpp.
References std::to_string().