vtkSMProxyInternals.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMProxyInternals.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 vtkSMProxyInternals_h
17 #define vtkSMProxyInternals_h
18 
19 #include "vtkSMProperty.h" // for vtkSMProperty
20 #include "vtkSMPropertyGroup.h" // for vtkSMPropertyGroup
21 #include "vtkSMProxy.h" // for vtkSMProxy
22 #include "vtkSMProxyLink.h" // for vtkSMProxyLink
23 #include "vtkSmartPointer.h" // for vtkSmartPointer
24 #include "vtkWeakPointer.h" // for vtkWeakPointer
25 
26 #include <map> // for std::map
27 #include <string> // for std::string
28 #include <vector> // for std::vector
29 
30 //---------------------------------------------------------------------------
31 // Internal data structure for storing object IDs, server IDs and
32 // properties. Each property has associated attributes:
33 // * ModifiedFlag : has the property been modified since last update (push)
34 // * DoUpdate : should the property be updated (pushed) during UpdateVTKObjects
35 // * ObserverTag : the tag returned by AddObserver(). Used to remove the
36 // observer.
38 {
39  struct PropertyInfo
40  {
42  {
43  this->ModifiedFlag = 0;
44  this->ObserverTag = 0;
45  };
48  unsigned int ObserverTag;
49  };
50  // Note that the name of the property is the map key. That is the
51  // only place where name is stored
52  typedef std::map<std::string, PropertyInfo> PropertyInfoMap;
53  PropertyInfoMap Properties;
54 
55  // This vector keeps track of the order in which properties
56  // were added for the Property iterator
57  std::vector<std::string> PropertyNamesInOrder;
58 
59  std::vector<vtkSmartPointer<vtkSMPropertyGroup>> PropertyGroups;
60 
61  std::vector<int> ServerIDs;
62 
63  typedef std::map<std::string, vtkSmartPointer<vtkSMProxy>> ProxyMap;
64  ProxyMap SubProxies;
65 
67  {
69  : Property(prop)
70  , Proxy(prox){};
73  };
74  std::vector<ConnectionInfo> Consumers;
75  std::vector<ConnectionInfo> Producers;
76 
78  {
79  std::string SubProxyName;
80  std::string PropertyName;
81  };
82 
83  // Map for exposed properties. The key is the exposed property name,
84  // value is a ExposedPropertyInfo object which indicates the subproxy name
85  // and the property name in that subproxy.
86  typedef std::map<std::string, ExposedPropertyInfo> ExposedPropertyInfoMap;
87  ExposedPropertyInfoMap ExposedProperties;
88 
89  // Vector of vtkSMProxyLink for shared properties among subproxies.
90  typedef std::vector<vtkSmartPointer<vtkSMProxyLink>> SubProxyLinksType;
91  SubProxyLinksType SubProxyLinks;
92 
93  // Annotation map
94  typedef std::map<std::string, std::string> AnnotationMap;
95  AnnotationMap Annotations;
97 
98  // Setup default values
99  vtkSMProxyInternals() { this->EnableAnnotationPush = true; }
100 };
101 
102 #endif
103 
104 // VTK-HeaderTest-Exclude: vtkSMProxyInternals.h
std::map< std::string, ExposedPropertyInfo > ExposedPropertyInfoMap
vtkSmartPointer< vtkSMProperty > Property
std::vector< ConnectionInfo > Producers
std::vector< vtkSmartPointer< vtkSMProxyLink > > SubProxyLinksType
vtkWeakPointer< vtkSMProxy > Proxy
superclass for all SM properties
std::map< std::string, vtkSmartPointer< vtkSMProxy > > ProxyMap
std::vector< std::string > PropertyNamesInOrder
vtkWeakPointer< vtkSMProperty > Property
std::vector< vtkSmartPointer< vtkSMPropertyGroup > > PropertyGroups
SubProxyLinksType SubProxyLinks
std::map< std::string, PropertyInfo > PropertyInfoMap
std::vector< ConnectionInfo > Consumers
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
PropertyInfoMap Properties
std::vector< int > ServerIDs
ExposedPropertyInfoMap ExposedProperties
std::map< std::string, std::string > AnnotationMap
ConnectionInfo(vtkSMProperty *prop, vtkSMProxy *prox)