HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tostring_formatting Struct Reference

#include <typedesc.h>

Public Types

enum  Flags { None =0, escape_strings =1, quote_single_string =2 }
 
enum  Notation { STDFORMAT }
 

Public Member Functions

 tostring_formatting ()=default
 
 tostring_formatting (const char *int_fmt, const char *float_fmt="%g", const char *string_fmt="\"%s\"", const char *ptr_fmt="%p", const char *aggregate_begin="(", const char *aggregate_end=")", const char *aggregate_sep=",", const char *array_begin="{", const char *array_end="}", const char *array_sep=",", int flags=escape_strings, const char *uint_fmt="%u")
 
 tostring_formatting (Notation notation, const char *int_fmt="{}", const char *uint_fmt="{}", const char *float_fmt="{}", const char *string_fmt="\"{}\"", const char *ptr_fmt="{}", const char *aggregate_begin="(", const char *aggregate_end=")", const char *aggregate_sep=",", const char *array_begin="{", const char *array_end="}", const char *array_sep=",", int flags=escape_strings)
 

Public Attributes

const char * int_fmt = "%d"
 
const char * float_fmt = "%g"
 
const char * string_fmt = "\"%s\""
 
const char * ptr_fmt = "%p"
 
const char * aggregate_begin = "("
 
const char * aggregate_end = ")"
 
const char * aggregate_sep = ","
 
const char * array_begin = "{"
 
const char * array_end = "}"
 
const char * array_sep = ","
 
int flags = escape_strings
 
const char * uint_fmt = "%u"
 
const char * reserved2 = ""
 
const char * reserved3 = ""
 
bool use_sprintf = true
 

Detailed Description

Helper class for tostring() that contains a whole bunch of parameters that control exactly how all the data types that can be described as TypeDesc ought to be formatted as a string. Uses printf-like conventions. This will someday be deprecated.

Definition at line 502 of file typedesc.h.

Member Enumeration Documentation

Enumerator
None 
escape_strings 
quote_single_string 

Definition at line 519 of file typedesc.h.

Enumerator
STDFORMAT 

Definition at line 527 of file typedesc.h.

Constructor & Destructor Documentation

tostring_formatting::tostring_formatting ( )
default
tostring_formatting::tostring_formatting ( const char *  int_fmt,
const char *  float_fmt = "%g",
const char *  string_fmt = "\"%s\"",
const char *  ptr_fmt = "%p",
const char *  aggregate_begin = "(",
const char *  aggregate_end = ")",
const char *  aggregate_sep = ",",
const char *  array_begin = "{",
const char *  array_end = "}",
const char *  array_sep = ",",
int  flags = escape_strings,
const char *  uint_fmt = "%u" 
)
tostring_formatting::tostring_formatting ( Notation  notation,
const char *  int_fmt = "{}",
const char *  uint_fmt = "{}",
const char *  float_fmt = "{}",
const char *  string_fmt = "\"{}\"",
const char *  ptr_fmt = "{}",
const char *  aggregate_begin = "(",
const char *  aggregate_end = ")",
const char *  aggregate_sep = ",",
const char *  array_begin = "{",
const char *  array_end = "}",
const char *  array_sep = ",",
int  flags = escape_strings 
)

Member Data Documentation

const char* tostring_formatting::aggregate_begin = "("

Definition at line 510 of file typedesc.h.

const char* tostring_formatting::aggregate_end = ")"

Definition at line 511 of file typedesc.h.

const char* tostring_formatting::aggregate_sep = ","

Definition at line 512 of file typedesc.h.

const char* tostring_formatting::array_begin = "{"

Definition at line 515 of file typedesc.h.

const char* tostring_formatting::array_end = "}"

Definition at line 516 of file typedesc.h.

const char* tostring_formatting::array_sep = ","

Definition at line 517 of file typedesc.h.

int tostring_formatting::flags = escape_strings

Definition at line 520 of file typedesc.h.

const char* tostring_formatting::float_fmt = "%g"

Definition at line 505 of file typedesc.h.

const char* tostring_formatting::int_fmt = "%d"

Definition at line 504 of file typedesc.h.

const char* tostring_formatting::ptr_fmt = "%p"

Definition at line 507 of file typedesc.h.

const char* tostring_formatting::reserved2 = ""

Definition at line 523 of file typedesc.h.

const char* tostring_formatting::reserved3 = ""

Definition at line 524 of file typedesc.h.

const char* tostring_formatting::string_fmt = "\"%s\""

Definition at line 506 of file typedesc.h.

const char* tostring_formatting::uint_fmt = "%u"

Definition at line 522 of file typedesc.h.

bool tostring_formatting::use_sprintf = true

Definition at line 525 of file typedesc.h.


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