CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxGraphDocumentFormat Class Referenceabstract

Format-specific preflight and SDK-adapter I/O; adapters remain caller-owned. More...

#include <ctxGraphPersistence.h>

Inheritance diagram for ctxGraphDocumentFormat:

Public Member Functions

virtual ~ctxGraphDocumentFormat ()
virtual gzBool useDeepCopy () override
virtual gzBool preflight (const ctxGraphDocument &document, gzBool embedParameters, gzString &error) const =0
virtual gzBool write (const ctxGraphDocument &document, gzSerializeAdapter *adapter, gzBool embedParameters, gzString &error)=0
virtual gzBool read (gzSerializeAdapter *adapter, ctxGraphDocument &document, gzString &error)=0

Static Protected Member Functions

static gzBool readJsonRecords (gzSerializeAdapter *adapter, ctxGraphDocumentJsonValidator validator, gzDynamicType &records, gzString &error)
 Reads finite SDK JSON array/string records, then checks their complete wire.
static gzBool preflightJsonRecords (const ctxGraphDocument &document, gzBool embedParameters, gzString &error)
 Checks the supported native definition/snapshot and exact streamed size without I/O.
static gzBool writeJsonRecords (const ctxGraphDocument &document, gzSerializeAdapter *adapter, gzBool embedParameters, gzString &error)
 Streams native document-v1 records after complete preflight and a counting pass.
static gzBool readJsonDocument (gzSerializeAdapter *adapter, ctxGraphDocument &document, gzString &error)
 Reads the supported complete native JSON document through SDK framing.
static gzBool preflightXmlRecords (const ctxGraphDocument &document, gzBool embedParameters, gzString &error)
 Checks native XML document-v1 support and complete streamed size without target I/O.
static gzBool writeXmlRecords (const ctxGraphDocument &document, gzSerializeAdapter *adapter, gzBool embedParameters, gzString &error)
 Streams a native XML document with wrapper-specific lossless text and exact values.
static gzBool readXmlDocument (gzSerializeAdapter *adapter, ctxGraphDocument &document, gzString &error)
 Reads native XML document-v1 records with SDK syntax and shared semantic validation.

Detailed Description

Format-specific preflight and SDK-adapter I/O; adapters remain caller-owned.

Definition at line 88 of file ctxGraphPersistence.h.

Constructor & Destructor Documentation

◆ ~ctxGraphDocumentFormat()

virtual ctxGraphDocumentFormat::~ctxGraphDocumentFormat ( )
virtual

References CTX_EXPORT.

Member Function Documentation

◆ preflight()

virtual gzBool ctxGraphDocumentFormat::preflight ( const ctxGraphDocument & document,
gzBool embedParameters,
gzString & error ) const
pure virtual

◆ preflightJsonRecords()

gzBool ctxGraphDocumentFormat::preflightJsonRecords ( const ctxGraphDocument & document,
gzBool embedParameters,
gzString & error )
staticprotected

Checks the supported native definition/snapshot and exact streamed size without I/O.

References CTX_EXPORT.

◆ preflightXmlRecords()

gzBool ctxGraphDocumentFormat::preflightXmlRecords ( const ctxGraphDocument & document,
gzBool embedParameters,
gzString & error )
staticprotected

Checks native XML document-v1 support and complete streamed size without target I/O.

References CTX_EXPORT.

◆ read()

virtual gzBool ctxGraphDocumentFormat::read ( gzSerializeAdapter * adapter,
ctxGraphDocument & document,
gzString & error )
pure virtual

◆ readJsonDocument()

gzBool ctxGraphDocumentFormat::readJsonDocument ( gzSerializeAdapter * adapter,
ctxGraphDocument & document,
gzString & error )
staticprotected

Reads the supported complete native JSON document through SDK framing.

Validates graph, origin domains and snapshot coverage before publication. No model is built or initialized; failure preserves the caller's document. The Core JSON profile delegates here; the borrowed adapter is never flushed/closed.

References CTX_EXPORT.

◆ readJsonRecords()

gzBool ctxGraphDocumentFormat::readJsonRecords ( gzSerializeAdapter * adapter,
ctxGraphDocumentJsonValidator validator,
gzDynamicType & records,
gzString & error )
staticprotected

Reads finite SDK JSON array/string records, then checks their complete wire.

The required validator must reject unknown/duplicate fields and invalid typed leaves in the original tree. All wire strings must be non-whitespace ASCII, without quotes/backslashes, at most 16384 bytes; encode user text separately. Raw input is limited to 128 MiB. Only outside-string SP/TAB/CR/LF may differ from SDK output; alternate escape spellings are deliberately not accepted. Failure preserves records; the borrowed adapter is never flushed or closed.

References CTX_EXPORT.

◆ readXmlDocument()

gzBool ctxGraphDocumentFormat::readXmlDocument ( gzSerializeAdapter * adapter,
ctxGraphDocument & document,
gzString & error )
staticprotected

Reads native XML document-v1 records with SDK syntax and shared semantic validation.

Rejects DTDs, processing instructions, functions and registered custom element types. SDK XML type registrations must remain unchanged throughout the call. Failure preserves the document; the borrowed adapter is never flushed or closed.

References CTX_EXPORT.

◆ useDeepCopy()

virtual gzBool ctxGraphDocumentFormat::useDeepCopy ( )
overridevirtual

References CTX_EXPORT.

◆ write()

virtual gzBool ctxGraphDocumentFormat::write ( const ctxGraphDocument & document,
gzSerializeAdapter * adapter,
gzBool embedParameters,
gzString & error )
pure virtual

◆ writeJsonRecords()

gzBool ctxGraphDocumentFormat::writeJsonRecords ( const ctxGraphDocument & document,
gzSerializeAdapter * adapter,
gzBool embedParameters,
gzString & error )
staticprotected

Streams native document-v1 records after complete preflight and a counting pass.

Requires an existing snapshot when embedding; never captures or initializes. The borrowed adapter is not flushed/closed; a write failure may consume output. The Core JSON profile delegates here; this helper does not install profiles.

References CTX_EXPORT.

◆ writeXmlRecords()

gzBool ctxGraphDocumentFormat::writeXmlRecords ( const ctxGraphDocument & document,
gzSerializeAdapter * adapter,
gzBool embedParameters,
gzString & error )
staticprotected

Streams a native XML document with wrapper-specific lossless text and exact values.

Shares the graph-definition writer without changing standalone XML7 output. Requires an existing snapshot when embedding; never captures or initializes. The Core XML profile delegates here; the borrowed adapter is not flushed or closed.

References CTX_EXPORT.


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