Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QtxResourceMgr::XmlFormat Class Reference

Reader/writer for .xml resources files. More...

Inheritance diagram for QtxResourceMgr::XmlFormat:
Inheritance graph

Public Member Functions

 XmlFormat ()
 Constructor. More...
 
 ~XmlFormat ()
 Destructor. More...
 
- Public Member Functions inherited from QtxResourceMgr::Format
 Format (const QString &)
 Constructor. More...
 
virtual ~Format ()
 Destructor. More...
 
QString format () const
 Get the format name. More...
 
QStringList options () const
 Get options names. More...
 
QString option (const QString &) const
 Get the value of the option with specified name. More...
 
void setOption (const QString &, const QString &)
 Set the value of the option with specified name. More...
 
bool load (Resources *)
 Load resources from the resource file. More...
 
bool save (Resources *)
 Save resources to the resource file. More...
 

Protected Member Functions

virtual bool load (const QString &, QMap< QString, Section > &)
 Load resources from xml-file. More...
 
virtual bool save (const QString &, const QMap< QString, Section > &)
 Save resources to the xml-file. More...
 

Private Member Functions

QString docTag () const
 Get document tag name. More...
 
QString sectionTag () const
 Get section tag name. More...
 
QString parameterTag () const
 Get parameter tag name. More...
 
QString importTag () const
 Get import tag name. More...
 
QString nameAttribute () const
 Get parameter tag's "name" attribute name. More...
 
QString valueAttribute () const
 Get parameter tag's "value" attribute name. More...
 
bool load (const QString &, QMap< QString, Section > &, QSet< QString > &)
 Load resources from xml-file. More...
 

Detailed Description

Constructor & Destructor Documentation

QtxResourceMgr::XmlFormat::XmlFormat ( )
QtxResourceMgr::XmlFormat::~XmlFormat ( )

Member Function Documentation

QString QtxResourceMgr::XmlFormat::docTag ( ) const
private
Returns
XML document tag name

References QtxResourceMgr::option().

QString QtxResourceMgr::XmlFormat::importTag ( ) const
private
Returns
XML import tag name

References QtxResourceMgr::option().

bool QtxResourceMgr::XmlFormat::load ( const QString &  fname,
QMap< QString, Section > &  secMap 
)
protectedvirtual
Parameters
fnameresources file name
secMapresources map to be filled in
Returns
true on success and false on error

Implements QtxResourceMgr::Format.

References QtxResourceMgr::load().

bool QtxResourceMgr::XmlFormat::load ( const QString &  fname,
QMap< QString, Section > &  secMap,
QSet< QString > &  importHistory 
)
private
Parameters
fnameresources file name
secMapresources map to be filled in
importHistorylist of already imported resources files (to prevent import loops)
Returns
true on success and false on error

References Qtx::Always, doc, IMapConstIterator< Key, Value >::key(), QtxResourceMgr::load(), Qtx::makeEnvVarSubst(), and IMapConstIterator< Key, Value >::value().

QString QtxResourceMgr::XmlFormat::nameAttribute ( ) const
private
Returns
XML parameter tag's "name" attribute name

References QtxResourceMgr::option().

QString QtxResourceMgr::XmlFormat::parameterTag ( ) const
private
Returns
XML parameter tag name

References QtxResourceMgr::option().

bool QtxResourceMgr::XmlFormat::save ( const QString &  fname,
const QMap< QString, Section > &  secMap 
)
protectedvirtual
Parameters
fnameresources file name
secMapresources map
Returns
true on success and false on error

Implements QtxResourceMgr::Format.

References doc, Qtx::mkDir(), and IMapConstIterator< Key, Value >::value().

QString QtxResourceMgr::XmlFormat::sectionTag ( ) const
private
Returns
XML section tag name

References QtxResourceMgr::option().

QString QtxResourceMgr::XmlFormat::valueAttribute ( ) const
private
Returns
XML parameter tag's "value" attribute name

References QtxResourceMgr::option().


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