PLCnext API Documentation 25.0.2.69
Public Member Functions | Static Public Member Functions | Friends | List of all members
Arp::Base::Rsc::Commons::RscGuid Class Reference

A RSC wrapper class to marshal objects of type Uuid. More...

#include <RscGuid.hpp>

Public Member Functions

 RscGuid (void)
 The default constructor constructs an empty instance of type RscGuid.
 
 RscGuid (const Uuid &uuid)
 Constructs a RscGuid from the given Uuid argument. More...
 
void SetData (byte *pData, size_t dataSize)
 Sets the binary data of this object. More...
 
const byte * GetData (void) const
 Gets the binary data of this object. More...
 
Uuid ToUuid (void) const
 Converts this instance into an Uuid. More...
 
String ToString (void) const
 Converts this instance into a String. More...
 
void Read (RscReader &reader)
 Reads this instance from RSC. More...
 
void Write (RscWriter &writer) const
 Writes this instance to RSC. More...
 

Static Public Member Functions

static RscGuid Parse (const String &input)
 Parses the input string and returns the resulting as RscGuid. More...
 
static bool TryParse (const String &input, RscGuid &result)
 Tries to parse the input string. More...
 
static constexpr size_t GetDataSize (void)
 Gets the size of the internal buffer to store the Uuid. More...
 

Friends

ARP_EXPORT bool operator== (const RscGuid &left, const RscGuid &right) noexcept
 Compares the left argument to the right argument on equality. More...
 
ARP_EXPORT bool operator!= (const RscGuid &left, const RscGuid &right) noexcept
 Compares the left argument to the right argument on inequality. More...
 

Detailed Description

A RSC wrapper class to marshal objects of type Uuid.

Constructor & Destructor Documentation

◆ RscGuid()

Arp::Base::Rsc::Commons::RscGuid::RscGuid ( const Uuid uuid)

Constructs a RscGuid from the given Uuid argument.

Parameters
uuidThe UUID to be wrapped by this instance for RSC marshalling.

Member Function Documentation

◆ GetData()

const byte * Arp::Base::Rsc::Commons::RscGuid::GetData ( void  ) const

Gets the binary data of this object.

The size of the returned data might be determined by GetDataSize() operation.

Returns
A pointer to the binary data of this object.

◆ GetDataSize()

constexpr size_t Arp::Base::Rsc::Commons::RscGuid::GetDataSize ( void  )
staticconstexpr

Gets the size of the internal buffer to store the Uuid.

Returns
The size of the data.

◆ Parse()

RscGuid Arp::Base::Rsc::Commons::RscGuid::Parse ( const String input)
static

Parses the input string and returns the resulting as RscGuid.

Parameters
inputThe input string to parse.
Returns
The parsed input as RscGuid on success.
Exceptions
ArgumentExceptionIf the input is invalid.

◆ Read()

void Arp::Base::Rsc::Commons::RscGuid::Read ( RscReader reader)

Reads this instance from RSC.

Parameters
readerThe RSC reader to read from.

◆ SetData()

void Arp::Base::Rsc::Commons::RscGuid::SetData ( byte *  pData,
size_t  dataSize 
)

Sets the binary data of this object.

Parameters
pDataThe data to set.
dataSizeThe size of the data buffer.

◆ ToString()

String Arp::Base::Rsc::Commons::RscGuid::ToString ( void  ) const

Converts this instance into a String.

Returns
The String representing this instance.

◆ ToUuid()

Uuid Arp::Base::Rsc::Commons::RscGuid::ToUuid ( void  ) const

Converts this instance into an Uuid.

Returns
The Uuid representing this instance.

◆ TryParse()

bool Arp::Base::Rsc::Commons::RscGuid::TryParse ( const String input,
RscGuid result 
)
static

Tries to parse the input string.

Parameters
inputThe input string to parse.
resultThe resulting RscGuid object on success.
Returns
true on success, otherwise false.

◆ Write()

void Arp::Base::Rsc::Commons::RscGuid::Write ( RscWriter writer) const

Writes this instance to RSC.

Parameters
writerThe RSC writer to write to.

Friends And Related Function Documentation

◆ operator!=

ARP_EXPORT bool operator!= ( const RscGuid left,
const RscGuid right 
)
friend

Compares the left argument to the right argument on inequality.

Parameters
leftThe left argument to compare the right argument to.
rightThe right argument to be compared to the left argument.
Returns
true if the left argument is not equal to the right argument, otherwise false.

◆ operator==

ARP_EXPORT bool operator== ( const RscGuid left,
const RscGuid right 
)
friend

Compares the left argument to the right argument on equality.

Parameters
leftThe left argument to compare the right argument to.
rightThe right argument to be compared to the left argument.
Returns
true if the left argument is equal to the right argument, otherwise false.

The documentation for this class was generated from the following files: