00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00029 #ifndef __vtkSMEnumerationDomain_h
00030 #define __vtkSMEnumerationDomain_h
00031
00032 #include "vtkSMDomain.h"
00033
00034
00035 struct vtkSMEnumerationDomainInternals;
00036
00037
00038 class VTK_EXPORT vtkSMEnumerationDomain : public vtkSMDomain
00039 {
00040 public:
00041 static vtkSMEnumerationDomain* New();
00042 vtkTypeRevisionMacro(vtkSMEnumerationDomain, vtkSMDomain);
00043 void PrintSelf(ostream& os, vtkIndent indent);
00044
00048 virtual int IsInDomain(vtkSMProperty* property);
00049
00052 int IsInDomain(int val, unsigned int& idx);
00053
00055 unsigned int GetNumberOfEntries();
00056
00058 int GetEntryValue(unsigned int idx);
00059
00061 const char* GetEntryText(unsigned int idx);
00062
00064 void AddEntry(const char* text, int value);
00065
00067 void RemoveAllEntries();
00068
00069 protected:
00070 vtkSMEnumerationDomain();
00071 ~vtkSMEnumerationDomain();
00072
00075 virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element);
00076
00077 virtual void SaveState(const char* name, ostream* file, vtkIndent indent);
00078
00079 vtkSMEnumerationDomainInternals* EInternals;
00080
00081 private:
00082 vtkSMEnumerationDomain(const vtkSMEnumerationDomain&);
00083 void operator=(const vtkSMEnumerationDomain&);
00084 };
00085
00086 #endif