VTK
dox/Common/Core/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 "vtkCommonCoreModule.h" // For export macro
00028 #include "vtkSystemIncludes.h"
00029 
00030 #include "vtkDebugLeaksManager.h" // DebugLeaks exists longer than info keys.
00031 
00032 class vtkInformationKey;
00033 
00034 class VTKCOMMONCORE_EXPORT vtkCommonInformationKeyManager
00035 {
00036 public:
00037   vtkCommonInformationKeyManager();
00038   ~vtkCommonInformationKeyManager();
00039 
00043   static void Register(vtkInformationKey* key);
00044 
00045 private:
00046   static void ClassInitialize();
00047   static void ClassFinalize();
00048 };
00049 
00050 // This instance will show up in any translation unit that uses key
00051 // types defined in vtkCommon or that has a singleton.  It will
00052 // make sure vtkCommonInformationKeyManager's vector of keys is
00053 // initialized before and destroyed after it is used.
00054 static vtkCommonInformationKeyManager vtkCommonInformationKeyManagerInstance;
00055 
00056 #endif
00057 // VTK-HeaderTest-Exclude: vtkCommonInformationKeyManager.h