VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/Core/vtkInformationVariantVectorKey.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkInformationVariantVectorKey.h
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 vtkInformationVariantVectorKey_h
00026 #define vtkInformationVariantVectorKey_h
00027 
00028 #include "vtkCommonCoreModule.h" // For export macro
00029 #include "vtkInformationKey.h"
00030 
00031 #include "vtkCommonInformationKeyManager.h" // Manage instances of this type.
00032 
00033 class vtkVariant;
00034 
00035 class VTKCOMMONCORE_EXPORT vtkInformationVariantVectorKey : public vtkInformationKey
00036 {
00037 public:
00038   vtkTypeMacro(vtkInformationVariantVectorKey,vtkInformationKey);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00041   vtkInformationVariantVectorKey(const char* name, const char* location,
00042                                  int length=-1);
00043   ~vtkInformationVariantVectorKey();
00044 
00046 
00049   static vtkInformationVariantVectorKey* MakeKey(const char* name, const char* location,
00050     int length=-1)
00051     {
00052     return new vtkInformationVariantVectorKey(name, location, length);
00053     }
00055 
00057 
00059   void Append(vtkInformation* info, const vtkVariant& value);
00060   void Set(vtkInformation* info, const vtkVariant* value, int length);
00061   const vtkVariant* Get(vtkInformation* info) const;
00062   const vtkVariant& Get(vtkInformation* info, int idx) const;
00063   void Get(vtkInformation* info, vtkVariant* value) const;
00064   int Length(vtkInformation* info) const;
00066 
00070   virtual void ShallowCopy(vtkInformation* from, vtkInformation* to);
00071 
00073   virtual void Print(ostream& os, vtkInformation* info);
00074 
00075 protected:
00076   // The required length of the vector value (-1 is no restriction).
00077   int RequiredLength;
00078 
00079 private:
00080   vtkInformationVariantVectorKey(const vtkInformationVariantVectorKey&);  // Not implemented.
00081   void operator=(const vtkInformationVariantVectorKey&);  // Not implemented.
00082 };
00083 
00084 #endif