00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00028 #ifndef __vtkSMDomain_h
00029 #define __vtkSMDomain_h
00030
00031 #include "vtkSMObject.h"
00032 #include "vtkClientServerID.h"
00033
00034 class vtkSMProperty;
00035 class vtkPVXMLElement;
00036
00037 struct vtkSMDomainInternals;
00038
00039
00040 class VTK_EXPORT vtkSMDomain : public vtkSMObject
00041 {
00042 public:
00043 vtkTypeRevisionMacro(vtkSMDomain, vtkSMObject);
00044 void PrintSelf(ostream& os, vtkIndent indent);
00045
00048 virtual int IsInDomain(vtkSMProperty* property) = 0;
00049
00052 virtual void Update(vtkSMProperty*) {this->InvokeModified();};
00053
00055 virtual void SetAnimationValue(vtkSMProperty*, int, double) {}
00056
00058
00060 vtkGetStringMacro(XMLName);
00062
00064 void AddRequiredProperty(vtkSMProperty *prop, const char *function);
00065
00066 protected:
00067 vtkSMDomain();
00068 ~vtkSMDomain();
00069
00070
00071 friend class vtkSMProperty;
00072
00073
00076 vtkSMProperty* GetRequiredProperty(const char* function);
00077
00079 void RemoveRequiredProperty(vtkSMProperty* prop);
00080
00083 virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* elem);
00084
00086
00090 vtkSetMacro(IsOptional, int);
00091 vtkGetMacro(IsOptional, int);
00092 int IsOptional;
00094
00095 char* XMLName;
00096
00098
00100 vtkSetStringMacro(XMLName);
00102
00103 vtkSMDomainInternals* Internals;
00104
00106 void InvokeModified();
00107
00108 private:
00109 vtkSMDomain(const vtkSMDomain&);
00110 void operator=(const vtkSMDomain&);
00111 };
00112
00113 #endif