|
Mp7Jrs
2.7.1
|
Mp7Jrs archive. More...
Public Member Functions | |
Constructors and Destructors | |
| Mp7JrsArchive (void) | |
| ~Mp7JrsArchive (void) | |
Get and Set Options | |
| void | SetEncoding (const char *encoding) |
| Set the encoding (UTF-8, UTF-16 ...) of XML document to be (de)serialized. | |
| void | SetEncoding (const XMLCh *encoding) |
| Set the encoding (UTF-8, UTF-16 ...) of XML document to be (de)serialized. | |
| char * | GetEncoding () |
| Get current encoding setting (UTF-8, UTF-16 ...) | |
| void | SetSchemaLocation (const char *namespaceURI, const char *prefix, const char *schemaLocation) |
| Set a schema location. | |
| void | SetSchemaLocation (const XMLCh *namespaceURI, const XMLCh *prefix, const XMLCh *schemaLocation) |
| Set a schema location. | |
| char * | GetSchemaLocation (const char *namespaceURI) |
| Get location of given schema. | |
| void | SetDefaultNamespace (const XMLCh *namespaceURI, const XMLCh *prefix) |
| Sets the default namespace. | |
| bool | GetDefaultNamespace (const XMLCh **namespaceURI, const XMLCh **prefix) |
| Gets the namespace's name and prefix of the default namespace. | |
| void | SetDoValidation (bool validate) |
| Set if validation shall be done. | |
| bool | GetDoValidation () |
| Get validation setting. | |
| void | SetFullSchemaChecking (bool fullSchema) |
| Set if full schema checking shall be done. | |
| bool | GetFullSchemaChecking () |
| Get full schema checking setting. | |
| void | SetPrettyFormatting (bool flag) |
| Set if pretty formatted (with line breaks) output is desired. | |
| bool | GetPrettyFormatting () |
| Get if pretty formatted output flag (using line breaks) is set. | |
| void | SetWriteXMLDecl (bool decl) |
| Set whether the XMLDecl header (version, encoding, standalone) shall be written. | |
| bool | GetWriteXMLDecl () |
| Get XMLDecl setting. | |
| void | SetForceNamespaceDeclaration (bool flag) |
| Set whether the namespace declarations should be written to the XML root node or not (default: true). | |
| bool | GetForceNamespaceDeclaration () |
| Get ForceNamespaceDeclaration setting. | |
| void | SetUsePrefixForDefaultNS (bool flag) |
| Set whether or not you want your elements of the default namespace be prefixed (Initially: false). | |
| bool | GetUsePrefixForDefaultNS () |
| Get whether or not you want your elements of the default namespace be prefixed with mpeg7 (Initially: false). | |
Friends | |
| class | XercesWrapper |
Serializing and Deserializing | |
| enum | HowToAdd { APPEND, INSERT, REPLACE } |
| Constants that describe how to add something to a collection. More... | |
| void | ToFile (const XMLCh *path, Mp7JrsNodePtr &node, XMLCh *nodeName=(XMLCh *) NULL, bool useTypeAttr=false) |
| Serializes to a file. | |
| void | ToFile (const char *path, Mp7JrsNodePtr &node, XMLCh *nodeName=(XMLCh *) NULL, bool useTypeAttr=false) |
| Serializes to a file. | |
| Mp7JrsNodePtr | FromFile (const XMLCh *path, Mp7JrsNodePtr &node) |
| Deserializes from file. | |
| Mp7JrsNodePtr | FromFile (const XMLCh *path) |
| Deserializes from file. | |
| Mp7JrsNodePtr | FromFile (const char *path, Mp7JrsNodePtr &node) |
| Deserializes from file. | |
| Mp7JrsNodePtr | FromFile (const char *path) |
| Deserializes from file. | |
| int | AddToCollectionFromFile (const XMLCh *path, Mp7JrsNodeCollectionPtr &collection, HowToAdd howtoadd, int where=-1) |
| Inserts a fragment from file into a collection. | |
| int | AddToCollectionFromBuffer (const XMLCh *buffer, Mp7JrsNodeCollectionPtr &collection, HowToAdd howtoadd, int where=-1) |
| Inserts a fragment from a buffer into a collection. | |
| int | AddToCollectionFromFile (const char *path, Mp7JrsNodeCollectionPtr &collection, HowToAdd howtoadd, int where=-1) |
| Inserts a fragment from file into a collection. | |
| int | AddToCollectionFromBuffer (const char *buffer, Mp7JrsNodeCollectionPtr &collection, HowToAdd howtoadd, int where=-1) |
| Inserts a fragment from a buffer into a collection. | |
| XMLCh * | ToWBuffer (Mp7JrsNodePtr &node, XMLCh *nodeName=(XMLCh *) NULL, bool useTypeAttr=false) |
| Serializes to a 16 bit Unicode (Xerces) buffer. | |
| char * | ToBuffer (Mp7JrsNodePtr &node, XMLCh *nodeName=(XMLCh *) NULL, bool useTypeAttr=false) |
| Serializes to a 8 bit (Xerces) buffer. | |
| Mp7JrsNodePtr | FromBuffer (const XMLCh *buf, Mp7JrsNodePtr &node) |
| Deserializes from a 16 bit Unicode buffer. | |
| Mp7JrsNodePtr | FromBuffer (const XMLCh *buf) |
| Deserializes from a 16 bit Unicode buffer. | |
| Mp7JrsNodePtr | FromBuffer (const char *buf, Mp7JrsNodePtr &node) |
| Deserializes from a 8 bit buffer. | |
| Mp7JrsNodePtr | FromBuffer (const char *buf) |
| Deserializes from a 8 bit buffer. | |
| void | ToStdOut (Mp7JrsNodePtr &node, XMLCh *nodeName=(XMLCh *) NULL, bool useTypeAttr=false) |
| Serializes to a console (stdout). | |
| void | DeleteBuffer (char **buffer) |
| Deletes a buffer created when serializing (on the Xerces heap). | |
| void | DeleteBuffer (XMLCh **buffer) |
| Deletes a buffer created when serializing (on the Xerces heap). | |
Mp7Jrs archive.
A class which handles (de)serializing of Mp7Jrs XML documents.
Constants that describe how to add something to a collection.
| int Mp7JrsArchive::AddToCollectionFromBuffer | ( | const XMLCh * | buffer, |
| Mp7JrsNodeCollectionPtr & | collection, | ||
| HowToAdd | howtoadd, | ||
| int | where = -1 |
||
| ) |
Inserts a fragment from a buffer into a collection.
| buffer | Buffer containing the MPEG-7 XML. |
| collection | Collection where the fragment is to be added. |
| howtoadd | how to add the fragment. |
| where | the index where the fragment is to be added. |
| int Mp7JrsArchive::AddToCollectionFromBuffer | ( | const char * | buffer, |
| Mp7JrsNodeCollectionPtr & | collection, | ||
| HowToAdd | howtoadd, | ||
| int | where = -1 |
||
| ) |
Inserts a fragment from a buffer into a collection.
| buffer | Buffer containing the MPEG-7 XML. |
| collection | Collection where the fragment is to be added. |
| howtoadd | how to add the fragment. |
| where | the index where the fragment is to be added. |
| int Mp7JrsArchive::AddToCollectionFromFile | ( | const XMLCh * | path, |
| Mp7JrsNodeCollectionPtr & | collection, | ||
| HowToAdd | howtoadd, | ||
| int | where = -1 |
||
| ) |
Inserts a fragment from file into a collection.
| path | Path and file name of the source file. |
| collection | Collection where the fragment is to be added. |
| howtoadd | how to add the fragment. |
| where | the index where the fragment is to be added. |
| int Mp7JrsArchive::AddToCollectionFromFile | ( | const char * | path, |
| Mp7JrsNodeCollectionPtr & | collection, | ||
| HowToAdd | howtoadd, | ||
| int | where = -1 |
||
| ) |
Inserts a fragment from file into a collection.
| path | Path and file name of the source file. |
| collection | Collection where the fragment is to be added. |
| howtoadd | how to add the fragment. |
| where | the index where the fragment is to be added. |
| void Mp7JrsArchive::DeleteBuffer | ( | char ** | buffer | ) |
Deletes a buffer created when serializing (on the Xerces heap).
Note: if you call this method with a pointer to your heap, the system becomes inconsitent.
| buffer | Buffer to be deleted. |
| void Mp7JrsArchive::DeleteBuffer | ( | XMLCh ** | buffer | ) |
Deletes a buffer created when serializing (on the Xerces heap).
Note: if you call this method with a pointer to your heap, the system becomes inconsitent.
| buffer | Buffer to be deleted. |
| Mp7JrsNodePtr Mp7JrsArchive::FromBuffer | ( | const XMLCh * | buf, |
| Mp7JrsNodePtr & | node | ||
| ) |
Deserializes from a 16 bit Unicode buffer.
| buf | Source buffer. |
| node | Node to be used as parent of the fragement to be deserialized. |
| Mp7JrsNodePtr Mp7JrsArchive::FromBuffer | ( | const XMLCh * | buf | ) |
Deserializes from a 16 bit Unicode buffer.
The root node of the fragment in the buffer will become the root node of the document.
| buf | Source buffer. |
| Mp7JrsNodePtr Mp7JrsArchive::FromBuffer | ( | const char * | buf, |
| Mp7JrsNodePtr & | node | ||
| ) |
Deserializes from a 8 bit buffer.
| buf | Source buffer. |
| node | Node to be used as parent of the fragement to be deserialized. |
| Mp7JrsNodePtr Mp7JrsArchive::FromBuffer | ( | const char * | buf | ) |
Deserializes from a 8 bit buffer.
The root node of the fragment in the buffer will become the root node of the document.
| buf | Source buffer. |
| Mp7JrsNodePtr Mp7JrsArchive::FromFile | ( | const XMLCh * | path, |
| Mp7JrsNodePtr & | node | ||
| ) |
Deserializes from file.
| path | Path and file name of the source file. |
| node | Node to be used as parent of the fragement to be deserialized. |
| Mp7JrsNodePtr Mp7JrsArchive::FromFile | ( | const XMLCh * | path | ) |
Deserializes from file.
The root node of the fragment in the file will become the root node of the document.
| path | Path and file name of the source file. |
| Mp7JrsNodePtr Mp7JrsArchive::FromFile | ( | const char * | path, |
| Mp7JrsNodePtr & | node | ||
| ) |
Deserializes from file.
| path | Path and file name of the source file. |
| node | Node to be used as parent of the fragement to be deserialized. |
| Mp7JrsNodePtr Mp7JrsArchive::FromFile | ( | const char * | path | ) |
Deserializes from file.
The root node of the fragment in the file will become the root node of the document.
| path | Path and file name of the source file. |
| bool Mp7JrsArchive::GetDefaultNamespace | ( | const XMLCh ** | namespaceURI, |
| const XMLCh ** | prefix | ||
| ) |
Gets the namespace's name and prefix of the default namespace.
| namespaceURI | Default namespace name |
| prefix | Default namespace prefix, if used, otherwise maybe null |
|
inline |
Get validation setting.
| void Mp7JrsArchive::SetDefaultNamespace | ( | const XMLCh * | namespaceURI, |
| const XMLCh * | prefix | ||
| ) |
Sets the default namespace.
If there is an existing entry it will be overwritten.
| namespaceURI | Namespace name |
| prefix | default namespace prefix, if used, otherwise maybe 0 |
|
inline |
Set if validation shall be done.
| validate | If true, validation will be done. |
|
inline |
Set the encoding (UTF-8, UTF-16 ...) of XML document to be (de)serialized.
| void Mp7JrsArchive::SetEncoding | ( | const XMLCh * | encoding | ) |
Set the encoding (UTF-8, UTF-16 ...) of XML document to be (de)serialized.
|
inline |
Set whether the namespace declarations should be written to the XML root node or not (default: true).
This is necessary to avoid xsi namespace declarations in case of an xsi:type all over the place.
| flag | If true, all namespaces are declared in the XML root node. |
|
inline |
Set if full schema checking shall be done.
| fullSchema | If true, full schema checking will be done. IMPORTANT NOTE: This will cause Xerces 2.2 to crash at large maxOccurs values. Do not use! |
|
inline |
Set a schema location.
| namespaceURI | URI of the schema namespace. |
| prefix | Namespace prefix of the schema. |
| schemaLocation | Local path and file name of the schema. |
| void Mp7JrsArchive::SetSchemaLocation | ( | const XMLCh * | namespaceURI, |
| const XMLCh * | prefix, | ||
| const XMLCh * | schemaLocation | ||
| ) |
Set a schema location.
| namespaceURI | URI of the schema namespace. |
| prefix | Namespace prefix of the schema. |
| schemaLocation | Local path and file name of the schema. |
|
inline |
Set whether or not you want your elements of the default namespace be prefixed (Initially: false).
| flag | If true, xmlns:mpeg7=urn:mpeg:mpeg7:schema:2004 is used instead of xmlns=urn:mpeg:mpeg7:schema:2004 |
|
inline |
Set whether the XMLDecl header (version, encoding, standalone) shall be written.
| decl | If true, the XMLDecl header will be written when serializing. |
| char * Mp7JrsArchive::ToBuffer | ( | Mp7JrsNodePtr & | node, |
| XMLCh * | nodeName = (XMLCh*)NULL, |
||
| bool | useTypeAttr = false |
||
| ) |
Serializes to a 8 bit (Xerces) buffer.
| node | Root node of the subtree to be serialized. |
| nodeName | Name of the root node (only necessary if a node of this type may have different names when used in different places of the schema). |
| useTypeAttr | Write the xsi:type attribute for all nodes in the subtree. |
DeleteBuffer() | void Mp7JrsArchive::ToFile | ( | const XMLCh * | path, |
| Mp7JrsNodePtr & | node, | ||
| XMLCh * | nodeName = (XMLCh*)NULL, |
||
| bool | useTypeAttr = false |
||
| ) |
Serializes to a file.
| path | Path and file name of the destination file. |
| node | Root node of the subtree to be serialized. |
| nodeName | Name of the root node (only necessary if a node of this type may have different names when used in different places of the schema). |
| useTypeAttr | Write the xsi:type attribute for all nodes in the subtree. |
| void Mp7JrsArchive::ToFile | ( | const char * | path, |
| Mp7JrsNodePtr & | node, | ||
| XMLCh * | nodeName = (XMLCh*)NULL, |
||
| bool | useTypeAttr = false |
||
| ) |
Serializes to a file.
| path | Path and file name of the destination file. |
| node | Root node of the subtree to be serialized. |
| nodeName | Name of the root node (only necessary if a node of this type may have different names when used in different places of the schema). |
| useTypeAttr | Write the xsi:type attribute for all nodes in the subtree. |
| void Mp7JrsArchive::ToStdOut | ( | Mp7JrsNodePtr & | node, |
| XMLCh * | nodeName = (XMLCh*)NULL, |
||
| bool | useTypeAttr = false |
||
| ) |
Serializes to a console (stdout).
| node | Root node of the subtree to be serialized. |
| nodeName | Name of the root node (only necessary if a node of this type may have different names when used in different places of the schema). |
| useTypeAttr | Write the xsi:type attribute for all nodes in the subtree. |
| XMLCh * Mp7JrsArchive::ToWBuffer | ( | Mp7JrsNodePtr & | node, |
| XMLCh * | nodeName = (XMLCh*)NULL, |
||
| bool | useTypeAttr = false |
||
| ) |
Serializes to a 16 bit Unicode (Xerces) buffer.
| node | Root node of the subtree to be serialized. |
| nodeName | Name of the root node (only necessary if a node of this type may have different names when used in different places of the schema). |
| useTypeAttr | Write the xsi:type attribute for all nodes in the subtree. |
DeleteBuffer()