diff options
Diffstat (limited to 'lldb/include/lldb/Core/UUID.h')
-rw-r--r-- | lldb/include/lldb/Core/UUID.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/lldb/include/lldb/Core/UUID.h b/lldb/include/lldb/Core/UUID.h new file mode 100644 index 00000000000..6e3402b9e74 --- /dev/null +++ b/lldb/include/lldb/Core/UUID.h @@ -0,0 +1,80 @@ +//===-- UUID.h --------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef liblldb_UUID_h_ +#define liblldb_UUID_h_ + +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes + +#include "lldb/lldb-private.h" + +namespace lldb_private { + +class UUID +{ +public: + typedef uint8_t ValueType[16]; + + //------------------------------------------------------------------ + // Constructors and Destructors + //------------------------------------------------------------------ + UUID (); + UUID (const UUID& rhs); + UUID (const void *uuid_bytes, uint32_t num_uuid_bytes); + UUID (const uuid_t *uuid); + + ~UUID (); + + const UUID& + operator=(const UUID& rhs); + + void + Clear (); + + void + Dump (Stream *s) const; + + const void * + GetBytes() const; + + static size_t + GetByteSize(); + + bool + IsValid () const; + + void + SetBytes (const void *uuid_bytes); + + char * + GetAsCString (char *dst, size_t dst_len) const; + + size_t + SetfromCString (const char *c_str); + +protected: + //------------------------------------------------------------------ + // Classes that inherit from UUID can see and modify these + //------------------------------------------------------------------ + ValueType m_uuid; +}; + +bool operator == (const UUID &lhs, const UUID &rhs); +bool operator != (const UUID &lhs, const UUID &rhs); +bool operator < (const UUID &lhs, const UUID &rhs); +bool operator <= (const UUID &lhs, const UUID &rhs); +bool operator > (const UUID &lhs, const UUID &rhs); +bool operator >= (const UUID &lhs, const UUID &rhs); + +} // namespace lldb_private + +#endif // liblldb_UUID_h_ |