53 #ifndef vtkSMRangeDomainTemplate_h 54 #define vtkSMRangeDomainTemplate_h 56 #include "vtkPVServerManagerCoreModule.h" 66 void PrintSelf(ostream& os, vtkIndent indent);
87 T GetMinimum(
unsigned int idx,
int& exists);
94 T GetMaximum(
unsigned int idx,
int& exists);
100 bool GetMinimumExists(
unsigned int idx);
101 bool GetMaximumExists(
unsigned int idx);
112 return this->GetMinimum(idx, not_used);
117 return this->GetMaximum(idx, not_used);
126 unsigned int GetNumberOfEntries();
173 this->Value[0] = this->Value[1] = 0;
174 this->Valid[0] = this->Valid[1] =
false;
176 vtkEntry(T min,
bool minValid, T max,
bool maxValid)
178 this->Value[0] = min;
179 this->Value[1] = max;
180 this->Valid[0] = minValid;
181 this->Valid[1] = maxValid;
185 this->Value[0] = min;
186 this->Value[1] = max;
187 this->Valid[0] = this->Valid[1] =
true;
192 return this->Valid == other.
Valid && this->Value == other.
Value;
198 const std::vector<vtkEntry>&
GetEntries()
const {
return this->Entries; }
201 typedef typename std::vector<vtkEntry>::const_iterator cit;
202 cit b = this->Entries.begin();
203 cit e = this->Entries.end();
204 if (this->Entries.size() != new_value.size() || !std::equal(b, e, new_value.begin()))
206 this->Entries = new_value;
207 this->DomainModified();
217 bool GetComputedDefaultValue(
unsigned int index, T& value);
219 std::vector<vtkEntry> Entries;
222 #if !defined(VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION) 223 #define VTK_SM_RANGE_DOMAIN_TEMPLATE_INSTANTIATE(T) \ 224 template class VTKPVSERVERMANAGERCORE_EXPORT vtkSMRangeDomainTemplate<T> 226 #include "vtkSMRangeDomainTemplate.txx" 227 #define VTK_SM_RANGE_DOMAIN_TEMPLATE_INSTANTIATE(T) 228 #endif // !defined(VTK_NO_EXPLICIT_TEMPLATE_INSTANTIATION) 230 #endif // !defined(vtkSMRangeDomainTemplate_h) 235 #if defined(VTK_SM_RANGE_DOMAIN_TEMPLATE_TYPE) 236 #if defined(VTK_BUILD_SHARED_LIBS) && defined(_MSC_VER) 237 #pragma warning(push) 238 #pragma warning(disable : 4091) // warning C4091: 'extern ' : 240 #pragma warning(disable : 4231) // Compiler-specific extension warning. 246 #undef VTK_SM_RANGE_DOMAIN_TEMPLATE_TYPE superclass for type-specific range domains i.e.
virtual void SetAnimationValue(vtkSMProperty *, int vtkNotUsed(index), double vtkNotUsed(value))
Set the value of an element of a property from the animation editor.
virtual void Update(vtkSMProperty *requestingProperty)
Update self based on the "unchecked" values of all required properties.
virtual int IsInDomain(vtkSMProperty *property)=0
Is the (unchecked) value of the property in the domain? Overwritten by sub-classes.
superclass for all SM properties
T GetMaximum(unsigned int idx)
virtual int SetDefaultValues(vtkSMProperty *, bool vtkNotUsed(use_unchecked_values))
A vtkSMProperty is often defined with a default value in the XML itself.
represents the possible values a property can have
#define VTK_SM_RANGE_DOMAIN_TEMPLATE_INSTANTIATE(T)
virtual int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *elem)
Set the appropriate ivars from the xml element.
std::vector< DefaultModes > DefaultModeVector
bool operator==(const vtkEntry &other) const
vtkTuple< bool, 2 > Valid
DefaultModes DefaultDefaultMode
vtkEntry(T min, bool minValid, T max, bool maxValid)
const std::vector< vtkEntry > & GetEntries() const
void SetEntries(const std::vector< vtkEntry > &new_value)
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void PrintSelf(ostream &os, vtkIndent indent)
T GetMinimum(unsigned int idx)
Returns the minimum/maximum value, is exists, otherwise 0 is returned.