Template Function gpa::ToString(T const&, StrFmtFlags, uint32_t, uint32_t)

Function Documentation

template<typename T>
inline std::string gpa::ToString(T const &obj, StrFmtFlags strFmtFlags = GPA_STR_FMT_DEFAULT, uint32_t tabCount = 0, uint32_t tabSize = 4)

Gets the std::string representation of a given structure or enumeration.

Note

tabCount only has an effect if strFmtFlags has the GPA_STR_FMT_FORMATTED bit set

Note

tabSize only has an effect if strFmtFlags has the GPA_STR_FMT_FORMATTED bit set

Parameters
  • <T> -- The type of the object or enumeration to get the std::string representation of

  • obj -- [in] The structure or enumeration to get the std::string representation of

  • [in, optional=GPA_STR_FMT_DEFAULT] -- strFmtFlags A bit mask of flags controlling the resulting std::string's formatting

  • [in, optional=0] -- tabCount The number of tabs to indent the contents of the resulting std::string

  • [in, optional=4] -- tabSize The number of spaces to use for a tab

Returns

The std::string representation of the given structure or enumeration