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

Servers/ServerManager/vtkSMProperty.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkSMProperty.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 =========================================================================*/
00064 #ifndef __vtkSMProperty_h
00065 #define __vtkSMProperty_h
00066 
00067 #include "vtkSMObject.h"
00068 #include "vtkClientServerID.h" // needed for vtkClientServerID
00069 
00070 class vtkClientServerStream;
00071 class vtkPVXMLElement;
00072 class vtkSMDomain;
00073 class vtkSMDomainIterator;
00074 class vtkSMInformationHelper;
00075 class vtkSMProxy;
00076 class vtkSMXMLParser;
00077 //BTX
00078 struct vtkSMPropertyInternals;
00079 //ETX
00080 
00081 class VTK_EXPORT vtkSMProperty : public vtkSMObject
00082 {
00083 public:
00084   static vtkSMProperty* New();
00085   vtkTypeRevisionMacro(vtkSMProperty, vtkSMObject);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00087 
00089 
00091   vtkSetStringMacro(Command);
00092   vtkGetStringMacro(Command);
00094 
00096 
00099   vtkSetMacro(ImmediateUpdate, int);
00100   vtkGetMacro(ImmediateUpdate, int);
00102 
00104 
00108   vtkSetMacro(UpdateSelf, int);
00109   vtkGetMacro(UpdateSelf, int);
00111 
00114   vtkSMProperty* GetSubProperty(const char* name);
00115 
00119   int IsInDomains();
00120 
00123   virtual void UnRegister(vtkObjectBase* obj);
00124 
00127   vtkSMDomainIterator* NewDomainIterator();
00128 
00130   vtkSMDomain* GetDomain(const char* name);
00131 
00134   unsigned int GetNumberOfDomains();
00135 
00144   void UpdateDependentDomains();
00145 
00147 
00149   static int GetCheckDomains();
00150   static void SetCheckDomains(int check);
00152 
00154 
00156   vtkGetStringMacro(XMLName);
00158 
00160 
00162   vtkGetMacro(InformationOnly, int);
00164 
00166 
00169   vtkGetObjectMacro(InformationProperty, vtkSMProperty);
00171 
00173 
00184   void SetControllerProxy(vtkSMProxy* proxy);
00185   void SetControllerProperty(vtkSMProperty* property);
00187 
00191   void AddDomain(const char* name, vtkSMDomain* dom);
00192 
00194 
00196   vtkSetMacro(Animateable, int);
00197   vtkGetMacro(Animateable, int);
00199 
00201 
00203   vtkSetMacro(Saveable, int);
00204   vtkGetMacro(Saveable, int);
00206 
00208   virtual void Copy(vtkSMProperty* src);
00209 protected:
00210   vtkSMProperty();
00211   ~vtkSMProperty();
00212 
00213   //BTX
00214   friend class vtkSMProxyManager;
00215   friend class vtkSMProxy;
00216   friend class vtkSMSubPropertyIterator;
00217   friend class vtkSMDomainIterator;
00218   friend class vtkSMSourceProxy;
00219   friend class vtkSMDomain;
00220 
00222 
00225   virtual void AppendCommandToStream(
00226     vtkSMProxy*, vtkClientServerStream* stream, vtkClientServerID objectId );
00228 
00230 
00233   virtual void UpdateInformation(int serverids, vtkClientServerID objectId);
00234   //ETX
00236 
00238 
00240   virtual int ReadXMLAttributes(vtkSMProxy* parent, 
00241                                 vtkPVXMLElement* element);
00243 
00246   virtual void UpdateAllInputs() {};
00247 
00249 
00251   vtkSetStringMacro(XMLName);
00253 
00255   void AddSubProperty(const char* name, vtkSMProperty* proxy);
00256 
00258   void RemoveSubProperty(const char* name);
00259 
00262   vtkSMProperty* NewProperty(const char* name);
00263 
00266   void AddDependent(vtkSMDomain* dom);
00267 
00269   void RemoveAllDependents();
00270 
00272   virtual void SaveState(const char* name, ostream* file, vtkIndent indent);
00273 
00276   void SetInformationHelper(vtkSMInformationHelper* helper);
00277 
00278   char* Command;
00279 
00280   vtkSMPropertyInternals* PInternals;
00281 
00282   int ImmediateUpdate;
00283   int UpdateSelf;
00284   int Animateable;
00285   int Saveable;
00286 
00287   char* XMLName;
00288 
00289   vtkSMDomainIterator* DomainIterator;
00290 
00291   static int CheckDomains;
00292 
00293   // ControllerProxy is pointer to the proxy whose property
00294   // (ControllerProperty) is mapped to the current property. This is useful
00295   // for 3DWidgets. The properties of the implicit function proxy
00296   // controlled by the 3DWidget will have these set to the corresponing
00297   // property of the 3DWidget. Thus, providing hints about which implicit
00298   // function property is controlled by which 3DWidget and what property.
00299   // This goes mostly unnoticed in ParaView, but useful for ARL.  If these
00300   // are set, then they are saved in the XML during SaveState as a element
00301   // <ControllerProperty name="propertyname" />. ARL notices such elements
00302   // and creates a property value dependency among the controlee and the
00303   // controller property.
00304   vtkSMProxy* ControllerProxy;
00305   vtkSMProperty* ControllerProperty;
00306   
00307   // Set during xml parsing only. Do not use outside ReadXMLAttributes().
00308   vtkSMProxy* Proxy;
00309   void SetProxy(vtkSMProxy* proxy);
00310 
00311   vtkSetMacro(InformationOnly, int);
00312   int InformationOnly;
00313 
00314   vtkSMInformationHelper* InformationHelper;
00315 
00316   void SetInformationProperty(vtkSMProperty* ip);
00317   vtkSMProperty* InformationProperty;
00318 
00319 private:
00320   vtkSMProperty(const vtkSMProperty&); // Not implemented
00321   void operator=(const vtkSMProperty&); // Not implemented
00322 };
00323 
00324 #endif

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