libMVRgdtf 40bc00a
A library for GDTF and MVR
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UUID.h
Go to the documentation of this file.
1//
2// Copyright Nemetschek Vectorworks, Inc.
3// Use of this file is governed by the Nemetschek Vectorworks SDK License Agreement
4// http://developer.vectorworks.net/index.php?title=Vectorworks_SDK_License
5//
6
7#pragma once
8
9namespace VectorworksMVR
10{
11 namespace VWFC
12 {
13 namespace Tools
14 {
15 // NOTE! You have to import library 'Rpcrt4.lib' on windows
16 // for this class to be used !!!
17 class VWUUID
18 {
19 public:
20 VWUUID();
21 // the bits are reversed
22 // for example:
23 // {09E95D97-364C-43d5-8ADF-FF4CE0EC41A7}
24 // '975DE909' 'd5434C36' '4CFFDF8A' 'A741ECE0'
25 VWUUID(Uint32 a, Uint32 b, Uint32 c, Uint32 d);
26 // copy the bytes one by one
27 VWUUID(const Uint8* const pArray, size_t size);
28 VWUUID(const VWIID& iid);
29 VWUUID(const VWUUID& src);
30 // Trows exception if not in this format
31 // {09E95D97-364C-43d5-8ADF-FF4CE0EC41A7}
32 VWUUID(const TXString& str);
33 ~VWUUID();
34
35 VWUUID& operator=(const VWUUID& src);
36
37 bool operator==(const VWUUID& id) const;
38 bool operator!=(const VWUUID& id) const;
39 operator TXString() const;
40
41 // create four 32 Bit integer from the components of the GUID structure
42 // the bits are reversed
43 // for example:
44 // {09E95D97-364C-43d5-8ADF-FF4CE0EC41A7}
45 // '975DE909' 'd5434C36' '4CFFDF8A' 'A741ECE0'
46 void New();
47 void GetUUID(Uint32& out1, Uint32& out2, Uint32& out3, Uint32& out4) const;
48 // copy the byes one by one as they are
49 void GetUUID(Uint8* pArray, size_t size) const;
50 // get as VCOM IID
51 void GetUUID(VWIID& out) const;
52
53 TXString ToString(bool includeBrackets) const;
54 bool FromString(const TXString& str, bool includeBrackets = true);
55
56 TXString Encode(const TXString& arrChars) const;
57
58 protected:
59 // {09E95D97-364C-43d5-8ADF-FF4CE0EC41A7}
60 union
61 {
65 };
66
67 };
68 }
69 }
70}
uint8_t Uint8
Definition GSTypes.h:25
uint64_t Uint64
Definition GSTypes.h:28
uint32_t Uint32
Definition GSTypes.h:27
Definition GSString.h:134
TXString Encode(const TXString &arrChars) const
Definition UUID.cpp:399
bool operator==(const VWUUID &id) const
Definition UUID.cpp:102
VWUUID & operator=(const VWUUID &src)
Definition UUID.cpp:95
void New()
Definition UUID.cpp:290
Uint32 fData32[4]
Definition UUID.h:63
VWUUID()
Definition UUID.cpp:284
void GetUUID(Uint32 &out1, Uint32 &out2, Uint32 &out3, Uint32 &out4) const
Definition UUID.cpp:366
bool operator!=(const VWUUID &id) const
Definition UUID.cpp:111
bool FromString(const TXString &str, bool includeBrackets=true)
Definition UUID.cpp:202
TXString ToString(bool includeBrackets) const
Definition UUID.cpp:171
~VWUUID()
Definition UUID.cpp:91
Uint8 fData[16]
Definition UUID.h:62
Uint64 fData64[2]
Definition UUID.h:64
Definition CieColor.h:9
Definition VectorworksMVR.h:32