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

This record is used to relate country and country code information in a vendor independet API. More...

#include <SaS/UpnDb/UpnDB.hpp>

+ Inheritance diagram for SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord:
+ Collaboration diagram for SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord:

Public Member Functions

 UpnDbCountryCodeRecord (UpnDB &Handle)
 UpnDbCountryCodeRecord - Default constructor. More...
 
virtual ~UpnDbCountryCodeRecord ()
 UpnDbCountryCodeRecord - Destructor. More...
 
virtual bool Add (UpnDbAuthHandle_t Auth)
 Add this object as a new record. More...
 
virtual bool Remove (UpnDbAuthHandle_t Auth)
 Remove this object. More...
 
virtual bool Update (UpnDbAuthHandle_t Auth) const
 Update this record. More...
 

Static Public Member Functions

static const std::vector< UpnDbCountryCodeRecord * > * ByIso3 (UpnDB &Db)
 Get the list of countries, by ISO-3. More...
 
static const std::vector< UpnDbCountryCodeRecord * > * ByName (UpnDB &Db)
 Get the list of countries, by ISO-3. More...
 
static bool Compare (UpnDbCountryCodeId_t Code, const char *Iso)
 Compare ISO code to determine if it matches. More...
 
static UpnDbCountryCodeId_t Find (const char *What)
 Get the UpnDbCountryCodeId_t for the provided value. More...
 
static bool Load (UpnDB &Handle)
 Load country codes into the UpnDbCountryCode cache. More...
 

Public Attributes

const char * Description
 The description. More...
 
const char * iso2
 The 2 character country code. More...
 
const char * iso3
 The 3 character country code. More...
 

Detailed Description

This record is used to relate country and country code information in a vendor independet API.

Definition at line 78 of file UpnDbCountryCodeRecord.hpp.

Constructor & Destructor Documentation

◆ UpnDbCountryCodeRecord()

SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::UpnDbCountryCodeRecord ( UpnDB Handle)

UpnDbCountryCodeRecord - Default constructor.

Parameters
HandleA handle to a UPN database connection.

◆ ~UpnDbCountryCodeRecord()

virtual SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::~UpnDbCountryCodeRecord ( )
virtual

UpnDbCountryCodeRecord - Destructor.

Member Function Documentation

◆ Add()

virtual bool SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::Add ( UpnDbAuthHandle_t  Auth)
virtual

Add this object as a new record.

Parameters
AuthThe authentication handle to use.
Returns
true if added.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

◆ ByIso3()

static const std::vector<UpnDbCountryCodeRecord*>* SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::ByIso3 ( UpnDB Db)
static

Get the list of countries, by ISO-3.

Parameters
DbThe current UPN DB Object.

◆ ByName()

static const std::vector<UpnDbCountryCodeRecord*>* SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::ByName ( UpnDB Db)
static

Get the list of countries, by ISO-3.

Parameters
DbThe current UPN DB Object.

◆ Compare()

static bool SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::Compare ( UpnDbCountryCodeId_t  Code,
const char *  Iso 
)
static

Compare ISO code to determine if it matches.

Parameters
CodeA UpnDbCountryCodeId_t
IsoA 2 or 3 digit ISO code or matching description. The compare is done ignoring case.
Returns
true when they match.

◆ Find()

static UpnDbCountryCodeId_t SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::Find ( const char *  What)
static

Get the UpnDbCountryCodeId_t for the provided value.

Parameters
WhatThe 2 or 3 digit ISO code, or a matching description. The compare is done ignoring case.
Returns
The UpnDbCountryCodeId_t for What, or zero when not found.

◆ Load()

static bool SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::Load ( UpnDB Handle)
static

Load country codes into the UpnDbCountryCode cache.

This can be called by the calling application, and it will be called by the other Country Code APIs when needed.

Parameters
HandleA handle to a UPN database connection.
Returns
true when loaded, or false on unrecoverable error.

◆ Remove()

virtual bool SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::Remove ( UpnDbAuthHandle_t  Auth)
virtual

Remove this object.

Parameters
AuthThe authentication handle to use.
Returns
true if removed.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

◆ Update()

virtual bool SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::Update ( UpnDbAuthHandle_t  Auth) const
virtual

Update this record.

Parameters
AuthThe authentication handle to use.
Returns
true if updated.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

Member Data Documentation

◆ Description

const char* SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::Description

The description.

In StringCache.

Definition at line 148 of file UpnDbCountryCodeRecord.hpp.

◆ iso2

const char* SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::iso2

The 2 character country code.

In StrinCache.

Definition at line 138 of file UpnDbCountryCodeRecord.hpp.

◆ iso3

const char* SoftwareAndServices::Library::UPN::UpnDbCountryCodeRecord::iso3

The 3 character country code.

In StringCache.

Definition at line 143 of file UpnDbCountryCodeRecord.hpp.


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