Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Friends | List of all members
inexor::util::embraced Struct Reference

Helper class to allow the writing of std::cout << embraced("I should be inside curly brackets", "{", "}"); Same works for numbers, but it may destroy std::setprecision. More...

#include <Logging.hpp>

Inheritance diagram for inexor::util::embraced:
inexor::util::quoted

Public Member Functions

 embraced (const char *text, const char *leading, const char *trailing)
 
template<typename T >
 embraced (T number, const char *leading, const char *trailing)
 Also allow all kind of number formats beeing embraced: More...
 
 operator std::string () const
 Construct a std::string from this class. More...
 

Public Attributes

const std::string _text
 
const char * _leading
 
const char * _trailing
 

Friends

std::ostream & operator<< (std::ostream &ostr, const embraced &q)
 Pass this class directly into a stream. More...
 

Detailed Description

Helper class to allow the writing of std::cout << embraced("I should be inside curly brackets", "{", "}"); Same works for numbers, but it may destroy std::setprecision.

Constructor & Destructor Documentation

inexor::util::embraced::embraced ( const char *  text,
const char *  leading,
const char *  trailing 
)
inline
template<typename T >
inexor::util::embraced::embraced ( number,
const char *  leading,
const char *  trailing 
)
inline

Also allow all kind of number formats beeing embraced:

Member Function Documentation

inexor::util::embraced::operator std::string ( ) const
inline

Construct a std::string from this class.

References _leading, _text, and _trailing.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ostr,
const embraced q 
)
friend

Pass this class directly into a stream.

Member Data Documentation

const char* inexor::util::embraced::_leading

Referenced by operator std::string().

const std::string inexor::util::embraced::_text

Referenced by operator std::string().

const char * inexor::util::embraced::_trailing

Referenced by operator std::string().


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