ParaView
vtkSMPropertyGroup.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMPropertyGroup.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 #ifndef vtkSMPropertyGroup_h
17 #define vtkSMPropertyGroup_h
18 
19 #include "vtkPVServerManagerCoreModule.h" //needed for exports
20 #include "vtkSMObject.h"
21 
22 class vtkPVXMLElement;
23 class vtkSMDocumentation;
24 class vtkSMProperty;
25 class vtkSMPropertyGroupInternals;
26 class vtkSMProxy;
27 
28 class VTKPVSERVERMANAGERCORE_EXPORT vtkSMPropertyGroup : public vtkSMObject
29 {
30 public:
31  static vtkSMPropertyGroup* New();
32  vtkTypeMacro(vtkSMPropertyGroup, vtkSMObject) void PrintSelf(ostream& os, vtkIndent indent);
33 
34  // Description:
35  // Sets the name of the property group to \p name.
36  vtkSetStringMacro(Name)
37 
38  // Description:
39  // Returns the name of the property group.
40  vtkGetStringMacro(Name)
41 
42  // Description:
43  // Sets the name of the property group to \p name.
44  vtkSetStringMacro(XMLLabel)
45 
46  // Description:
47  // Returns the name of the property group.
48  vtkGetStringMacro(XMLLabel)
49 
50  // Description:
51  // Sets the name of the panel widget to use for the property group.
52  vtkSetStringMacro(PanelWidget)
53 
54  // Description:
55  // Gets the name of the panel widget to use for the property group.
56  vtkGetStringMacro(PanelWidget)
57 
58  // Description:
59  // Sets the panel visibility for the property group.
60  //
61  // \see vtkSMProperty::SetPanelVisibility()
62  vtkSetStringMacro(PanelVisibility)
63 
64  // Description:
65  // Returns the panel visibility for the property group.
66  vtkGetStringMacro(PanelVisibility)
67 
68  // Description:
69  // Returns true if the property group contains zero properties.
70  bool IsEmpty() const;
71 
72  // Description:
73  // Adds \p property to the group. function can be NULL.
74  void AddProperty(const char* function, vtkSMProperty* property);
75 
76  // Description:
77  // Returns the property at \p index.
78  vtkSMProperty* GetProperty(unsigned int index) const;
79 
80  // Description:
81  // Returns the property associated with a given function, if any.
82  vtkSMProperty* GetProperty(const char* function) const;
83 
84  // Description:
85  // Given property in the group, returns its function. Will return NULL if the
86  // property is not present in this group.
87  const char* GetFunction(vtkSMProperty* property) const;
88 
89  // Description:
90  // Returns the number of properties in the group.
91  unsigned int GetNumberOfProperties() const;
92 
93  // Description:
94  // Returns the documentation for this proxy.
95  vtkGetObjectMacro(Documentation, vtkSMDocumentation);
96 
97  // Description:
98  // The server manager configuration XML may define <Hints /> element for
99  // a property. Hints are metadata associated with the property. The
100  // Server Manager does not (and should not) interpret the hints. Hints
101  // provide a mechanism to add GUI pertinant information to the server
102  // manager XML. Returns the XML element for the hints associated with
103  // this property, if any, otherwise returns NULL.
104  vtkGetObjectMacro(Hints, vtkPVXMLElement);
105 
106 protected:
109 
110  friend class vtkSMProxy;
111  virtual int ReadXMLAttributes(vtkSMProxy* parent, vtkPVXMLElement* element);
112 
113  void SetHints(vtkPVXMLElement* hints);
115 
117 
118 private:
119  vtkSMPropertyGroup(const vtkSMPropertyGroup&) VTK_DELETE_FUNCTION;
120  void operator=(const vtkSMPropertyGroup&) VTK_DELETE_FUNCTION;
121 
122  char* Name;
123  char* XMLLabel;
124  char* PanelWidget;
125  char* PanelVisibility;
126 
127  vtkSMPropertyGroupInternals* const Internals;
128 };
129 
130 #endif
vtkPVXMLElement * Hints
void PrintSelf(ostream &os, vtkIndent indent)
virtual int ReadXMLAttributes(vtkSMSessionProxyManager *pm, vtkPVXMLElement *element)
Read attributes from an XML element.
superclass for all SM properties
void operator=(const vtkSMProxy &) VTK_DELETE_FUNCTION
vtkSMDocumentation * Documentation
superclass for most server manager classes
Definition: vtkSMObject.h:31
static vtkSMObject * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
class providing access to the documentation for a vtkSMProxy.
vtkSMProxyInternals * Internals
Definition: vtkSMProxy.h:934
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void SetHints(vtkPVXMLElement *hints)
char * XMLLabel
Definition: vtkSMProxy.h:891