Version: 6.3.1
Public Member Functions | Protected Member Functions | Private Member Functions

QtxResourceMgr.XmlFormat Class Reference

Reader/writer for .xml resources files.

Inheritance diagram for QtxResourceMgr.XmlFormat:
Inheritance graph

Public Member Functions

 XmlFormat ()
 Constructor.
 ~XmlFormat ()
 Destructor.
QString format () const
 Get the format name.
QStringList options () const
 Get options names.
QString option (const QString &) const
 Get the value of the option with specified name.
void setOption (const QString &, const QString &)
 Set the value of the option with specified name.
bool load (Resources *)
 Load resources from the resource file.
bool save (Resources *)
 Save resources to the resource file.

Protected Member Functions

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

Private Member Functions

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

Constructor & Destructor Documentation

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

Member Function Documentation

bool QtxResourceMgr.XmlFormat::load ( const QString &  fname,
QMap< QString, Section > &  secMap 
) [protected, virtual]
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::save ( const QString &  fname,
const QMap< QString, Section > &  secMap 
) [protected, virtual]
Parameters:
fnameresources file name
secMapresources map
Returns:
true on success and false on error

Implements QtxResourceMgr.Format.

References IMapConstIterator< Key, Value >.value().

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

References QtxResourceMgr.option().

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

References QtxResourceMgr.option().

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

References QtxResourceMgr.option().

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

References QtxResourceMgr.option().

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

References QtxResourceMgr.option().

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

References QtxResourceMgr.option().

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 IMapConstIterator< Key, Value >.key(), QtxResourceMgr.load(), and IMapConstIterator< Key, Value >.value().

QString QtxResourceMgr.Format::format ( ) const [inherited]
Returns:
format name
QStringList QtxResourceMgr.Format::options ( ) const [inherited]
Returns:
list of the format options
QString QtxResourceMgr.Format::option ( const QString &  opt) const [inherited]

If option doesn't exist then null QString is returned.

Parameters:
optoption name
Returns:
option value
void QtxResourceMgr.Format::setOption ( const QString &  opt,
const QString &  val 
) [inherited]
Parameters:
optoption name
valoption value
bool QtxResourceMgr.Format::load ( Resources res) [inherited]
Parameters:
resresources object
Returns:
true on success and false on error

References QtxResourceMgr.load(), QtxResourceMgr.Resources.myFileName, QtxResourceMgr.Resources.mySections, and QtxResourceMgr.sections().

bool QtxResourceMgr.Format::save ( Resources res) [inherited]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS