VR-Forces 4.0.4 Class Documentation
include/vrvGlStudioShared/DtSharedCockpitSettingsManager.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2012 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvGlStudioShared/DtGlStudioShared.h>
00013 
00014 #include <vrvUtil/DtVirtualBaseClass.h>
00015 #include <vrvVrl/DtSharedSimulationSettings.h>
00016 #include <vrvUtil/DtSignalConnectionManager.h>
00017 #include <vrvCore/DtSettingsChangeManager.h>
00018 
00019 namespace makVrv
00020 {
00021 
00022    class DtSettingsBackup;
00023 
00026    class DT_DLL_VRVGLSTUDIOSHARED DtSharedCockpitSettingsManager : public DtVirtualBaseClass
00027    {
00028    public:
00029 
00031       static DtSharedCockpitSettingsManager& instance(DtDe& de);
00032 
00034       virtual ~DtSharedCockpitSettingsManager();
00035 
00039       void loadDefaultMappings( DtEntityTypeMapper& mapper, bool useFactory );
00040 
00043       void saveDefaultMappings(const DtEntityTypeMapper& mapper);
00044 
00047       void loadMapFile(const std::string& filePath, DtEntityTypeMapper& mapper);
00048 
00051       void saveMapFile(const std::string& filePath, const DtEntityTypeMapper& mapper);
00052 
00054       void saveDefaultMappings();
00055 
00057       void loadDefaultMappings(bool useFactory);
00058 
00060       virtual void mapperChanged(const DtEntityTypeMapper&);
00061 
00063       virtual void backupMapper(DtEntityTypeMapper&);
00064 
00066       virtual void entityTypeMappingsRestored(const DtSettingsBackup*);
00067 
00070 
00072       void loadDefaultSettings( bool useOnlyFactorySettings );
00073 
00075       void saveDefaultSettings();
00076 
00078       void loadSettings( const std::string& filePath );
00079 
00081       void saveSettings( const std::string& filePath );
00082 
00084       void setAutoSave( bool b );
00085 
00087       bool autoSave() const;
00088 
00090 
00094 
00095       virtual void setCockpitsEnabled(bool enable);
00096       virtual void setSmoothingEnabled(bool enable);
00097       virtual void setSmoothingPeriod(float period);
00098 
00100 
00102       virtual void updateCockpitSettingsState();
00103 
00104    protected:
00105 
00107       virtual bool checkCockpitMapper( const std::string& node,
00108          DtSettingsChangeObject::UseType t );
00109 
00110    protected:
00111 
00113       DtSharedCockpitSettingsManager( DtDe& de );
00114 
00115    private:
00116 
00118       void initializeMappings();
00119 
00120    private:
00121 
00122       DtDe& myDe;
00123       bool  myAutoSaveFlag;
00124       DtSignalConnectionManager myConnections;
00125 
00126    };
00127 
00128 } //makVrv::

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)