|
static TCollection_AsciiString | Text (const Standard_SStream &theStream) |
| Converts stream value to string value. The result is original stream value.
|
|
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:
|
|
static Standard_Boolean | SplitJson (const TCollection_AsciiString &theStreamStr, NCollection_IndexedDataMap< TCollection_AsciiString, Standard_DumpValue > &theKeyToValues) |
| Converts stream into map of values.
|
|
static NCollection_List< Standard_Integer > | HierarchicalValueIndices (const NCollection_IndexedDataMap< TCollection_AsciiString, TCollection_AsciiString > &theValues) |
| Returns container of indices in values, that has hierarchical value.
|
|
static Standard_Boolean | HasChildKey (const TCollection_AsciiString &theSourceValue) |
| Returns true if the value has bracket key.
|
|
static Standard_CString | JsonKeyToString (const Standard_JsonKey theKey) |
| Returns key value for enum type.
|
|
static Standard_Integer | JsonKeyLength (const Standard_JsonKey theKey) |
| Returns length value for enum type.
|
|
static void | AddValuesSeparator (Standard_OStream &theOStream) |
|
static TCollection_AsciiString | GetPointerPrefix () |
| Returns default prefix added for each pointer info string if short presentation of pointer used.
|
|
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.
|
|
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.
|
|
static void | DumpKeyToClass (Standard_OStream &theOStream, const TCollection_AsciiString &theKey, const TCollection_AsciiString &theField) |
| Append into output value: "Name": { Field }.
|
|
static void | DumpCharacterValues (Standard_OStream &theOStream, int theCount,...) |
| Unite values in one value using template: "value_1", "value_2", ..., "value_n".
|
|
static void | DumpRealValues (Standard_OStream &theOStream, int theCount,...) |
| Unite values in one value using template: value_1, value_2, ..., value_n.
|
|
static Standard_Boolean | ProcessStreamName (const TCollection_AsciiString &theStreamStr, const TCollection_AsciiString &theName, Standard_Integer &theStreamPos) |
| Check whether the parameter name is equal to the name in the stream at position.
|
|
static Standard_Boolean | ProcessFieldName (const TCollection_AsciiString &theStreamStr, const TCollection_AsciiString &theName, Standard_Integer &theStreamPos) |
| Check whether the field name is equal to the name in the stream at position.
|
|
static Standard_Boolean | InitRealValues (const TCollection_AsciiString &theStreamStr, Standard_Integer &theStreamPos, int theCount,...) |
| Unite values in one value using template: value_1, value_2, ..., value_n.
|
|
static Standard_Boolean | InitValue (const TCollection_AsciiString &theStreamStr, Standard_Integer &theStreamPos, TCollection_AsciiString &theValue) |
| Returns real value.
|
|
static TCollection_AsciiString | DumpFieldToName (const TCollection_AsciiString &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.
|
|
This interface has some tool methods for stream (in JSON format) processing.
Converts stream into map of values.
The one level stream example: 'key_1: value_1, key_2: value_2' In output: values contain 'key_1: value_1' and 'key_2: value_2'.
The two level stream example: 'key_1: value_1, key_2: value_2, key_3: {sublevel_key_1: sublevel_value_1}, key_4: value_4' In output values contain 'key_1: value_1', 'key_2: value_2', 'key_3: {sublevel_key_1: sublevel_value_1}' and 'key_4: value_4'. The sublevel value might be processed later using the same method.
- Parameters
-
theStreamStr | stream value |
theKeyToValues | [out] container of split values. It contains key to value and position of the value in the stream text |