plptools
Loading...
Searching...
No Matches
PsiZone Class Reference

A singleton wrapper for a psi_timezone . More...

#include <psitime.h>

Collaboration diagram for PsiZone:

Public Member Functions

bool getZone (psi_timezone &ptz)
 Retrieve the Psion time zone. More...
 

Static Public Member Functions

static PsiZonegetInstance ()
 Retrieve the singleton object. More...
 

Private Member Functions

 PsiZone ()
 Private constructor. More...
 
void setZone (psi_timezone &ptz)
 

Private Attributes

bool _ptzValid
 
psi_timezone _ptz
 

Static Private Attributes

static PsiZone_instance = 0L
 This objects instance (singleton) More...
 

Friends

class rpcs32
 

Detailed Description

A singleton wrapper for a psi_timezone .

This class is used by PsiTime to initialize its psi_timezone variable. PsiZone itself is initialized from within rpcs::getMachineInfo . In an application, you typically call this at the very beginning, just after connection setup. From then on, a single PsiZone instance is held in memory and used by the various constructors of PsiTime.

Author
Fritz Elfert felfe.nosp@m.rt@t.nosp@m.o.com

Definition at line 326 of file psitime.h.

Constructor & Destructor Documentation

◆ PsiZone()

PsiZone::PsiZone ( )
private

Private constructor.

Definition at line 292 of file psitime.cc.

Member Function Documentation

◆ getInstance()

PsiZone & PsiZone::getInstance ( )
static

Retrieve the singleton object.

If it does not exist, it is created.

Definition at line 285 of file psitime.cc.

◆ getZone()

bool PsiZone::getZone ( psi_timezone ptz)

Retrieve the Psion time zone.

Parameters
ptzThe time zone is returned here.
Returns
false, if the time zone is not known (yet).

Definition at line 302 of file psitime.cc.

◆ setZone()

void PsiZone::setZone ( psi_timezone ptz)
private

Definition at line 296 of file psitime.cc.

Friends And Related Function Documentation

◆ rpcs32

friend class rpcs32
friend

Definition at line 327 of file psitime.h.

Member Data Documentation

◆ _instance

PsiZone * PsiZone::_instance = 0L
staticprivate

This objects instance (singleton)

Definition at line 350 of file psitime.h.

◆ _ptz

psi_timezone PsiZone::_ptz
private

Definition at line 360 of file psitime.h.

◆ _ptzValid

bool PsiZone::_ptzValid
private

Definition at line 359 of file psitime.h.


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