HoverRace  2.0
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
HoverRace::Util::InspectMapNode Class Reference

An inspection node which maps field names to values (either strings or inspectable subobjects). More...

#include <InspectMapNode.h>

+ Inheritance diagram for HoverRace::Util::InspectMapNode:

Public Member Functions

 InspectMapNode ()
 
virtual ~InspectMapNode ()
 
template<typename T >
InspectMapNodeAddArray (const std::string &name, T *elems, size_t startIndex, size_t size)
 
template<typename T >
InspectMapNodeAddField (const std::string &name, const T &value)
 
InspectMapNodeAddField (const std::string &name, const char *value)
 
InspectMapNodeAddField (const std::string &name, const std::string &value)
 
InspectMapNodeAddField (const std::string &name, bool value)
 
InspectMapNodeAddSubobject (const std::string &name, const Inspectable *obj)
 
void RenderToStream (std::ostream &os)
 Render this node to an output stream. More...
 
void RenderToString (std::string &s)
 Render this node to a string. More...
 
void RenderToYaml (yaml::Emitter &emitter) override
 Render this node to a YAML emitter. More...
 
- Public Member Functions inherited from HoverRace::Util::InspectNode
 InspectNode ()
 
virtual ~InspectNode ()
 

Protected Member Functions

void AddStringField (const std::string &name, const std::string &value)
 

Private Types

using SUPER = InspectNode
 

Private Attributes

std::vector< std::pair< std::string, std::shared_ptr< InspectNode > > > fields
 

Detailed Description

An inspection node which maps field names to values (either strings or inspectable subobjects).

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Util::InspectMapNode::InspectMapNode ( )
inline
virtual HoverRace::Util::InspectMapNode::~InspectMapNode ( )
inlinevirtual

Member Function Documentation

template<typename T >
InspectMapNode& HoverRace::Util::InspectMapNode::AddArray ( const std::string &  name,
T *  elems,
size_t  startIndex,
size_t  size 
)
inline
template<typename T >
InspectMapNode& HoverRace::Util::InspectMapNode::AddField ( const std::string &  name,
const T &  value 
)
inline
InspectMapNode& HoverRace::Util::InspectMapNode::AddField ( const std::string &  name,
const char *  value 
)
inline
InspectMapNode& HoverRace::Util::InspectMapNode::AddField ( const std::string &  name,
const std::string &  value 
)
inline
InspectMapNode& HoverRace::Util::InspectMapNode::AddField ( const std::string &  name,
bool  value 
)
inline
void HoverRace::Util::InspectMapNode::AddStringField ( const std::string &  name,
const std::string &  value 
)
protected
InspectMapNode & HoverRace::Util::InspectMapNode::AddSubobject ( const std::string &  name,
const Inspectable obj 
)
void HoverRace::Util::InspectMapNode::RenderToStream ( std::ostream &  os)

Render this node to an output stream.

Parameters
osThe output stream.
Exceptions
std::exceptionAn error occurred.
void HoverRace::Util::InspectMapNode::RenderToString ( std::string &  s)

Render this node to a string.

Parameters
sThe output string.
Exceptions
std::exceptionAn error occurred.
void HoverRace::Util::InspectMapNode::RenderToYaml ( yaml::Emitter emitter)
overridevirtual

Render this node to a YAML emitter.

Parameters
emitterThe emitter.

Implements HoverRace::Util::InspectNode.

Member Data Documentation

std::vector<std::pair<std::string, std::shared_ptr<InspectNode> > > HoverRace::Util::InspectMapNode::fields
private

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