Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::Common::GUID Class Reference

Registration of application and library identifiers. More...

#include "<SaS/Common/Guid.hpp>"

+ Inheritance diagram for SoftwareAndServices::Library::Common::GUID:
+ Collaboration diagram for SoftwareAndServices::Library::Common::GUID:

Public Member Functions

 GUID ()
 GUID - Default Constructor. More...
 
virtual ~GUID ()
 GUID - Destructor. More...
 
virtual InstanceCount_t decInstance () const
 Decrement the instance. More...
 
bool Get (String &App, String &GuidValue) const
 Get the GUID value. More...
 
virtual InstanceCount_t getInstance () const
 
virtual InstanceCount_t incInstance () const
 Increment the instance. More...
 
 operator const char * () const
 Cast to the GUID string to a (char*) More...
 
void operator delete (void *ToFree)
 
bool operator!= (const GUID &Other) const
 Compare two GUID objects by value. More...
 
GUIDoperator= (const GUID &CopyFrom)
 Copy a GUID object. More...
 
bool operator== (const GUID &Other) const
 Compare two GUID objects by value. More...
 
void Set (const char *App, const char *GuidValue)
 Set the GUID value. More...
 

Static Public Member Functions

static const char * Generate ()
 Generate a new GUID. More...
 
static bool Load ()
 Load known GUID objects from the users known GUID list: ~user/.SaS/Guids.xdr . More...
 
static GUIDLookupByApp (const char *App)
 Look up a GUID by application name. More...
 
static GUIDLookupByGUID (const char *GuidValue)
 Look up a GUID by GUID. More...
 
static bool Save ()
 Save known GUID objects to the users known GUID list: ~user/.SaS/Guids.xdr . More...
 

Detailed Description

Registration of application and library identifiers.

Definition at line 83 of file Guid.hpp.

Constructor & Destructor Documentation

◆ GUID()

SoftwareAndServices::Library::Common::GUID::GUID ( )

GUID - Default Constructor.

◆ ~GUID()

virtual SoftwareAndServices::Library::Common::GUID::~GUID ( )
virtual

GUID - Destructor.

Member Function Documentation

◆ decInstance()

virtual InstanceCount_t SoftwareAndServices::Library::Common::instance< String >::decInstance ( ) const
inlinevirtualinherited

Decrement the instance.

Returns
The instance count, after decrementing it.

Definition at line 129 of file instance.hpp.

◆ Generate()

static const char* SoftwareAndServices::Library::Common::GUID::Generate ( )
static

Generate a new GUID.

Returns
The GUID as a string. Caller must delete results to prevent a memory leak.

◆ Get()

bool SoftwareAndServices::Library::Common::GUID::Get ( String App,
String GuidValue 
) const

Get the GUID value.

Parameters
AppThe application name for the GUID will be returned here.
GuidValueThe GUID value will be returned here.
Returns
true when there were values and App and GuidValue are both filled in.

◆ getInstance()

virtual InstanceCount_t SoftwareAndServices::Library::Common::instance< String >::getInstance ( ) const
inlinevirtualinherited
Returns
The current instance count.

Definition at line 118 of file instance.hpp.

◆ incInstance()

virtual InstanceCount_t SoftwareAndServices::Library::Common::instance< String >::incInstance ( ) const
inlinevirtualinherited

Increment the instance.

Returns
The instance value, after incrementing it.

Definition at line 109 of file instance.hpp.

◆ Load()

static bool SoftwareAndServices::Library::Common::GUID::Load ( )
static

Load known GUID objects from the users known GUID list: ~user/.SaS/Guids.xdr .

Returns
true whe loaded. Also returns true when the list does not exist or is empty.

◆ LookupByApp()

static GUID* SoftwareAndServices::Library::Common::GUID::LookupByApp ( const char *  App)
static

Look up a GUID by application name.

Parameters
AppThe application or library name.
Returns
The GUID object matching App, or nullptr when none is registered.

◆ LookupByGUID()

static GUID* SoftwareAndServices::Library::Common::GUID::LookupByGUID ( const char *  GuidValue)
static

Look up a GUID by GUID.

Parameters
GuidValueThe GUID value to look up.
Returns
The GUID object matching GuidValue, or nullptr when none is registered.

◆ operator const char *()

SoftwareAndServices::Library::Common::GUID::operator const char * ( ) const

Cast to the GUID string to a (char*)

◆ operator!=()

bool SoftwareAndServices::Library::Common::GUID::operator!= ( const GUID Other) const

Compare two GUID objects by value.

Parameters
OtherThe other GUID to compare to.
Returns
true if their values are not equal.

◆ operator=()

GUID& SoftwareAndServices::Library::Common::GUID::operator= ( const GUID CopyFrom)

Copy a GUID object.

Parameters
CopyFromThe GUID object to copy.
Returns
this object updated.

◆ operator==()

bool SoftwareAndServices::Library::Common::GUID::operator== ( const GUID Other) const

Compare two GUID objects by value.

Parameters
OtherThe other GUID to compare to.
Returns
true if their values are equal.

◆ Save()

static bool SoftwareAndServices::Library::Common::GUID::Save ( )
static

Save known GUID objects to the users known GUID list: ~user/.SaS/Guids.xdr .

Returns
true when the list is written.

◆ Set()

void SoftwareAndServices::Library::Common::GUID::Set ( const char *  App,
const char *  GuidValue 
)

Set the GUID value.

Parameters
AppThe application name for the GUID.
GuidValueThe GUID value.

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