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

vtkGenericAttributeCollection.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkGenericAttributeCollection.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
00025 #ifndef __vtkGenericAttributeCollection_h
00026 #define __vtkGenericAttributeCollection_h
00027 
00028 #include "vtkObject.h"
00029 
00030 class vtkGenericAttributeInternalVector;
00031 class vtkIntInternalVector;
00032 class vtkGenericAttribute;
00033 
00034 class VTK_FILTERING_EXPORT vtkGenericAttributeCollection : public vtkObject
00035 {
00036 public:
00038   static vtkGenericAttributeCollection *New();
00039   
00041 
00042   vtkTypeRevisionMacro(vtkGenericAttributeCollection,vtkObject);
00043   virtual void PrintSelf(ostream& os, vtkIndent indent);
00045   
00049   int GetNumberOfAttributes();
00050   
00053   int GetNumberOfComponents();
00054   
00058   int GetNumberOfPointCenteredComponents();
00059   
00063   int GetMaxNumberOfComponents();
00064   
00068   unsigned long GetActualMemorySize();
00069   
00072   int IsEmpty();
00073   
00077   vtkGenericAttribute *GetAttribute(int i);
00078  
00083   int FindAttribute(const char *name);
00084   
00089   int GetAttributeIndex(int i);
00090   
00095   void InsertNextAttribute(vtkGenericAttribute *a);
00096 
00101   void InsertAttribute(int i, vtkGenericAttribute *a);
00102 
00106   void RemoveAttribute(int i);
00107 
00109   void Reset();
00110 
00114   void DeepCopy(vtkGenericAttributeCollection *other);
00115   
00119   void ShallowCopy(vtkGenericAttributeCollection *other);
00120   
00123   virtual unsigned long int GetMTime();
00124   
00125   // *** ALL THE FOLLOWING METHODS SHOULD BE REMOVED WHEN when the 
00126   // new pipeline update mechanism is checked in.
00127   // *** BEGIN
00128 
00130 
00133   vtkGetMacro(ActiveAttribute, int);
00135   
00137 
00141   vtkGetMacro(ActiveComponent, int);
00143 
00150   void SetActiveAttribute(int attribute, int component = 0);
00151   
00153 
00155   vtkGetMacro(NumberOfAttributesToInterpolate, int);
00157 
00158   //BTX
00160 
00163   int *GetAttributesToInterpolate();
00164   //ETX
00166   
00170   int HasAttribute(int size, int *attributes, int attribute);
00171 
00173 
00179   void SetAttributesToInterpolate(int size, int *attributes);
00180   void SetAttributesToInterpolateToAll();
00182 
00183 protected:
00185   vtkGenericAttributeCollection();
00186 
00188   virtual ~vtkGenericAttributeCollection();
00189 
00191 
00192   vtkGenericAttributeInternalVector* AttributeInternalVector;
00193   // Description:
00194   // STL vector for storing index of point centered attributes
00195   vtkIntInternalVector *AttributeIndices;
00197   
00198   int ActiveAttribute;
00199   int ActiveComponent;
00200   int NumberOfAttributesToInterpolate;
00201   int AttributesToInterpolate[10];
00202   
00203   int NumberOfComponents; // cache
00204   int NumberOfPointCenteredComponents; // cache
00205   int MaxNumberOfComponents; // cache
00206   unsigned long ActualMemorySize; // cache
00207   vtkTimeStamp ComputeTime; // cache time stamp
00208 
00211   void ComputeNumbers();
00212   
00213 private:
00214   vtkGenericAttributeCollection(const vtkGenericAttributeCollection &);  // Not implemented.
00215   void operator=(const vtkGenericAttributeCollection &);  // Not implemented.
00216 };
00217 #endif

Generated on Mon Jan 21 23:07:19 2008 for VTK by  doxygen 1.4.3-20050530