libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gbl::SourceLocation Class Reference
Inheritance diagram for gbl::SourceLocation:
GblSourceLocation

Public Member Functions

 SourceLocation (const char *pFile, const char *pFunc, GblSize line, GblSize col)
 
 SourceLocation (const GblSourceLocation &rhs)
 
const char * getFilePath (void) const
 
const char * getFileName (void) const
 
const char * getFunctionName (void) const
 
GblSize getLineNumber (void) const
 
GblSize getColumn (void) const
 
bool isValid (void) const
 
std::string toPrettyString (void) const
 

Additional Inherited Members

- Data Fields inherited from GblSourceLocation
const char * pFile
 
const char * pFunc
 
size_t line
 

Detailed Description

Definition at line 12 of file gimbal_call_stack.hpp.

Constructor & Destructor Documentation

◆ SourceLocation() [1/3]

gbl::SourceLocation::SourceLocation ( const char *  pFile,
const char *  pFunc,
GblSize  line,
GblSize  col 
)
inline

Definition at line 14 of file gimbal_call_stack.hpp.

14 :
Source code context (file, function, line)
const char * pFile
Current Source file.
const char * pFunc
Current function.
size_t line
Current line of code.

◆ SourceLocation() [2/3]

gbl::SourceLocation::SourceLocation ( void  )
inline

Definition at line 17 of file gimbal_call_stack.hpp.

17 {
18 memset(this, 0, sizeof(SourceLocation));
19 }

◆ SourceLocation() [3/3]

gbl::SourceLocation::SourceLocation ( const GblSourceLocation rhs)
inline

Definition at line 20 of file gimbal_call_stack.hpp.

20 {
21 memcpy(this, &rhs, sizeof(GblSourceLocation));
22 }

Member Function Documentation

◆ getFilePath()

const char * gbl::SourceLocation::getFilePath ( void  ) const
inline

Definition at line 24 of file gimbal_call_stack.hpp.

24{ return pFile; }

◆ getFileName()

const char * gbl::SourceLocation::getFileName ( void  ) const
inline

Definition at line 25 of file gimbal_call_stack.hpp.

25{ return pFile; }

◆ getFunctionName()

const char * gbl::SourceLocation::getFunctionName ( void  ) const
inline

Definition at line 26 of file gimbal_call_stack.hpp.

26{ return pFunc; }

◆ getLineNumber()

GblSize gbl::SourceLocation::getLineNumber ( void  ) const
inline

Definition at line 27 of file gimbal_call_stack.hpp.

27{ return line; }

◆ getColumn()

GblSize gbl::SourceLocation::getColumn ( void  ) const
inline

Definition at line 28 of file gimbal_call_stack.hpp.

28{ return column; }

The documentation for this class was generated from the following file: