libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
info.hpp File Reference
#include "unicode_conversions.hpp"
#include <cassert>
#include <climits>
#include <functional>
#include <iterator>
#include <map>
#include <typeinfo>
#include <vector>
Include dependency graph for info.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  jmmcg::LIBJMMCG_VER_NAMESPACE::info::revision
 Attempt to include revision information for the file from which the exception was constructed. More...
 
class  jmmcg::LIBJMMCG_VER_NAMESPACE::info::function
 Attempt to include function-call information for the function from which the exception was constructed. More...
 
class  jmmcg::LIBJMMCG_VER_NAMESPACE::info::function::argument
 Attempt to include argument information for the function from which the exception was constructed. More...
 

Namespaces

namespace  jmmcg
 Link with -lrt to include these functions.
 
namespace  jmmcg::LIBJMMCG_VER_NAMESPACE
 
namespace  jmmcg::LIBJMMCG_VER_NAMESPACE::info
 All of this stuff is for high-quality error reporting.
 

Macros

#define JMMCG_REVISION_HDR(_JMMCG_REVISION_HDR)   jmmcg::LIBJMMCG_VER_NAMESPACE::info::revision((_JMMCG_REVISION_HDR),__FILE__)
 Much as I despise macros, I despise adding error information more. (That's why I wrote these classes first - just to get it out of the way, so I can get on with more fun stuff... More...
 
#define JMMCG_REVISION_CONSTANT(_JMMCG_REVISION_HDR)
 Introduces the constant "__REV_INFO__" (c.f. LINE, etc) into a private namespace for that compilation unit. More...
 
#define JMMCG_FUNCTION(JMMCG_FUNCTION_TYPE_)   jmmcg::LIBJMMCG_VER_NAMESPACE::info::function(__LINE__,__PRETTY_FUNCTION__,typeid(JMMCG_FUNCTION_TYPE_))
 Construction a function error-information object with no arguments. More...
 
#define JMMCG_FUNCTION1(JMMCG_FUNCTION_TYPE_, JMMCG_FUNCTION_ARGUMENTS_)   jmmcg::LIBJMMCG_VER_NAMESPACE::info::function(__LINE__,__PRETTY_FUNCTION__,typeid(JMMCG_FUNCTION_TYPE_),(JMMCG_FUNCTION_ARGUMENTS_))
 Construction a function error-information object with one argument. More...
 

Macro Definition Documentation

◆ JMMCG_FUNCTION

#define JMMCG_FUNCTION (   JMMCG_FUNCTION_TYPE_)    jmmcg::LIBJMMCG_VER_NAMESPACE::info::function(__LINE__,__PRETTY_FUNCTION__,typeid(JMMCG_FUNCTION_TYPE_))

Construction a function error-information object with no arguments.

Eases construction of this object in a source or header file.

See also
function

Definition at line 240 of file info.hpp.

◆ JMMCG_FUNCTION1

#define JMMCG_FUNCTION1 (   JMMCG_FUNCTION_TYPE_,
  JMMCG_FUNCTION_ARGUMENTS_ 
)    jmmcg::LIBJMMCG_VER_NAMESPACE::info::function(__LINE__,__PRETTY_FUNCTION__,typeid(JMMCG_FUNCTION_TYPE_),(JMMCG_FUNCTION_ARGUMENTS_))

Construction a function error-information object with one argument.

Eases construction of this object in a source or header file.

See also
function

Definition at line 248 of file info.hpp.

◆ JMMCG_REVISION_CONSTANT

#define JMMCG_REVISION_CONSTANT (   _JMMCG_REVISION_HDR)
Value:
namespace { \
[[maybe_unused]] const jmmcg::LIBJMMCG_VER_NAMESPACE::info::revision __REV_INFO__((_JMMCG_REVISION_HDR),__FILE__); \
} \
Attempt to include revision information for the file from which the exception was constructed.
Definition: info.hpp:54

Introduces the constant "__REV_INFO__" (c.f. LINE, etc) into a private namespace for that compilation unit.

An easier way of getting this boiler-plate revision information into your source files. Handy for source files.

See also
revision

Definition at line 229 of file info.hpp.

◆ JMMCG_REVISION_HDR

#define JMMCG_REVISION_HDR (   _JMMCG_REVISION_HDR)    jmmcg::LIBJMMCG_VER_NAMESPACE::info::revision((_JMMCG_REVISION_HDR),__FILE__)

Much as I despise macros, I despise adding error information more. (That's why I wrote these classes first - just to get it out of the way, so I can get on with more fun stuff...

So these take some of the tedium out of adding that boiler-plate error-information that may come in handy that once-in-a-blue-moon occasion I didn't bother to put it in, because one finds it just too tedious....)

See also
revision Handy for use in header files for constructing "libjmmcg::exception"s, but see that file for a more useful macro.

Definition at line 220 of file info.hpp.