![]() |
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 <vrvCore/vrvCore.h> 00015 #include <vrvUtil/DtUnicode.h> 00016 #include <vector> 00017 #include <boost/unordered_map.hpp> 00018 00019 namespace makVrv 00020 { 00022 class DT_DLL_VRVCORE DtVisualizerSchema 00023 { 00024 public: 00025 00026 struct DT_DLL_VRVCORE Parameter 00027 { 00029 Parameter(); 00030 00032 Parameter(const std::string& typeInfoName, 00033 const std::string& name, 00034 const DtUnicode& screenName, 00035 const DtUnicode& desc, 00036 bool required); 00037 00038 std::string myVisualizerAttributeTypeInfoName; 00039 std::string myName; 00040 DtUnicode myScreenName; 00041 DtUnicode myDescription; 00042 bool myRequired; 00043 std::vector<DtUnicode> myEnumerationValues; 00044 }; 00045 00046 00047 typedef boost::unordered_map<std::string, 00048 Parameter> SchemaParameters; 00049 00053 DtVisualizerSchema(const std::string& name, 00054 const DtUnicode& humanReadableText, bool empty = false); 00055 00057 DtVisualizerSchema(const DtVisualizerSchema& rhs); 00058 00060 ~DtVisualizerSchema(); 00061 00063 const std::string& name() const; 00064 00066 const DtUnicode& screenName() const; 00067 00069 void addParameter(const Parameter& param); 00070 00072 void removeParameter(const std::string& name); 00073 00075 Parameter* findParameter(const std::string& name); 00076 00078 const Parameter* findParameter(const std::string& name) const; 00079 00081 const SchemaParameters& parameters() const; 00082 00083 protected: 00084 std::string myName; 00085 DtUnicode myScreenName; 00086 SchemaParameters myParameters; 00087 }; 00088 } 00089