libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::info::function Class Reference

Attempt to include function-call information for the function from which the exception was constructed. More...

#include <info.hpp>

Classes

class  argument
 Attempt to include argument information for the function from which the exception was constructed. More...
 

Public Types

typedef std::vector< argumentargs_details_type
 

Public Member Functions

__stdcall function (const unsigned long l=__LINE__, const char *n=NULL, const std::type_info &th=typeid(void), const argument &a=argument(_T("void"), _T("nothing"))) noexcept(false)
 
__stdcall function (const function &f) noexcept(false)
 
void __fastcall add_arg (const argument &a) noexcept(false)
 
template<typename Arg_Val >
void __fastcall add_arg (const tstring &n, const Arg_Val &v) noexcept(false)
 

Friends

tostream &__fastcall operator<< (tostream &o, const function &fi) noexcept(false)
 

Detailed Description

Attempt to include function-call information for the function from which the exception was constructed.

Use of the macros JMMCG_FUNCTION (for no arguments) & JMMCG_FUNCTION1 (for one argument) make use of this object for constructing an exception easier.

See also
JMMCG_FUNCTION
JMMCG_FUNCTION1

Definition at line 118 of file info.hpp.

Member Typedef Documentation

◆ args_details_type

Definition at line 168 of file info.hpp.

Constructor & Destructor Documentation

◆ function() [1/2]

__stdcall jmmcg::info::function::function ( const unsigned long  l = __LINE__,
const char *  n = NULL,
const std::type_info &  th = typeid(void),
const argument a = argument(_T("void"),_T("nothing")) 
)
inlineexplicitnoexcept

Definition at line 170 of file info.hpp.

◆ function() [2/2]

__stdcall jmmcg::info::function::function ( const function f)
inlinenoexcept

Definition at line 174 of file info.hpp.

References std::hash< jmmcg::wstack_string >::operator()().

Member Function Documentation

◆ add_arg() [1/2]

void __fastcall jmmcg::info::function::add_arg ( const argument a)
inlinenoexcept

Definition at line 179 of file info.hpp.

◆ add_arg() [2/2]

template<typename Arg_Val >
void __fastcall jmmcg::info::function::add_arg ( const tstring n,
const Arg_Val &  v 
)
inlinenoexcept

Definition at line 185 of file info.hpp.

Friends And Related Function Documentation

◆ operator<<

tostream& __fastcall operator<< ( tostream o,
const function fi 
)
friend
Todo:
Implement using the advice given in "Standard C++ IOStreams and Locales" by A.Langer & K.Kreft, page 170.

Definition at line 197 of file info.hpp.


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