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

QtxResourceMgr.IniFormat Class Reference

Reader/writer for .ini resources files.

Inheritance diagram for QtxResourceMgr.IniFormat:
Inheritance graph

Public Member Functions

 IniFormat ()
 Constructor.
 ~IniFormat ()
 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 ini-file.
virtual bool save (const QString &, const QMap< QString, Section > &)
 Save resources to the ini-file.

Private Member Functions

bool load (const QString &, QMap< QString, Section > &, QSet< QString > &)
 Load resources from xml-file.

Constructor & Destructor Documentation

QtxResourceMgr.IniFormat::IniFormat ( )
QtxResourceMgr.IniFormat::~IniFormat ( )

Member Function Documentation

bool QtxResourceMgr.IniFormat::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.IniFormat::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().

bool QtxResourceMgr.IniFormat::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 or false on error

References IMapConstIterator< Key, Value >.key(), QtxResourceMgr.load(), QtxResourceMgr.option(), rx, 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