3#ifndef _aspose_system_guid_h_
4#define _aspose_system_guid_h_
7#include <system/array.h>
8#include <system/boxable_traits.h>
9#include <system/details/array_view.h>
10#include <system/details/stack_array.h>
13#ifdef ASPOSECPPLIB_BEING_BUILT
14#include <boost/uuid/uuid.hpp>
18namespace boost {
namespace uuids {
20 ASPOSECPP_3RD_PARTY_STRUCT(uuid);
27 ASPOSECPP_3RD_PARTY_TYPE_HOLDER(boost::uuids::uuid, uuid,
sizeof(std::uint8_t[16]), uint8_t, UuidHolder);
33class ASPOSECPP_SHARED_CLASS
Guid
37 ASPOSECPP_SHARED_API
Guid();
43 ASPOSECPP_SHARED_API
Guid(
const System::Details::ArrayView<uint8_t> &b);
58 ASPOSECPP_SHARED_API
Guid(int32_t a, int16_t b, int16_t c,
const System::Details::ArrayView<uint8_t>& d);
71 ASPOSECPP_SHARED_API
Guid(int32_t a, int16_t b, int16_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j, uint8_t k);
84 ASPOSECPP_SHARED_API
Guid(uint32_t a, uint16_t b, uint16_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j, uint8_t k);
93 ASPOSECPP_SHARED_API
Guid& operator = (
const Guid &guid);
143 Guid(boost::uuids::uuid uuid);
145 void Init(uint32_t a, uint16_t b, uint16_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j, uint8_t k);
149 static char_t HexToChar(
int a);
157 static size_t HexsToChars(std::u16string & guid_str,
size_t offset, uint8_t a, uint8_t b,
bool hex =
false);
160 Detail::UuidHolder m_uuid;
166 struct Hex {
unsigned char c; };
180ASPOSECPP_SHARED_API
void PrintTo(
const Guid& value, std::ostream* stream);
Represents a Globally Unique IDentifier This type should be allocated on stack and passed to function...
Definition: guid.h:34
Guid(const System::Details::ArrayView< uint8_t > &b)
Constructs an object that represents a GUID specified as an array view of unsigned 8-bit integer valu...
String ToString(const String &format) const
Converts the GUID represented by the current object to its string representation using the specified ...
int GetHashCode() const
Returns a hash code for the current object.
static Guid NewGuid()
Generates a new GUID and returns a Guid object that represents it.
Guid(int32_t a, int16_t b, int16_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j, uint8_t k)
Constructs an instance of Guid class from the specified unsigned integers and bytes.
Guid(const ArrayPtr< uint8_t > &b)
Constructs an object that represents a GUID specified as an array of unsigned 8-bit integer values.
static Guid Parse(const String &input)
Converts the specified string representation of a GUID into equivalent Guid object.
ArrayPtr< uint8_t > ToByteArray() const
Converts the GUID represented by the current object into array of bytes.
Guid(const String &g)
Constructs an object that represents a GUID specified as a string.
bool Equals(const Guid &g) const
Determines if the GUIDs represented by the current and specified objects are equal.
Guid(const Guid &guid)
Constructs an object that represents the same GUID as the specified object.
int CompareTo(const Guid &g) const
Performs arithmetic comparison of the GUIDs represented by the current and specified objects.
String ToString(const String &format, const SharedPtr< Globalization::CultureInfo > &culture) const
Converts the GUID represented by the current object to its string representation using the specified ...
Guid(int32_t a, int16_t b, int16_t c, const ArrayPtr< uint8_t > &d)
Constructs an instance of Guid class from the specified GUID components.
static bool TryParse(const String &input, Guid &g)
Tries to convert the specified string into Guid object.
Guid(int32_t a, int16_t b, int16_t c, const System::Details::ArrayView< uint8_t > &d)
Constructs an instance of Guid class from the specified GUID components.
Guid(uint32_t a, uint16_t b, uint16_t c, uint8_t d, uint8_t e, uint8_t f, uint8_t g, uint8_t h, uint8_t i, uint8_t j, uint8_t k)
Constructs an instance of Guid class from the specified unsigned integers and bytes.
static Guid Empty
Represents a GUID that has a value of 0.
Definition: guid.h:125
Guid()
Constructs an object that represents a GUID consisting of all zeroes.
String ToString() const
Converts the GUID represented by the current object to its string representation.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Definition: db_command.h:9
void PrintTo(DateTime value, std::ostream *stream)
Prints value to ostream. Mostly used for debug.
bool operator!=(ArraySegment< T > a, ArraySegment< T > b)
Definition: array_segment.h:157
std::ostream & operator<<(std::ostream &stream, DateTime date_time)
Insert data into the stream using UTF-8 encoding.
Definition: date_time.h:729
bool operator==(ArraySegment< T > a, ArraySegment< T > b)
Definition: array_segment.h:151
The utility structure for Natvis.
Definition: guid.h:170
unsigned char c
Definition: guid.h:170
The utility structure for Natvis.
Definition: guid.h:166
unsigned char c
Definition: guid.h:166
The utility structure for Natvis.
Definition: guid.h:168
unsigned char c
Definition: guid.h:168
Template predicate that checks if boxing of the specified type is supported.
Definition: boxable_traits.h:16