RawPointerT< Pointer > Class Template Reference

#include <IoManip.h>

Collaboration diagram for RawPointerT< Pointer >:

Public Member Functions

 RawPointerT (const char *aLabel, const Pointer &aPtr)
 
RawPointerT< Pointer > & asExtra ()
 Report the pointed-to-object on a dedicated Debug::Extra line. More...
 
RawPointerT< Pointer > & orNil (const char *nilTextToUse="[nil]")
 enable and, optionally, customize reporting of nil pointers More...
 

Public Attributes

const char * label
 
const char * nilText = nullptr
 the name or description of the being-debugged object More...
 
const Pointer & ptr
 
bool onExtraLine = false
 a possibly nil pointer to the being-debugged object More...
 

Detailed Description

template<class Pointer>
class RawPointerT< Pointer >

Safely prints an object pointed to by the given pointer: [label]<object> Prints nothing at all if the pointer is nil.

Definition at line 20 of file IoManip.h.

Constructor & Destructor Documentation

◆ RawPointerT()

template<class Pointer >
RawPointerT< Pointer >::RawPointerT ( const char *  aLabel,
const Pointer &  aPtr 
)
inline

Definition at line 22 of file IoManip.h.

Member Function Documentation

◆ asExtra()

template<class Pointer >
RawPointerT< Pointer > & RawPointerT< Pointer >::asExtra ( )
inline

Definition at line 26 of file IoManip.h.

References RawPointerT< Pointer >::onExtraLine.

◆ orNil()

template<class Pointer >
RawPointerT< Pointer > & RawPointerT< Pointer >::orNil ( const char *  nilTextToUse = "[nil]")
inline

Definition at line 29 of file IoManip.h.

References RawPointerT< Pointer >::nilText.

Member Data Documentation

◆ label

template<class Pointer >
const char* RawPointerT< Pointer >::label

Definition at line 31 of file IoManip.h.

Referenced by operator<<().

◆ nilText

template<class Pointer >
const char* RawPointerT< Pointer >::nilText = nullptr

whether and how to report a nil pointer; use orNil() to enable

Definition at line 34 of file IoManip.h.

Referenced by operator<<(), and RawPointerT< Pointer >::orNil().

◆ onExtraLine

template<class Pointer >
bool RawPointerT< Pointer >::onExtraLine = false

Definition at line 37 of file IoManip.h.

Referenced by RawPointerT< Pointer >::asExtra(), and operator<<().

◆ ptr

template<class Pointer >
const Pointer& RawPointerT< Pointer >::ptr

Definition at line 36 of file IoManip.h.

Referenced by operator<<().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors