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 "vtkClientServerStream.h"
20 #include "vtkSMProperty.h"
21 #include "vtkSMPropertyGroup.h"
22 #include "vtkSMProxy.h"
23 #include "vtkSMProxyLink.h"
24 #include "vtkSmartPointer.h"
25 #include "vtkWeakPointer.h"
26 
27 #include "vtkStdString.h"
28 #include <map>
29 #include <string>
30 #include <vector>
31 
32 //---------------------------------------------------------------------------
33 // Internal data structure for storing object IDs, server IDs and
34 // properties. Each property has associated attributes:
35 // * ModifiedFlag : has the property been modified since last update (push)
36 // * DoUpdate : should the property be updated (pushed) during UpdateVTKObjects
37 // * ObserverTag : the tag returned by AddObserver(). Used to remove the
38 // observer.
40 {
41  struct PropertyInfo
42  {
44  {
45  this->ModifiedFlag = 0;
46  this->ObserverTag = 0;
47  };
50  unsigned int ObserverTag;
51  };
52  // Note that the name of the property is the map key. That is the
53  // only place where name is stored
54  typedef std::map<vtkStdString, PropertyInfo> PropertyInfoMap;
56 
57  // This vector keeps track of the order in which properties
58  // were added for the Property iterator
59  std::vector<vtkStdString> PropertyNamesInOrder;
60 
61  std::vector<vtkSmartPointer<vtkSMPropertyGroup> > PropertyGroups;
62 
63  std::vector<int> ServerIDs;
64 
65  typedef std::map<vtkStdString, vtkSmartPointer<vtkSMProxy> > ProxyMap;
67 
69  {
71  : Property(prop)
72  , Proxy(prox){};
75  };
76  std::vector<ConnectionInfo> Consumers;
77  std::vector<ConnectionInfo> Producers;
78 
80  {
83  };
84 
85  // Map for exposed properties. The key is the exposed property name,
86  // value is a ExposedPropertyInfo object which indicates the subproxy name
87  // and the property name in that subproxy.
88  typedef std::map<vtkStdString, ExposedPropertyInfo> ExposedPropertyInfoMap;
90 
91  // Vector of vtkSMProxyLink for shared properties among subproxies.
92  typedef std::vector<vtkSmartPointer<vtkSMProxyLink> > SubProxyLinksType;
94 
95  // Annotation map
96  typedef std::map<std::string, std::string> AnnotationMap;
99 
100  // Setup default values
101  vtkSMProxyInternals() { this->EnableAnnotationPush = true; }
102 };
103 
104 #endif
105 
106 // VTK-HeaderTest-Exclude: vtkSMProxyInternals.h
std::map< vtkStdString, PropertyInfo > PropertyInfoMap
vtkSmartPointer< vtkSMProperty > Property
std::vector< ConnectionInfo > Producers
std::vector< vtkSmartPointer< vtkSMProxyLink > > SubProxyLinksType
std::vector< vtkStdString > PropertyNamesInOrder
vtkWeakPointer< vtkSMProxy > Proxy
superclass for all SM properties
std::map< vtkStdString, vtkSmartPointer< vtkSMProxy > > ProxyMap
std::map< vtkStdString, ExposedPropertyInfo > ExposedPropertyInfoMap
vtkWeakPointer< vtkSMProperty > Property
std::vector< vtkSmartPointer< vtkSMPropertyGroup > > PropertyGroups
SubProxyLinksType SubProxyLinks
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)