ALBA
|
#include <albaXMLStorage.h>
Public Types | |
enum | XML_IO_ERRORS { IO_XML_PARSE_ERROR =IO_LAST_ERROR , IO_DOM_XML_ERROR , IO_RESTORE_ERROR , IO_WRONG_FILE_TYPE , IO_WRONG_FILE_VERSION , IO_WRONG_URL , IO_XML_PARSER_INTERNAL_ERROR } |
Public Types inherited from albaStorage | |
enum | STORAGE_IO_ERRORS { IO_OK =0 , IO_GENERIC_ERROR , IO_WRONG_OBJECT_TYPE , IO_LAST_ERROR } |
Public Member Functions | |
albaTypeMacro (albaXMLStorage, albaStorage) | |
albaXMLStorage () | |
virtual | ~albaXMLStorage () |
mmuXMLDOM * | GetXMLDOM () |
void | SetFileType (const char *filetype) |
const char * | GetFileType () |
void | SetVersion (const char *version) |
const char * | GetVersion () |
const char * | GetDocumentVersion () |
virtual int | ResolveInputURL (const char *url, albaString &filename, albaObserver *observer=NULL) |
virtual int | StoreToURL (const char *filename, const char *url) |
virtual int | ReleaseURL (const char *url) |
virtual int | DeleteURL (const char *url) |
virtual int | OpenDirectory (const char *pathname) |
virtual void | SetURL (const char *name) |
virtual const char * | GetTmpFolder () |
virtual void | EmptyGarbageCollector () |
Public Member Functions inherited from albaStorage | |
albaAbstractTypeMacro (albaStorage, albaObject) | |
albaStorage () | |
virtual | ~albaStorage () |
virtual void | SetURL (const char *name) |
void | ForceParserURL () |
const char * | GetURL () |
const char * | GetPareserURL () |
int | Store () |
int | Restore () |
void | SetDocument (albaStorable *doc) |
albaStorable * | GetDocument () |
virtual int | ResolveInputURL (const char *url, albaString &filename, albaObserver *observer=NULL)=0 |
virtual int | StoreToURL (const char *filename, const char *url=NULL)=0 |
virtual int | ReleaseURL (const char *url)=0 |
virtual void | GetTmpFile (albaString &filename) |
void | ReleaseTmpFile (const char *filename) |
bool | IsFileInDirectory (const char *filename) |
virtual void | SetTmpFolder (const char *folder) |
virtual const char * | GetTmpFolder () |
void | SetErrorCode (int err) |
int | GetErrorCode () |
bool | NeedsUpgrade () |
Public Member Functions inherited from albaObject | |
albaObject () | |
virtual | ~albaObject () |
virtual void | Delete () |
virtual const char * | GetTypeName () const |
virtual bool | IsA (const char *type_name) const |
virtual bool | IsA (const albaTypeID &type_id) const |
virtual albaObject * | NewObjectInstance () const =0 |
virtual const albaTypeID & | GetTypeId () const |
virtual void | Print (std::ostream &os, const int indent=0) const |
albaObject (const albaObject &c) | |
Protected Member Functions | |
virtual int | InternalStore () |
virtual int | InternalRestore () |
virtual int | InternalStore ()=0 |
virtual int | InternalRestore ()=0 |
virtual int | OpenDirectory (const char *dir_name)=0 |
Protected Attributes | |
albaString | m_FileType |
albaString | m_Version |
albaString | m_DocumentVersion |
mmuXMLDOM * | m_DOM |
std::set< albaString > | m_GarbageCollector |
albaString | m_DefaultTmpFolder |
Protected Attributes inherited from albaStorage | |
bool | m_NeedsUpgrade |
albaStorable * | m_Document |
albaStorageElement * | m_DocumentElement |
albaString | m_URL |
albaString | m_ParserURL |
albaID | m_TmpFileId |
albaString | m_TmpFolder |
std::set< albaString > | m_TmpFileNames |
std::set< albaString > | m_FilesDictionary |
int | m_ErrorCode |
Protected Attributes inherited from albaObject | |
bool | m_HeapFlag |
Additional Inherited Members | |
Static Public Member Functions inherited from albaObject | |
static const char * | GetStaticTypeName () |
static bool | IsStaticType (const char *type_name) |
static bool | IsStaticType (const albaTypeID &type_id) |
static const albaTypeID & | GetStaticTypeId () |
static albaObject * | SafeDownCast (albaObject *o) |
Concrete implementation of Storage object using Xerces-C for storing in XML.
This is a concrete implementation of storage object for storing XML documents by means of Xerces-C library (http://xml.apache.org/xerces-c/). This class also defines a function to access to XML/Xerces-C specific objects, stored into a PIMPL class (mmuXMLDOM).
Definition at line 38 of file albaXMLStorage.h.
Enumerator | |
---|---|
IO_XML_PARSE_ERROR | |
IO_DOM_XML_ERROR | |
IO_RESTORE_ERROR | |
IO_WRONG_FILE_TYPE | |
IO_WRONG_FILE_VERSION | |
IO_WRONG_URL | |
IO_XML_PARSER_INTERNAL_ERROR |
Definition at line 43 of file albaXMLStorage.h.
albaXMLStorage::albaXMLStorage | ( | ) |
|
virtual |
albaXMLStorage::albaTypeMacro | ( | albaXMLStorage | , |
albaStorage | |||
) |
|
inline |
Return the instance of the DOM document used while reading and writing.
This object is created when Store/Restore starts and destroyed when stops.
Definition at line 51 of file albaXMLStorage.h.
void albaXMLStorage::SetFileType | ( | const char * | filetype | ) |
The TAG identifying the type (i.e.
format) of file. (e.g. "MSF")
const char * albaXMLStorage::GetFileType | ( | ) |
The TAG identifying the type (i.e.
format) of file. (e.g. "MSF")
void albaXMLStorage::SetVersion | ( | const char * | version | ) |
The version of the file format used type of file.
(default "1.1")
const char * albaXMLStorage::GetVersion | ( | ) |
The version of the file format used type of file.
(default "1.1")
const char * albaXMLStorage::GetDocumentVersion | ( | ) |
Return the version of the opened document.
|
virtual |
resolve an URL and provide local filename to be used as input
Implements albaStorage.
|
virtual |
resolve an URL and provide a local filename to be used as output
Implements albaStorage.
|
virtual |
|
virtual |
remove the file from URL
|
virtual |
populate the list of file in the directory
Implements albaStorage.
|
virtual |
Set the URL of the document to be read or written.
Reimplemented from albaStorage.
Reimplemented in albaVMEStorage.
|
virtual |
return the folder where tmp files are stored
Reimplemented from albaStorage.
|
virtual |
empty the garbage collector list deleting old files
|
protectedvirtual |
This is called by Store() and must be reimplemented by subclasses.
Implements albaStorage.
|
protectedvirtual |
This is called by Restore() and must be reimplemented by subclasses.
Implements albaStorage.
|
protected |
The type of file to be opened.
Definition at line 97 of file albaXMLStorage.h.
|
protected |
Current MSF version.
Definition at line 98 of file albaXMLStorage.h.
|
protected |
Open Document version.
Definition at line 99 of file albaXMLStorage.h.
|
protected |
PIMPL object storing XML objects' pointers.
Definition at line 100 of file albaXMLStorage.h.
|
protected |
collect URL to be released
Definition at line 101 of file albaXMLStorage.h.
|
protected |
used to store the current default tmp folder
Definition at line 102 of file albaXMLStorage.h.