Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

settings::XmlTreeBackend Class Reference

#include <settings.h>

Inheritance diagram for settings::XmlTreeBackend:

settings::TreeBackend

List of all members.


Detailed Description

The XmlTreeBackend class uses XML markup to store settings trees.

Note:
libxml2 and libxslt libraries used by the XmlTreeBackend are not fully reentrant. To "fix" this, the XmlTreeBackend backend serializes access to such non-reentrant parts using a global mutex so that only one thread can use non-reentrant code at a time. Currently, this relates to the rawRead() method (and to read() as a consequence). This means that only one thread can parse an XML stream at a time; other threads trying to parse same or different streams using different XmlTreeBackend and Input instances will have to wait.
Keep in mind that the above reentrancy fix does not imply thread-safety: it is still the caller's responsibility to provide serialization if the same XmlTreeBackend instnace (as well as instances of other classes from the settings namespace) needs to be used by more than one thread.

Definition at line 996 of file settings.h.


Public Types

enum  { Read_AddDefaults = RT_BIT (0) }

Public Member Functions

const char * oldVersion () const
void rawRead (xml::Input &aInput, const char *aSchema=NULL, int aFlags=0)
void rawWrite (xml::Output &aOutput)
void read (xml::Input &aInput, const char *aSchema=NULL, int aFlags=0)
void reset ()
void resetAutoConverter ()
void resetInputResolver ()
KeyrootKey () const
void setAutoConverter (AutoConverter &aConverter)
void setInputResolver (InputResolver &aResolver)
void write (xml::Output &aOutput)

Static Private Member Functions

static int CloseCallback (void *aCtxt)
static xmlParserInput * ExternalEntityLoader (const char *aURI, const char *aID, xmlParserCtxt *aCtxt)
static XmlKeyBackend * GetKeyBackend (const Key &aKey)
static int ReadCallback (void *aCtxt, char *aBuf, int aLen)
static void StructuredErrorCallback (void *aCtxt, xmlErrorPtr aErr)
static void ValidityErrorCallback (void *aCtxt, const char *aMsg,...)
static void ValidityWarningCallback (void *aCtxt, const char *aMsg,...)
static int WriteCallback (void *aCtxt, const char *aBuf, int aLen)

Private Attributes

std::auto_ptr< Data > m

Static Private Attributes

static XmlTreeBackendsThat = NULL

Classes

class  AutoConverter
struct  Data
class  EConversionCycle
class  InputResolver

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

Generated by  Doxygen 1.6.0   Back to index