![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2011 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: $ $Revision: $ $State: $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 #include <vrvCoreQt/vrvCoreQt.h> 00015 #include <vrvUtil/DtVirtualBaseClass.h> 00016 #include <boost/unordered_map.hpp> 00017 00018 class QWidget; 00019 00020 namespace makVrv 00021 { 00022 class DtVisualizerAttributeEditor; 00023 class DtVisualizerAttributeEditorInterface; 00024 class DtVisualizerAttributeEditorCreator; 00025 00027 class DT_DLL_VRVCOREQT DtVisualizerAttributeEditorFactory : 00028 public DtVirtualBaseClass 00029 { 00030 public: 00031 00033 static DtVisualizerAttributeEditorFactory& instance(DtDe&); 00034 00036 virtual ~DtVisualizerAttributeEditorFactory(); 00037 00039 virtual void registerVisualizerCreator( 00040 DtVisualizerAttributeEditorCreator* creator); 00041 00043 DtVisualizerAttributeEditor* createEditor(const std::string& attrName, 00044 const std::string& attrClassName, QWidget* parent) const; 00045 00046 protected: 00047 DtVisualizerAttributeEditorFactory(DtDe& de); 00048 00049 protected: 00050 //Maps from attribute type to creator map. 00051 typedef boost::unordered_map<std::string, 00052 DtVisualizerAttributeEditorCreator* > AttributeTypeToCreatorMap; 00053 00054 //Maps from attribute name to a map of type to creator. 00055 typedef boost::unordered_map<std::string, AttributeTypeToCreatorMap> 00056 AttributeNameToTypeCreatorMap; 00057 00058 DtDe& myDe; 00059 AttributeNameToTypeCreatorMap myCreatorMap; 00060 }; 00061 } 00062