Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkShaderProperty.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef __MITKSHADERENUMPROPERTY_H
18 #define __MITKSHADERENUMPROPERTY_H
19 
21 
22 namespace mitk
23 {
24 #ifdef _MSC_VER
25 #pragma warning(push)
26 #pragma warning(disable : 4522)
27 #endif
28 
33  {
34  public:
35  class Element
36  {
37  public:
38  std::string name;
39  };
40 
42 
43  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
44 
46 
47  mitkNewMacro1Param(ShaderProperty, const std::string &);
48 
53  IdType GetShaderId();
54  std::string GetShaderName();
55  void SetShader(const IdType &i);
56  void SetShader(const std::string &i);
57 
58  using BaseProperty::operator=;
59 
60  protected:
61  std::list<Element> shaderList;
62 
66  ShaderProperty();
67 
68  ShaderProperty(const ShaderProperty &other);
69 
75  ShaderProperty(const IdType &value);
76 
82  ShaderProperty(const std::string &value);
83 
88  bool AddEnum(const std::string &name, const IdType &id = 0) override;
89 
94  void AddShaderTypes();
95 
96  private:
97  // purposely not implemented
98  ShaderProperty &operator=(const ShaderProperty &);
99 
100  virtual itk::LightObject::Pointer InternalClone() const override;
101 
102  virtual bool Assign(const BaseProperty &property) override;
103  };
104 
105 #ifdef _MSC_VER
106 #pragma warning(pop)
107 #endif
108 
109 } // end of namespace mitk
110 
111 #endif //_MITK_VTK_SCALARMODE_PROPERTY__H_
#define MITKCORE_EXPORT
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44