00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef WINDOWS_GUID_H
00016 #define WINDOWS_GUID_H
00017
00018 #include "pandatoolbase.h"
00019
00020 #include <string.h>
00021
00022
00023
00024
00025
00026
00027
00028
00029 class WindowsGuid {
00030 public:
00031 INLINE WindowsGuid();
00032 INLINE WindowsGuid(unsigned long data1,
00033 unsigned short data2, unsigned short data3,
00034 unsigned char b1, unsigned char b2, unsigned char b3,
00035 unsigned char b4, unsigned char b5, unsigned char b6,
00036 unsigned char b7, unsigned char b8);
00037 INLINE WindowsGuid(const WindowsGuid ©);
00038 INLINE void operator = (const WindowsGuid ©);
00039
00040 INLINE bool operator == (const WindowsGuid &other) const;
00041 INLINE bool operator != (const WindowsGuid &other) const;
00042 INLINE bool operator < (const WindowsGuid &other) const;
00043 INLINE int compare_to(const WindowsGuid &other) const;
00044
00045 bool parse_string(const string &str);
00046 string format_string() const;
00047
00048 void output(ostream &out) const;
00049
00050 private:
00051 unsigned long _data1;
00052 unsigned short _data2;
00053 unsigned short _data3;
00054 unsigned char _b1, _b2, _b3, _b4, _b5, _b6, _b7, _b8;
00055 };
00056
00057 INLINE ostream &operator << (ostream &out, const WindowsGuid &guid);
00058
00059 #include "windowsGuid.I"
00060
00061 #endif
00062