ewmscp  ..
Public Member Functions | Private Attributes | List of all members
errMsg::location Class Reference

class for defining the location of a error message in the source code. More...

#include <errMsgQueue.h>

Public Member Functions

constexpr location (const char *aFunc=__builtin_FUNCTION(), int aLine=__builtin_LINE(), const char *aFile=__builtin_FILE())
 
const char * getFunc () const
 
const char * getFile () const
 
int getLine () const
 

Private Attributes

const char * function
 
const char * file
 
int line
 

Detailed Description

class for defining the location of a error message in the source code.

Works only if the __builtin_FUNCTION and related builtins are available.

Definition at line 14 of file errMsgQueue.h.

Constructor & Destructor Documentation

◆ location()

constexpr errMsg::location::location ( const char *  aFunc = __builtin_FUNCTION(),
int  aLine = __builtin_LINE(),
const char *  aFile = __builtin_FILE() 
)
inlineconstexpr

Definition at line 27 of file errMsgQueue.h.

29  :
30 #undef __useBuiltinFunction__
31  #else // no info available....
32  constexpr location(const char *aFunc = "unknown",
33  int aLine = 0,
34  const char *aFile = "unknown"):
35  #endif
36 
37  function(aFunc),
38  file(aFile),
39  line(aLine) {}

Member Function Documentation

◆ getFile()

const char* errMsg::location::getFile ( ) const
inline

Definition at line 43 of file errMsgQueue.h.

43  {
44  return file;
45  };

References file.

◆ getFunc()

const char* errMsg::location::getFunc ( ) const
inline

Definition at line 40 of file errMsgQueue.h.

40  {
41  return function;
42  };

◆ getLine()

int errMsg::location::getLine ( ) const
inline

Definition at line 46 of file errMsgQueue.h.

46  {
47  return line;
48  };

References line.

Member Data Documentation

◆ file

const char* errMsg::location::file
private

Definition at line 16 of file errMsgQueue.h.

Referenced by getFile().

◆ function

const char* errMsg::location::function
private

Definition at line 15 of file errMsgQueue.h.

◆ line

int errMsg::location::line
private

Definition at line 17 of file errMsgQueue.h.

Referenced by getLine().


The documentation for this class was generated from the following file:
errMsg::location::function
const char * function
Definition: errMsgQueue.h:15
errMsg::location::location
constexpr location(const char *aFunc=__builtin_FUNCTION(), int aLine=__builtin_LINE(), const char *aFile=__builtin_FILE())
Definition: errMsgQueue.h:27
errMsg::location::line
int line
Definition: errMsgQueue.h:17
errMsg::location::file
const char * file
Definition: errMsgQueue.h:16