VTK
dox/Common/vtkCommonInformationKeyManager.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkCommonInformationKeyManager.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 =========================================================================*/
00024 #ifndef __vtkCommonInformationKeyManager_h
00025 #define __vtkCommonInformationKeyManager_h
00026 
00027 #include "vtkSystemIncludes.h"
00028 
00029 #include "vtkDebugLeaksManager.h" // DebugLeaks exists longer than info keys.
00030 
00031 class vtkInformationKey;
00032 
00033 class VTK_COMMON_EXPORT vtkCommonInformationKeyManager
00034 {
00035 public:
00036   vtkCommonInformationKeyManager();
00037   ~vtkCommonInformationKeyManager();
00038 
00042   static void Register(vtkInformationKey* key);
00043 
00044 private:
00045   static void ClassInitialize();
00046   static void ClassFinalize();
00047 };
00048 
00049 // This instance will show up in any translation unit that uses key
00050 // types defined in vtkCommon or that has a singleton.  It will
00051 // make sure vtkCommonInformationKeyManager's vector of keys is
00052 // initialized before and destroyed after it is used.
00053 static vtkCommonInformationKeyManager vtkCommonInformationKeyManagerInstance;
00054 
00055 #endif