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

vtkUUIDGenerator.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 * 00003 * $Id: vtkUUIDGenerator.h,v 1.5 2004/08/10 07:37:21 xpxqx Exp $ 00004 * 00005 * Copyright (c) 2004 Sean McInerney 00006 * All rights reserved. 00007 * 00008 * See Copyright.txt or http://vtkextensions.sourceforge.net/Copyright.html 00009 * for details. 00010 * 00011 * This software is distributed WITHOUT ANY WARRANTY; without even 00012 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 * PURPOSE. See the above copyright notice for more information. 00014 * 00015 */ 00016 #ifndef VTK_UUID_GENERATOR_H_ 00017 # define VTK_UUID_GENERATOR_H_ 00018 # include "vtkUUID.h" // gotta have it 00019 // VTK Common 00020 # include "vtkObject.h" 00021 00022 VTK_EXTENSIONS_NAMESPACE_BEGIN 00023 00024 class vtkExtensionsRNG; 00025 class vtkExtensionsGregorianClock; 00026 00040 class VTK_EXTENSIONS_COMMON_EXPORT vtkUUIDGenerator : public vtkObject 00041 { 00042 public: 00043 static vtkUUIDGenerator* New (void); 00044 vtkTypeRevisionMacro(vtkUUIDGenerator, vtkObject); 00045 void PrintSelf (ostream&, vtkIndent); 00046 00049 vtkSetClampMacro ( CreationVersion, vtkUint16Type, 00050 VTK_UUID_VERSION_TIME, 00051 VTK_UUID_VERSION_RANDOM ); 00052 vtkGetMacro (CreationVersion, vtkUint16Type); 00055 //BTX 00057 vtkUUID* Create (const char* input); 00058 00060 vtkUUID* Create (vtkUint8Type input[16]); 00061 //ETX 00062 00064 vtkUUID* Create (void); 00065 00066 protected: 00067 vtkUUIDGenerator (void); 00068 ~vtkUUIDGenerator(); 00069 00070 private: 00071 //BTX 00072 vtkUint8Type NodeID[6]; 00073 00074 vtkExtensionsGregorianClock* Clock; 00075 vtkExtensionsRNG* RNG; 00076 00077 vtkUint16Type CreationVersion; 00078 00083 int GetMAC (vtkUint8Type [6]); 00084 00094 vtkUint8Type* Pack (const vtkUint32Type timeLow, 00095 const vtkUint16Type timeMid, 00096 const vtkUint16Type timeHighAndVersion, 00097 const vtkUint16Type clockSeq, 00098 const vtkUint8Type node[6], 00099 vtkUint8Type result[16]); 00100 00106 vtkUint8Type* Pack (const char* input, vtkUint8Type result[16]); 00107 //ETX 00108 00109 private: 00115 vtkUUIDGenerator (const vtkUUIDGenerator&); 00116 void operator= (const vtkUUIDGenerator&); 00118 }; 00119 00120 VTK_EXTENSIONS_NAMESPACE_END 00121 00122 #endif /* VTK_UUID_GENERATOR_H_ */ 00123 /* 00124 * End of: $Id: vtkUUIDGenerator.h,v 1.5 2004/08/10 07:37:21 xpxqx Exp $. 00125 * 00126 */

Generated on Tue Aug 10 03:38:43 2004 for vtkExtensions by doxygen 1.3.7