/usr/include/paraview/vtkSMDomain.h is in paraview-dev 4.0.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | /*=========================================================================
Program: ParaView
Module: vtkSMDomain.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkSMDomain - represents the possible values a property can have
// .SECTION Description
// vtkSMDomain is an abstract class that describes the "domain" of a
// a widget. A domain is a collection of possible values a property
// can have.
// Each domain can depend on one or more properties to compute it's
// values. This are called "required" properties and can be set in
// the XML configuration file.
// .SECTION See Also
// vtkSMProxyGroupDomain
#ifndef __vtkSMDomain_h
#define __vtkSMDomain_h
#include "vtkPVServerManagerCoreModule.h" //needed for exports
#include "vtkSMSessionObject.h"
#include "vtkClientServerID.h" // needed for saving animation in batch script
class vtkSMProperty;
class vtkSMProxyLocator;
class vtkPVXMLElement;
//BTX
struct vtkSMDomainInternals;
//ETX
class VTKPVSERVERMANAGERCORE_EXPORT vtkSMDomain : public vtkSMSessionObject
{
public:
vtkTypeMacro(vtkSMDomain, vtkSMSessionObject);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Is the (unchecked) value of the property in the domain? Overwritten by
// sub-classes.
virtual int IsInDomain(vtkSMProperty* property) = 0;
// Description:
// Update self based on the "unchecked" values of all required
// properties. Overwritten by sub-classes.
virtual void Update(vtkSMProperty*) {this->InvokeModified();};
// Description:
// Set the value of an element of a property from the animation editor.
virtual void SetAnimationValue(vtkSMProperty*, int, double) {}
// Description:
// A vtkSMProperty is often defined with a default value in the
// XML itself. However, many times, the default value must be determined
// at run time. To facilitate this, domains can override this method
// to compute and set the default value for the property.
// Note that unlike the compile-time default values, the
// application must explicitly call this method to initialize the
// property.
// Returns 1 if the domain updated the property.
// Default implementation does nothing.
virtual int SetDefaultValues(vtkSMProperty*) {return 0; };
// Description:
// Assigned by the XML parser. The name assigned in the XML
// configuration. Can be used to figure out the origin of the
// domain.
vtkGetStringMacro(XMLName);
// Description:
// Add a new required property to this domain.
void AddRequiredProperty(vtkSMProperty *prop, const char *function);
// Description:
// When the IsOptional flag is set, IsInDomain() always returns true.
// This is used by properties that use domains to provide information
// (a suggestion to the gui for example) as opposed to restrict their
// values.
vtkGetMacro(IsOptional, int);
protected:
vtkSMDomain();
~vtkSMDomain();
virtual void SaveState(vtkPVXMLElement* parent, const char* uid);
virtual void ChildSaveState(vtkPVXMLElement* propertyElement);
// Load the state of the domain from the XML.
virtual int LoadState(vtkPVXMLElement* vtkNotUsed(domainElement),
vtkSMProxyLocator* vtkNotUsed(loader)) { return 1; }
//BTX
friend class vtkSMProperty;
//ETX
// Description:
// Returns a given required property of the given function.
// Function is a string associated with the require property
// in the XML file.
vtkSMProperty* GetRequiredProperty(const char* function);
// Description:
// Remove the given property from the required properties list.
void RemoveRequiredProperty(vtkSMProperty* prop);
// Description:
// Set the appropriate ivars from the xml element. Should
// be overwritten by subclass if adding ivars.
virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* elem);
// Description:
// When the IsOptional flag is set, IsInDomain() always returns true.
// This is used by properties that use domains to provide information
// (a suggestion to the gui for example) as opposed to restrict their
// values.
vtkSetMacro(IsOptional, int);
int IsOptional;
char* XMLName;
// Description:
// Assigned by the XML parser. The name assigned in the XML
// configuration. Can be used to figure out the origin of the
// domain.
vtkSetStringMacro(XMLName);
vtkSMDomainInternals* Internals;
// Description:
// Invoked DomainModifiedEvent.
void InvokeModified();
// Description:
// Gets the number of required properties added.
unsigned int GetNumberOfRequiredProperties();
private:
vtkSMDomain(const vtkSMDomain&); // Not implemented
void operator=(const vtkSMDomain&); // Not implemented
};
#endif
|