This interface has some tool methods for stream (in JSON format) processing.
More...
#include <Standard_Dump.hxx>
|
static TCollection_AsciiString | Text (const Standard_SStream &theStream) |
| Converts stream value to string value. The result is original stream value. More...
|
|
static TCollection_AsciiString | FormatJson (const Standard_SStream &theStream, const Standard_Integer theIndent=3) |
| Converts stream value to string value. Improves the text presentation with the following cases: More...
|
|
static void | AddValuesSeparator (Standard_OStream &theOStream) |
| Add Json values separator if the stream last symbol is not an open brace. More...
|
|
static TCollection_AsciiString | GetPointerPrefix () |
| Returns default prefix added for each pointer info string if short presentation of pointer used. More...
|
|
static TCollection_AsciiString | GetPointerInfo (const Handle< Standard_Transient > &thePointer, const bool isShortInfo=true) |
| Convert handle pointer to address of the pointer. If the handle is NULL, the result is an empty string. More...
|
|
static TCollection_AsciiString | GetPointerInfo (const void *thePointer, const bool isShortInfo=true) |
| Convert pointer to address of the pointer. If the handle is NULL, the result is an empty string. More...
|
|
static void | DumpKeyToClass (Standard_OStream &theOStream, const char *theKey, const TCollection_AsciiString &theField) |
| Append into output value: "Name": { Field }. More...
|
|
static void | DumpCharacterValues (Standard_OStream &theOStream, int theCount,...) |
| Unite values in one value using template: "value_1", "value_2", ..., "value_n". More...
|
|
static void | DumpRealValues (Standard_OStream &theOStream, int theCount,...) |
| Unite values in one value using template: value_1, value_2, ..., value_n. More...
|
|
static const char * | DumpFieldToName (const char *theField) |
| Convert field name into dump text value, removes "&" and "my" prefixes An example, for field myValue, theName is Value, for &myCLass, the name is Class. More...
|
|
This interface has some tool methods for stream (in JSON format) processing.
◆ AddValuesSeparator()
Add Json values separator if the stream last symbol is not an open brace.
- Parameters
-
◆ DumpCharacterValues()
static void Standard_Dump::DumpCharacterValues |
( |
Standard_OStream & |
theOStream, |
|
|
int |
theCount, |
|
|
|
... |
|
) |
| |
|
static |
Unite values in one value using template: "value_1", "value_2", ..., "value_n".
- Parameters
-
theOStream | [out] stream to be fill with values |
theCount | numer of values |
◆ DumpFieldToName()
static const char* Standard_Dump::DumpFieldToName |
( |
const char * |
theField | ) |
|
|
static |
Convert field name into dump text value, removes "&" and "my" prefixes An example, for field myValue, theName is Value, for &myCLass, the name is Class.
- Parameters
-
theField | a source value |
theName | [out] an updated name |
◆ DumpKeyToClass()
Append into output value: "Name": { Field }.
- Parameters
-
theOStream | [out] stream to be fill with values |
theKey | a source value |
theField | stream value |
◆ DumpRealValues()
static void Standard_Dump::DumpRealValues |
( |
Standard_OStream & |
theOStream, |
|
|
int |
theCount, |
|
|
|
... |
|
) |
| |
|
static |
Unite values in one value using template: value_1, value_2, ..., value_n.
- Parameters
-
theOStream | [out] stream to be fill with values |
theCount | numer of values |
◆ FormatJson()
Converts stream value to string value. Improves the text presentation with the following cases:
- for '{' append after '
' and indent to the next value, increment current indent value
- for '}' append '
' and current indent before it, decrement indent value
- for ',' append after '
' and indent to the next value. If the current symbol is in massive container [], do nothing - Parameters
-
theStream | source value |
theIndent | count of ' ' symbols to apply hierarchical indent of the text values |
- Returns
- text presentation
◆ GetPointerInfo() [1/2]
Convert handle pointer to address of the pointer. If the handle is NULL, the result is an empty string.
- Parameters
-
thePointer | a pointer |
isShortInfo | if true, all '0' symbols in the beginning of the pointer are skipped |
- Returns
- the string value
◆ GetPointerInfo() [2/2]
static TCollection_AsciiString Standard_Dump::GetPointerInfo |
( |
const void * |
thePointer, |
|
|
const bool |
isShortInfo = true |
|
) |
| |
|
static |
Convert pointer to address of the pointer. If the handle is NULL, the result is an empty string.
- Parameters
-
thePointer | a pointer |
isShortInfo | if true, all '0' symbols in the beginning of the pointer are skipped |
- Returns
- the string value
◆ GetPointerPrefix()
Returns default prefix added for each pointer info string if short presentation of pointer used.
◆ Text()
Converts stream value to string value. The result is original stream value.
- Parameters
-
- Returns
- text presentation
The documentation for this class was generated from the following file: