Public Member Functions | |
| format_string format_string & | append (char c) |
| append a character to the string | |
| format_string & | append (const char *format,...) __attribute__((format(printf |
| append to the string | |
| void | append_va (const char *format, va_list ap) |
| append to the string using a format | |
| char * | c_str (void) const |
| get the string as a char pointer | |
| format_string (int dummy, const char *format, va_list ap) | |
| non-empty string constructor | |
| format_string (const char *format,...) __attribute__((format(printf | |
| non-empty string constructor | |
| format_string (char **buffer, size_t *len) | |
| shared buffer constructor | |
| format_string (void) | |
| empty string constructor | |
| int | get_length (void) const |
| get the length of the string | |
| format_string format_string & | set (void) |
| set the string | |
| format_string & | set (const char *format,...) __attribute__((format(printf |
| set the string | |
| void | set_va (const char *format, va_list ap) |
| set to the string using a format | |
| ~format_string (void) | |
| destructor | |
Used interally in SmTk, but is available for SmTk API users. format_string is used manage message printf(3) format generated strings in spew.
| format_string::format_string | ( | void | ) |
| format_string::format_string | ( | char ** | buffer, | |
| size_t * | len | |||
| ) |
shared buffer constructor
Sets the string to an empty string ("").
| buffer | is used to realloc(3) memory. This buffer will not be freed, as it would in the case when a user does not provide a buffer. | |
| len | The value pointed to by len must be the current length of *buffer. *len will get set to the value of the allocated length of the string in *buffer. |
| format_string::format_string | ( | const char * | format, | |
| ... | ||||
| ) |
| format_string::format_string | ( | int | dummy, | |
| const char * | format, | |||
| va_list | ap | |||
| ) |
non-empty string constructor
| dummy | is a dummy variable so that this is not seen as being the same as the format_string(const char *format, ...) constructor when using the GNU C++ compiler, g++. | |
| format | a printf(3) like format string. | |
| ap | a standard va_list. |
| format_string & format_string::append | ( | char | c | ) |
append a character to the string
| c | is a character to append to the string |
| format_string & format_string::append | ( | const char * | format, | |
| ... | ||||
| ) |
append to the string
| format | a printf(3) like format string. |
| void format_string::append_va | ( | const char * | format, | |
| va_list | ap | |||
| ) |
append to the string using a format
The name append_va() is used since append(const char *format, ...) is seen as being the same as append(const char *format, va_list ap) when using the GNU C++ compiler, g++.
| format | a printf(3) like format string. | |
| ap | a standard va_list. |
| char* smtk::format_string::c_str | ( | void | ) | const [inline] |
| int smtk::format_string::get_length | ( | void | ) | const [inline] |
| format_string format_string& smtk::format_string::set | ( | void | ) | [inline] |
set the string
| format | a printf(3) like format string. |
| format_string & format_string::set | ( | const char * | format, | |
| ... | ||||
| ) |
set the string
| format | a printf(3) like format string. |
| void smtk::format_string::set_va | ( | const char * | format, | |
| va_list | ap | |||
| ) | [inline] |
1.5.2