VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtCigiSettingsBackup Class Reference

Backup class for CIGI Settings. More...

Inheritance diagram for makVrv::DtCigiSettingsBackup:
Inheritance graph
[legend]

Public Member Functions

 DtCigiSettingsBackup (makArchives::DtCigiSettingsRecord *, const std::string &name)
 
virtual ~DtCigiSettingsBackup ()
 
const
makArchives::DtCigiSettingsRecord
restoredCigiSettings () const
 
const
makArchives::DtCigiSettingsRecord
cigiSettings () const
 
void setCigiSettings (makArchives::DtCigiSettingsRecord *r)
 
- Public Member Functions inherited from makVrv::DtSettingsBackup
 DtSettingsBackup ()
 CTOR. More...
 
virtual ~DtSettingsBackup ()
 DTOR. More...
 
virtual bool createAndWriteToBackupFile (const std::ostringstream &str, const std::string &path)
 Creates a backup file on the specified path and writes to that backup file given the string stream which contains the stored buffer. More...
 
virtual bool createAndWriteToBackupFiles (const std::vector< std::ostringstream * > &str, const std::string &path, const std::vector< std::string > &fileNames)
 
const std::string & backupFile () const
 Get the name of the backup file. More...
 
virtual bool backupFileExists () const
 Returns true if the file can be restored from a local backup. More...
 
virtual bool backupDirExists () const
 Returns true if the file can be restored from a local backup directory. More...
 
virtual bool factoryFileExists () const
 Returns true if can be restored from factory. More...
 
virtual bool factoryDirExists () const
 Returns true if can be restored from factory directory. More...
 
virtual void backup ()
 Backs up settings to backup file. More...
 
virtual void backupByDir ()
 Backs up settings to backup directory. More...
 
virtual void deleteBackup ()
 If backup file exists, deletes it. More...
 
virtual void restore (bool fromFactory=false)
 Restore all. More...
 
virtual void getRestorableNames (NameList &names)
 Get the names of states restore will affect. More...
 
virtual void restore (bool fromFactory, bool selectedOnly)
 Restore the state, either from the backup (default) or from the factory. More...
 
virtual void restoreSelected (const DtSettingsBackup *)
 Called with the object that needs to be restored from. More...
 
virtual void writeDir (std::vector< std::ostringstream * > &outStreamVec, std::vector< std::string > &fileNames)
 Support for writing settings to files in a directory. More...
 
virtual void readIncremental (boost::archive::xml_iarchive &ar)
 Support for reading files from a directory by looping over files and incrementally adding their contents. More...
 
void setManagerDestroyed (bool b)
 If true, will not signal destroyed. More...
 
virtual void addRestoreWhenRestored (DtSettingsBackup *, const RestoreFlags &f=RestoreAll)
 Sets to restore the specified object when this object is restored. More...
 
const RestoreWhenRestoredrestoreWhenRestored () const
 
virtual void cancelRestoreWhenRestored (DtSettingsBackup *, const RestoreFlags &f=RestoreAll)
 Cancels that the specified object should be restored when this one is restored. More...
 
void setBackupsPath (const std::string &s)
 
const std::string & backupsPath () const
 
void setFactoryFile (const std::string &s)
 
const std::string & factoryFile () const
 
void setFactoryDir (const std::string &dir)
 
const std::string & factoryDir () const
 
void setBackupDir (const std::string &dir)
 
const std::string & backupDir () const
 
- Public Member Functions inherited from makVrv::DtBackupInterface
 DtBackupInterface ()
 Default CTOR. More...
 
virtual ~DtBackupInterface ()
 Default DTOR. More...
 

Protected Member Functions

virtual void restore (const DtSettingsBackup *from)
 DtSettingsBackup class implementation. More...
 
virtual std::string backupClassType () const
 Override to return the class name of this object. More...
 
virtual DtSettingsBackupcreate () const
 Returns a new empty class of type. More...
 
virtual void write (boost::archive::xml_oarchive &ar)
 Override to write to given stream. More...
 
virtual void read (boost::archive::xml_iarchive &ar)
 Override to read from given stream. More...
 
virtual std::string backupName () const
 Returns name to be placed in dialog when restoring settings. More...
 
- Protected Member Functions inherited from makVrv::DtSettingsBackup
virtual bool restore (bool fromFactory, std::vector< DtSettingsBackup * > &hasBeenRestored, bool selectedOnly)
 Restores from startup (false) or factory (true) file. More...
 

Protected Attributes

makArchives::DtCigiSettingsRecordmyCigiSettings
 
makArchives::DtCigiSettingsRecord myRestoredCigiSettings
 
std::string myName
 
- Protected Attributes inherited from makVrv::DtSettingsBackup
bool myManagerDestroyed
 
RestoreWhenRestored myRestoreWhenRestored
 
std::string myBackupFile
 
std::string myFactoryFile
 
std::string myBackupsPath
 
std::string myBackupDir
 
std::string myFactoryDir
 

Additional Inherited Members

- Public Types inherited from makVrv::DtSettingsBackup
enum  RestoreFlags { RestoreFromFactory = 0x00000001, RestoreFromLocal = 0x00000002, KeepRestoreFromLocal = 0x80000000, RestoreAll = RestoreFromFactory | RestoreFromLocal }
 
typedef std::map
< DtSettingsBackup *, int
RestoreWhenRestored
 
- Public Types inherited from makVrv::DtBackupInterface
typedef std::vector< std::string > NameList
 
- Public Attributes inherited from makVrv::DtSettingsBackup
boost::signalslib::signal
< void(const DtSettingsBackup *)> 
signal_destructing
 Called when destructing. More...
 
boost::signalslib::signal
< void(const DtSettingsBackup *)> 
signal_backupCleared
 
boost::signalslib::signal
< void(const DtSettingsBackup *)> 
signal_backedUp
 
boost::signalslib::signal
< void(const DtSettingsBackup *)> 
signal_restored
 
- Public Attributes inherited from makVrv::DtBackupInterface
boost::signalslib::signal
< void(DtBackupInterface *)> 
signal_backupFileChanged
 This signal should be emitted when the backup file is created, written to, or destroyed. More...
 

Detailed Description

Backup class for CIGI Settings.

Constructor & Destructor Documentation

makVrv::DtCigiSettingsBackup::DtCigiSettingsBackup ( makArchives::DtCigiSettingsRecord ,
const std::string &  name 
)
virtual makVrv::DtCigiSettingsBackup::~DtCigiSettingsBackup ( )
virtual

Member Function Documentation

const makArchives::DtCigiSettingsRecord& makVrv::DtCigiSettingsBackup::restoredCigiSettings ( ) const
inline
const makArchives::DtCigiSettingsRecord* makVrv::DtCigiSettingsBackup::cigiSettings ( ) const
inline
void makVrv::DtCigiSettingsBackup::setCigiSettings ( makArchives::DtCigiSettingsRecord r)
inline
virtual void makVrv::DtCigiSettingsBackup::restore ( const DtSettingsBackup from)
protectedvirtual

DtSettingsBackup class implementation.

Called with the object that needs to be restored from.

Implements makVrv::DtSettingsBackup.

virtual std::string makVrv::DtCigiSettingsBackup::backupClassType ( ) const
protectedvirtual

Override to return the class name of this object.

Will be used as a key to look itself up in the backup manager

Implements makVrv::DtSettingsBackup.

virtual DtSettingsBackup* makVrv::DtCigiSettingsBackup::create ( ) const
protectedvirtual

Returns a new empty class of type.

Will be called from restore() method to restore data into

Implements makVrv::DtSettingsBackup.

virtual void makVrv::DtCigiSettingsBackup::write ( boost::archive::xml_oarchive &  ar)
protectedvirtual

Override to write to given stream.

Implementation need not be more than oa << *this

Implements makVrv::DtSettingsBackup.

virtual void makVrv::DtCigiSettingsBackup::read ( boost::archive::xml_iarchive &  ar)
protectedvirtual

Override to read from given stream.

Implementation need not be more than ia >> *this

Implements makVrv::DtSettingsBackup.

virtual std::string makVrv::DtCigiSettingsBackup::backupName ( ) const
protectedvirtual

Returns name to be placed in dialog when restoring settings.

Reimplemented from makVrv::DtSettingsBackup.

Member Data Documentation

makArchives::DtCigiSettingsRecord* makVrv::DtCigiSettingsBackup::myCigiSettings
protected
makArchives::DtCigiSettingsRecord makVrv::DtCigiSettingsBackup::myRestoredCigiSettings
protected
std::string makVrv::DtCigiSettingsBackup::myName
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)