Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

uuid.h

Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002  *
00003  * XPLC - Cross-Platform Lightweight Components
00004  * Copyright (C) 2000-2003, Pierre Phaneuf
00005  * Copyright (C) 2002, Net Integration Technologies, Inc.
00006  * Copyright (C) 2004, Stéphane Lajoie
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1 of
00011  * the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with this library; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00021  * USA
00022  */
00023 
00024 #ifndef __XPLC_UUID_H__
00025 #define __XPLC_UUID_H__
00026 
00076 #ifndef GUID_DEFINED
00077 #define GUID_DEFINED
00078 
00082 typedef struct _GUID {
00084   unsigned long Data1;
00085   unsigned short Data2;
00086   unsigned short Data3;
00087   unsigned char Data4[8];
00089 } GUID;
00090 #endif
00091 
00092 #ifndef UUID_DEFINED
00093 #define UUID_DEFINED
00094 typedef GUID UUID;
00095 #ifndef uuid_t
00096 #define uuid_t UUID
00097 #endif
00098 #endif
00099 
00100 
00102 static const UUID UUID_null = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}};
00103 
00115 template<class T>
00116 struct XPLC_IID {
00117 };
00118 
00122 #define DEFINE_IID(iface, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11) \
00123 static const UUID iface##_IID = u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11; \
00124 template <> \
00125 struct XPLC_IID<iface> { \
00126   static const UUID& get() { \
00127     return iface##_IID; \
00128   } \
00129 }
00130 
00131 #endif /* __XPLC_UUID_H__ */

Generated on Sun Sep 26 04:01:25 2004 for XPLC by doxygen1.2.18