libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
gbl::CallRecord Class Reference
Inheritance diagram for gbl::CallRecord:
GblCallRecord gbl::Exception gbl::StdException< StdType >

Public Member Functions

template<typename R >
requires (std::is_constructible_v<Result, R> && !std::same_as<Result, R>)
 CallRecord (R resultValue, const char *pMessage=nullptr, GblObject *pObject=nullptr, SourceLocation srcLoc={}) noexcept
 
 CallRecord (Result result, const char *pMessage=nullptr, GblObject *pObject=nullptr, SourceLocation srcLoc={}) noexcept
 
 CallRecord (const GblCallRecord &other)
 
Handle * getHandle (void) const
 
Result getResult (void) const
 
const SourceLocationgetSource (void) const
 
const char * getMessage (void) const
 
std::string getSourceString (void) const
 
std::string toString (void) const
 
- Public Member Functions inherited from GblCallRecord
 GBL_ALIGNAS (8) char message[GBL_CTX_RESULT_MSG_BUFFER_SIZE]
 

Additional Inherited Members

- Data Fields inherited from GblCallRecord
GblSourceLocation srcLocation
 
GBL_RESULT result
 

Detailed Description

Definition at line 41 of file gimbal_call_stack.hpp.

Constructor & Destructor Documentation

◆ CallRecord() [1/3]

template<typename R >
requires (std::is_constructible_v<Result, R> && !std::same_as<Result, R>)
gbl::CallRecord::CallRecord ( resultValue,
const char *  pMessage = nullptr,
GblObject pObject = nullptr,
SourceLocation  srcLoc = {} 
)
inlinenoexcept

Definition at line 46 of file gimbal_call_stack.hpp.

46 {}) noexcept:
47 CallRecord(Result(resultValue), pMessage, pObject, std::move(srcLoc)) {}

◆ CallRecord() [2/3]

gbl::CallRecord::CallRecord ( Result  result,
const char *  pMessage = nullptr,
GblObject pObject = nullptr,
SourceLocation  srcLoc = {} 
)
inlinenoexcept

Definition at line 101 of file gimbal_call_stack.hpp.

101 {
102 GBL_CALL_RECORD_CONSTRUCT(this, pObject, result.getCode(), srcLoc, "%s", pMessage? pMessage : result.toString());
103}
GBL_RESULT result
Result code from a previous stack frame.

◆ CallRecord() [3/3]

gbl::CallRecord::CallRecord ( const GblCallRecord other)
inline

Definition at line 51 of file gimbal_call_stack.hpp.

51 {
52 memcpy(this, &other, sizeof(GblCallRecord));
53 }
Captures a result, its stringified message, and a source context.

Member Function Documentation

◆ getResult()

Result gbl::CallRecord::getResult ( void  ) const
inline

Definition at line 56 of file gimbal_call_stack.hpp.

56{ return this->result; }

◆ getSource()

const SourceLocation & gbl::CallRecord::getSource ( void  ) const
inline

Definition at line 57 of file gimbal_call_stack.hpp.

57 {
58 return static_cast<const SourceLocation&>(srcLocation);
59 }
GblSourceLocation srcLocation
Source location where the result + message had been set.

◆ getMessage()

const char * gbl::CallRecord::getMessage ( void  ) const
inline

Definition at line 62 of file gimbal_call_stack.hpp.

62{ return message; }

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