|
#define | OCCT_CLASS_NAME(theClass) #theClass |
| The file contains interface to prepare dump output for OCCT objects. Format of the dump is JSON. To prepare this output, implement method DumpJson in the object and use macro functions from this file. Macros have one parameter for both, key and the value. It is a field of the current class. Macro has internal analyzer that uses the variable name to generate key. If the parameter has prefix symbols "&", "*" and "my", it is cut. More...
|
|
#define | OCCT_DUMP_CLASS_BEGIN(theOStream, theName) Standard_DumpSentry aSentry (theOStream, OCCT_CLASS_NAME(theName)); |
| Creates an instance of Sentry to cover the current Dump implementation with keys of start and end. This row should be inserted before other macros. The end key will be added by the sentry remove, (exit of the method). More...
|
|
#define | OCCT_DUMP_FIELD_VALUE_NUMERICAL(theOStream, theField) |
| Append into output value: "Name": Field. More...
|
|
#define | OCCT_DUMP_FIELD_VALUE_STRING(theOStream, theField) |
| Append into output value: "Name": "Field". More...
|
|
#define | OCCT_DUMP_FIELD_VALUE_POINTER(theOStream, theField) |
| Append into output value: "Name": "address of the pointer". More...
|
|
#define | OCCT_DUMP_FIELD_VALUES_DUMPED(theOStream, theDepth, theField) |
| Append into output value: "Name": { field dumped values } It computes Dump of the fields. The expected field is a pointer. Use this macro for fields of the dumped class which has own Dump implementation. The macros is recursive. Recursion is stopped when the depth value becomes equal to zero. Depth = -1 is the default value, dump here is unlimited. More...
|
|
#define | OCCT_DUMP_FIELD_VALUES_NUMERICAL(theOStream, theName, theCount, ...) |
| Append real values into output values in an order: [value_1, value_2, ...] It computes Dump of the parent. The expected field is a parent class name to call ClassName::Dump. More...
|
|
#define | OCCT_DUMP_FIELD_VALUES_STRING(theOStream, theName, theCount, ...) |
| Append real values into output values in an order: ["value_1", "value_2", ...] It computes Dump of the parent. The expected field is a parent class name to call ClassName::Dump. More...
|
|
#define | OCCT_DUMP_BASE_CLASS(theOStream, theDepth, theField) |
| Append into output value: "Name": { field dumped values } It computes Dump of the parent. The expected field is a parent class name to call ClassName::Dump. Use this macro for parent of the current class. The macros is recursive. Recursive is stoped when the depth value becomes equal to zero. Depth = -1 is the default value, dump here is unlimited. More...
|
|
#define | OCCT_DUMP_VECTOR_CLASS(theOStream, theName, theCount, ...) |
| Append vector values into output value: "Name": [value_1, value_2, ...] This macro is intended to have only one row for dumped object in Json. It's possible to use it without necessity of OCCT_DUMP_CLASS_BEGIN call, but pay attention that it should be only one row in the object dump. More...
|
|
#define OCCT_CLASS_NAME |
( |
|
theClass | ) |
#theClass |
The file contains interface to prepare dump output for OCCT objects. Format of the dump is JSON. To prepare this output, implement method DumpJson in the object and use macro functions from this file. Macros have one parameter for both, key and the value. It is a field of the current class. Macro has internal analyzer that uses the variable name to generate key. If the parameter has prefix symbols "&", "*" and "my", it is cut.
- OCCT_DUMP_FIELD_VALUE_NUMERICAL. Use it for fields of numerical C++ types, like int, float, double. It creates a pair "key", "value",
- OCCT_DUMP_FIELD_VALUE_STRING. Use it for char* type. It creates a pair "key", "value",
- OCCT_DUMP_FIELD_VALUE_POINTER. Use it for pointer fields. It creates a pair "key", "value", where the value is the pointer address,
- OCCT_DUMP_FIELD_VALUES_DUMPED. Use it for fields that has own Dump implementation. It expects the pointer to the class instance. It creates "key": { result of dump of the field }
- OCCT_DUMP_FIELD_VALUES_NUMERICAL. Use it for unlimited list of fields of C++ double type. It creates massive of values [value_1, value_2, ...]
- OCCT_DUMP_FIELD_VALUES_STRING. Use it for unlimited list of fields of TCollection_AsciiString types. It creates massive of values ["value_1", "value_2", ...]
- OCCT_DUMP_BASE_CLASS. Use if Dump implementation of the class is virtual, to perform ClassName::Dump() of the parent class, expected parameter is the parent class name. It creates "key": { result of dump of the field }
- OCCT_DUMP_VECTOR_CLASS. Use it as a single row in some object dump to have one row in output. It's possible to use it without necessity of OCCT_DUMP_CLASS_BEGIN call. It creates massive of values [value_1, value_2, ...]
The Dump result prepared by these macros is an output stream, it is not arranged with spaces and line feed. To have output in a more readable way, use ConvertToAlignedString method for obtained stream. Converts the class type into a string value