00001 /*========================================================================= 00002 00003 Program: ParaView 00004 Module: $RCSfile: vtkSMProxyInternals.h,v $ 00005 00006 Copyright (c) Kitware, Inc. 00007 All rights reserved. 00008 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00016 #ifndef __vtkSMProxyInternals_h 00017 #define __vtkSMProxyInternals_h 00018 00019 #include "vtkClientServerStream.h" 00020 #include "vtkSMProperty.h" 00021 #include "vtkSMProxy.h" 00022 #include "vtkSmartPointer.h" 00023 00024 #include <vtkstd/map> 00025 #include <vtkstd/vector> 00026 #include "vtkStdString.h" 00027 #include <vtkstd/set> 00028 00029 //--------------------------------------------------------------------------- 00030 // Internal data structure for storing object IDs, server IDs and 00031 // properties. Each property has associated attributes: 00032 // * ModifiedFlag : has the property been modified since last update (push) 00033 // * DoUpdate : should the propery be updated (pushed) during UpdateVTKObjects 00034 // * ObserverTag : the tag returned by AddObserver(). Used to remove the 00035 // observer. 00036 struct vtkSMProxyInternals 00037 { 00038 struct PropertyInfo 00039 { 00040 PropertyInfo() 00041 { 00042 this->ModifiedFlag = 0; 00043 this->ObserverTag = 0; 00044 }; 00045 vtkSmartPointer<vtkSMProperty> Property; 00046 int ModifiedFlag; 00047 unsigned int ObserverTag; 00048 }; 00049 vtkstd::vector<vtkClientServerID > IDs; 00050 vtkstd::vector<int> ServerIDs; 00051 // Note that the name of the property is the map key. That is the 00052 // only place where name is stored 00053 typedef vtkstd::map<vtkStdString, PropertyInfo> PropertyInfoMap; 00054 PropertyInfoMap Properties; 00055 00056 typedef vtkstd::map<vtkStdString, vtkSmartPointer<vtkSMProxy> > ProxyMap; 00057 ProxyMap SubProxies; 00058 00059 struct ConsumerInfo 00060 { 00061 ConsumerInfo(vtkSMProperty* prop, vtkSMProxy* prox) : Property(prop), 00062 Proxy(prox) {}; 00063 vtkSMProperty* Property; 00064 vtkSMProxy* Proxy; 00065 }; 00066 vtkstd::vector<ConsumerInfo> Consumers; 00067 00068 // This is a set of exposed property names. 00069 vtkstd::set<vtkStdString> ExposedPropertyNames; 00070 }; 00071 00072 #endif 00073