Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Servers/ServerManager/vtkSMProxyProperty.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkSMProxyProperty.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 =========================================================================*/
00047 #ifndef __vtkSMProxyProperty_h
00048 #define __vtkSMProxyProperty_h
00049 
00050 #include "vtkSMProperty.h"
00051 
00052 class vtkSMProxy;
00053 //BTX
00054 struct vtkSMProxyPropertyInternals;
00055 //ETX
00056 
00057 class VTK_EXPORT vtkSMProxyProperty : public vtkSMProperty
00058 {
00059 public:
00060   static vtkSMProxyProperty* New();
00061   vtkTypeRevisionMacro(vtkSMProxyProperty, vtkSMProperty);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063   
00065 
00066   int AddProxy(vtkSMProxy* proxy);
00067   void RemoveProxy(vtkSMProxy* proxy);
00068   int SetProxy(unsigned int idx, vtkSMProxy* proxy);
00070 
00081   int AddProxy(vtkSMProxy* proxy, int modify);
00082 
00084   void RemoveProxy(vtkSMProxy* proxy, int modify);
00085   
00087 
00092   void AddUncheckedProxy(vtkSMProxy* proxy);
00093   void RemoveUncheckedProxy(vtkSMProxy* proxy);
00094   void SetUncheckedProxy(unsigned int idx, vtkSMProxy* proxy);
00096 
00098   void RemoveAllUncheckedProxies();
00099 
00101   void RemoveAllProxies();
00102 
00104   unsigned int GetNumberOfProxies();
00105 
00107   unsigned int GetNumberOfUncheckedProxies();
00108 
00110   vtkSMProxy* GetProxy(unsigned int idx);
00111 
00113   vtkSMProxy* GetUncheckedProxy(unsigned int idx);
00114 
00116   virtual void Copy(vtkSMProperty* src);
00117 
00119 
00123   virtual void DeepCopy(vtkSMProperty* src, const char* exceptionClass, 
00124     int proxyPropertyCopyFlag);
00126 protected:
00127   vtkSMProxyProperty();
00128   ~vtkSMProxyProperty();
00129 
00130   //BTX
00132 
00138   virtual void AppendCommandToStream(
00139     vtkSMProxy*, vtkClientServerStream* stream, vtkClientServerID objectId );
00140   //ETX
00142 
00144   virtual void UpdateAllInputs();
00145 
00147   virtual void SaveState(const char* name,  ostream* file, vtkIndent indent);
00148 
00149   // Previous proxies are used by the ProxyProperty internally.
00150   // All proxies added with AddProxy() will become "consumers" of
00151   // the proxy passed to AppendCommandToStream().
00152   // Proxies that were added previous but that are no longer in the list
00153   // (removed) are no longer consumers of the proxy therefore RemoveProxy
00154   // is called on them. This requires keeping track of previous proxies.
00156   void AddPreviousProxy(vtkSMProxy* proxy);
00157   void RemoveAllPreviousProxies();
00159 
00161   void RemoveConsumers(vtkSMProxy* proxy);
00162 
00163   //BTX
00164   friend class vtkSMProxy;
00165   //ETX
00166 
00167   vtkSMProxyPropertyInternals* PPInternals;
00168 
00170 
00172   vtkSetStringMacro(CleanCommand);
00173   vtkGetStringMacro(CleanCommand);
00174   char* CleanCommand;
00176 
00178 
00184   vtkSetStringMacro(RemoveCommand);
00185   vtkGetStringMacro(RemoveCommand);
00186   char* RemoveCommand;
00188   
00190 
00192   virtual int ReadXMLAttributes(vtkSMProxy* parent, 
00193                                 vtkPVXMLElement* element);
00195 
00196   vtkSetMacro(RepeatCommand, int);
00197   vtkGetMacro(RepeatCommand, int);
00198   int RepeatCommand;
00199 
00200   void AppendCommandToStreamWithRemoveCommand(
00201   vtkSMProxy* cons, vtkClientServerStream* str, vtkClientServerID objectId );
00202 
00203 
00204   void AppendProxyToStream(vtkSMProxy* toAppend,
00205   vtkSMProxy* cons, vtkClientServerStream* str, vtkClientServerID objectId, int remove=0 );
00206 private:
00207   vtkSMProxyProperty(const vtkSMProxyProperty&); // Not implemented
00208   void operator=(const vtkSMProxyProperty&); // Not implemented
00209 };
00210 
00211 #endif

Generated on Tue May 30 12:31:49 2006 for ParaView by doxygen 1.3.5