VR-Forces 4.7 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::DtModelDefinitionManagerBackup Class Reference

DtModelDefinitionManagerBackup is the settings backup object for DtModelDefinitions. More...

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

Public Member Functions

 DtModelDefinitionManagerBackup (DtModelDefinitionManager &manager, DtDe &de)
virtual ~DtModelDefinitionManagerBackup ()
- Public Member Functions inherited from makVrv::DtSettingsBackup
 DtSettingsBackup ()
 CTOR.
virtual ~DtSettingsBackup ()
 DTOR.
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.
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.
virtual bool backupFileExists () const
 Returns true if the file can be restored from a local backup.
virtual bool backupDirExists () const
 Returns true if the file can be restored from a local backup directory.
virtual bool factoryFileExists () const
 Returns true if can be restored from factory.
virtual bool factoryDirExists () const
 Returns true if can be restored from factory directory.
virtual void backup ()
 Backs up settings to backup file.
virtual void backupByDir ()
 Backs up settings to backup directory.
virtual void deleteBackup ()
 If backup file exists, deletes it.
virtual void restore (bool fromFactory=false)
 Restore all.
virtual void getRestorableNames (NameList &names)
 Get the names of states restore will affect.
virtual void restore (bool fromFactory, bool selectedOnly)
 Restore the state, either from the backup (default) or from the factory.
virtual void restoreSelected (const DtSettingsBackup *)
 Called with the object that needs to be restored from.
virtual void writeDir (std::vector< std::ostringstream * > &outStreamVec, std::vector< std::string > &fileNames)
 Support for writing settings to files in a directory.
void setManagerDestroyed (bool b)
 If true, will not signal destroyed.
virtual void addRestoreWhenRestored (DtSettingsBackup *, const RestoreFlags &f=RestoreAll)
 Sets to restore the specified object when this object is restored.
const RestoreWhenRestoredrestoreWhenRestored () const
virtual void cancelRestoreWhenRestored (DtSettingsBackup *, const RestoreFlags &f=RestoreAll)
 Cancels that the specified object should be restored when this one is restored.
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.
virtual ~DtBackupInterface ()
 Default DTOR.

Protected Member Functions

virtual void restore (const DtSettingsBackup *from)
 DtSettingsBackup class implementation.
virtual std::string backupClassType () const
 Override to return the class name of this object.
virtual std::string backupName () const
 Returns a more readable backup name (for dialogs).
virtual DtSettingsBackupcreate () const
 Returns a new empty class of type.
virtual void write (boost::archive::xml_oarchive &ar)
 Override to write to given stream.
virtual void read (boost::archive::xml_iarchive &ar)
 Override to read from given stream.
virtual void readIncremental (boost::archive::xml_iarchive &ar)
 Override to read from given stream.
const DtModelDefinitionManagerrestoredManager () const
- 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.

Protected Attributes

DtModelDefinitionManagermySourceManager
DtDemyDe
DtModelDefinitionManagermyRestoredManager
- 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 Attributes inherited from makVrv::DtSettingsBackup
boost::signal< void(const
DtSettingsBackup *)> 
signal_destructing
 Called when destructing.
boost::signal< void(const
DtSettingsBackup *)> 
signal_backupCleared
boost::signal< void(const
DtSettingsBackup *)> 
signal_backedUp
boost::signal< void(const
DtSettingsBackup *)> 
signal_restored

Detailed Description

DtModelDefinitionManagerBackup is the settings backup object for DtModelDefinitions.

Constructor & Destructor Documentation

makVrv::DtModelDefinitionManagerBackup::DtModelDefinitionManagerBackup ( DtModelDefinitionManager manager,
DtDe de 
)
virtual makVrv::DtModelDefinitionManagerBackup::~DtModelDefinitionManagerBackup ( )
virtual

Member Function Documentation

virtual void makVrv::DtModelDefinitionManagerBackup::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::DtModelDefinitionManagerBackup::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 std::string makVrv::DtModelDefinitionManagerBackup::backupName ( ) const
protectedvirtual

Returns a more readable backup name (for dialogs).

Will return backupClassType by default

Reimplemented from makVrv::DtSettingsBackup.

virtual DtSettingsBackup* makVrv::DtModelDefinitionManagerBackup::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::DtModelDefinitionManagerBackup::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::DtModelDefinitionManagerBackup::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 void makVrv::DtModelDefinitionManagerBackup::readIncremental ( boost::archive::xml_iarchive &  ar)
protectedvirtual

Override to read from given stream.

Implementation need not be more than ia >> *this

Reimplemented from makVrv::DtSettingsBackup.

const DtModelDefinitionManager* makVrv::DtModelDefinitionManagerBackup::restoredManager ( ) const
inlineprotected

Member Data Documentation

DtModelDefinitionManager& makVrv::DtModelDefinitionManagerBackup::mySourceManager
protected
DtDe& makVrv::DtModelDefinitionManagerBackup::myDe
protected
DtModelDefinitionManager* makVrv::DtModelDefinitionManagerBackup::myRestoredManager
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)