10#include "ers/InvalidReferenceIssue.h"
44 char buffer[
sizeof(
void *)+1] ;
45 snprintf(buffer,
sizeof(buffer),
"%p",p);
46 set_value(REFERENCE_VALUE_KEY,buffer) ;
47 set_value(REFERENCE_TYPE_KEY,REFERENCE_C_PTR_TYPE) ;
52 std::ostringstream message ;
53 message <<
"pointer '" << ptr_name <<
"' is null" ;
Source context for Issue.
static const char *const REFERENCE_C_PTR_TYPE
void pointer(const void *p)
static const char *const REFERENCE_NAME_KEY
static const char *const CLASS_NAME
static const char *const REFERENCE_VALUE_KEY
virtual const char * get_class_name() const
Get key for class (used for serialisation)
static const char *const REFERENCE_TYPE_KEY
static void check_reference(const Context &context, severity_t s, const void *pointer, const char *ptr_name, responsibility_t r)
bool register_issue(const std::string &name, CreateIssueCallback creator)
register an issue factory
static IssueFactory * instance()
method to access singleton
responsibility_t responsibility() const
get the responsability level of the issue
severity_t severity() const
severity_t of the issue
void finish_setup(const std::string &message)
Finishes the setup of the Issue.
string_map_type m_value_table
Optional properties.
enum ers::_responsibility_t responsibility_t
enum ers::_severity_t severity_t