VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtModelSetRealizationManager.h
Go to the documentation of this file.
00001 /****************************************************************************** 
00002 ** Copyright (c) 2009 MAK Technologies, Inc. 
00003 ** All rights reserved. 
00004 ******************************************************************************/ 
00005 /****************************************************************************** 
00006 ** $RCSfile: DtModelSetRealizationManager.h,v $ $Revision: 1.16 $ $State: Exp $ 
00007 ******************************************************************************/ 
00008  
00012  
00013 #ifndef DtModelSetRealizationManager_H_ 
00014 #define DtModelSetRealizationManager_H_ 
00015  
00016 #include <vrvCore/vrvCore.h> 
00017 
00018 #include <vrvUtil/DtVirtualBaseClass.h>
00019 
00020 #include <map>
00021 
00022 #include <boost/signal.hpp>
00023 
00024 
00025 namespace makArchives
00026 {
00027    class DtModelSetRealizationsRecord;
00028 }
00029 
00030 namespace makVrv 
00031 { 
00032    class DtDe;
00033    class DtModelSetRealizationManagerSignaler;
00034 
00039    class DT_DLL_VRVCORE DtModelSetRealizationManager 
00040    { 
00041    public:
00042       friend class DtModelSetRealizationManagerCreator;
00043       
00044       typedef std::map<int, bool> ModelSetRealizations;
00045       
00047       virtual ~DtModelSetRealizationManager();
00048       
00050       const ModelSetRealizations& modelSetRealizations() const;
00051          
00053       bool visualizeModelSet( int modelSet ) const;
00054          
00056       void setVisualizeModelSet( int modelset, bool visualize );
00057       
00059       bool loadModelSetRealizations( const std::string& filepath );
00060       
00061       bool saveModelSetRealizations( const std::string& filepath ) const;
00062       
00064       void saveAsDefaults();
00065       
00066       void loadDefaults();
00067       
00070       const std::string& name() const;
00071       
00073       void setName( const std::string& name );
00074 
00076       const std::string& extension() const;
00077       
00079       void setExtension( const std::string& extension );
00080 
00081       void setAutoSave(bool b);
00082 
00083       bool autoSave() const;      
00084       
00085       void setFromRecord( const makArchives::DtModelSetRealizationsRecord& record );
00086       
00087       void getRecord( makArchives::DtModelSetRealizationsRecord& record ) const;
00088       
00089    protected:
00090 
00092       DtModelSetRealizationManager(DtDe&);
00093       
00094       std::string defaultFilePath() const;
00095 
00096    protected:     
00097          
00098       DtDe& myDe;
00099       
00100       // Says which model sets can be used in what modes
00101       ModelSetRealizations myModelSetRealizations;
00102       
00103       DtModelSetRealizationManagerSignaler& mySignaler;
00104       bool myAutoSave;
00105       std::string myName;
00106       std::string myExtension;
00107    }; 
00108 
00111    class DT_DLL_VRVCORE DtModelSetRealizationManagerSignaler : public DtVirtualBaseClass
00112    {
00113    public:
00114 
00116       static DtModelSetRealizationManagerSignaler& instance(DtDe& de);
00117 
00119       virtual ~DtModelSetRealizationManagerSignaler();
00120       
00122       boost::signal<void (int, bool)> signal_modelSetVisualized;
00123 
00124    protected:
00125       DtModelSetRealizationManagerSignaler();
00126 
00127    };
00128 
00129 
00132    class DT_DLL_VRVCORE DtModelSetRealizationManagerCreator : public DtVirtualBaseClass
00133    {
00134    public:
00136       DtModelSetRealizationManagerCreator();
00137 
00139       virtual ~DtModelSetRealizationManagerCreator();
00140 
00144       static DtModelSetRealizationManagerCreator& instance(DtDe& de);
00145 
00147       virtual DtModelSetRealizationManager* create(DtDe&);
00148    };
00149 }
00150 #endif 

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)