![]() |
Public API Reference |
Representation of a document containing a hierarchical structure of nodes. More...
#include <iutil/document.h>
Public Member Functions | |
| virtual int | Changeable ()=0 |
| Returns how far this document can be changed. | |
| virtual void | Clear ()=0 |
| Clear the document. | |
| virtual csRef< iDocumentNode > | CreateRoot ()=0 |
| Create a root node. This will clear the previous root node if any. | |
| virtual csRef< iDocumentNode > | GetRoot ()=0 |
| Get the current root node. | |
| virtual const char * | Parse (iFile *file, bool collapse=false)=0 |
| Parse document file from an iFile. | |
| virtual const char * | Parse (iDataBuffer *buf, bool collapse=false)=0 |
| Parse document file from an iDataBuffer. | |
| virtual const char * | Parse (iString *str, bool collapse=false)=0 |
| Parse document file from an iString. | |
| virtual const char * | Parse (const char *buf, bool collapse=false)=0 |
| Parse document file from a null-terminated C-string. | |
| virtual const char * | Write (iFile *file)=0 |
| Write out document file to an iFile. | |
| virtual const char * | Write (iString *str)=0 |
| Write out document file to an iString. | |
| virtual const char * | Write (iVFS *vfs, const char *filename)=0 |
| Write out document file to a VFS file. | |
Representation of a document containing a hierarchical structure of nodes.
Main creators of instances implementing this interface:
Definition at line 338 of file document.h.
| virtual int iDocument::Changeable | ( | ) | [pure virtual] |
Returns how far this document can be changed.
| virtual void iDocument::Clear | ( | ) | [pure virtual] |
Clear the document.
| virtual csRef<iDocumentNode> iDocument::CreateRoot | ( | ) | [pure virtual] |
Create a root node. This will clear the previous root node if any.
| virtual csRef<iDocumentNode> iDocument::GetRoot | ( | ) | [pure virtual] |
Get the current root node.
| virtual const char* iDocument::Parse | ( | iFile * | file, |
| bool | collapse = false |
||
| ) | [pure virtual] |
Parse document file from an iFile.
| file | The file to parse. It should contain data in whatever format is understood by the iDocument implementation receiving this invocation. |
| collapse | Document format implementations have the option of condensing extraneous whitespace in returned CS_NODE_TEXT nodes. Set this to true to enable this option. By default, whitepsace is preserved. |
| virtual const char* iDocument::Parse | ( | iDataBuffer * | buf, |
| bool | collapse = false |
||
| ) | [pure virtual] |
Parse document file from an iDataBuffer.
| buf | The buffer to parse. It should contain data in whatever format is understood by the iDocument implementation receiving this invocation. |
| collapse | Document format implementations have the option of condensing extraneous whitespace in returned CS_NODE_TEXT nodes. Set this to true to enable this option. By default, whitepsace is preserved. |
| virtual const char* iDocument::Parse | ( | iString * | str, |
| bool | collapse = false |
||
| ) | [pure virtual] |
Parse document file from an iString.
| str | The string to parse. It should contain data in whatever format is understood by the iDocument implementation receiving this invocation. |
| collapse | Document format implementations have the option of condensing extraneous whitespace in returned CS_NODE_TEXT nodes. Set this to true to enable this option. By default, whitepsace is preserved. |
| virtual const char* iDocument::Parse | ( | const char * | buf, |
| bool | collapse = false |
||
| ) | [pure virtual] |
Parse document file from a null-terminated C-string.
| buf | The buffer to parse. It should contain data in whatever format is understood by the iDocument implementation receiving this invocation. |
| collapse | Document format implementations have the option of condensing extraneous whitespace in returned CS_NODE_TEXT nodes. Set this to true to enable this option. By default, whitepsace is preserved. |
| virtual const char* iDocument::Write | ( | iFile * | file | ) | [pure virtual] |
Write out document file to an iFile.
This will return 0 if all is ok. Otherwise it will return an error string.
| virtual const char* iDocument::Write | ( | iString * | str | ) | [pure virtual] |
Write out document file to an iString.
This will return 0 if all is ok. Otherwise it will return an error string.
| virtual const char* iDocument::Write | ( | iVFS * | vfs, |
| const char * | filename | ||
| ) | [pure virtual] |
Write out document file to a VFS file.
This will return 0 if all is ok. Otherwise it will return an error string.