Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
Arch Class Reference

Delegating implementation of architecture dependent interfaces. More...

#include <Arch.h>

Inheritance diagram for Arch:
Collaboration diagram for Arch:

Public Member Functions

 Arch ()
 Arch (Arch *arch)
 ~Arch () override=default
void init () override
 Call init on other arch classes.
Public Member Functions inherited from ArchString
 ArchString ()=default
 ArchString (const ArchString &)=delete
 ArchString (ArchString &&)=delete
 ~ArchString () override=default
ArchStringoperator= (const ArchString &)=delete
ArchStringoperator= (ArchString &&)=delete
int convStringMBToWC (wchar_t *, const char *, uint32_t n, bool *errors) const
 Convert multibyte string to wide character string.
int convStringWCToMB (char *, const wchar_t *, uint32_t n, bool *errors) const
 Convert wide character string to multibyte string.
EWideCharEncoding getWideCharEncoding () const
 Return the architecture's native wide character encoding.
Public Member Functions inherited from IInterface
virtual ~IInterface ()=default
 Interface destructor does nothing.

Static Public Member Functions

static ArchgetInstance ()
 Return the singleton instance.
static void setInstance (Arch *s)
static void sleep (double timeout)
 blocks calling thread for timout seconds
static double time ()
 time

Additional Inherited Members

Public Types inherited from ArchString
enum class  EWideCharEncoding : uint8_t {
  kUCS2 , kUCS4 , kUTF16 , kUTF32 ,
  kPlatformDetermined
}
 Wide character encodings. More...

Detailed Description

Delegating implementation of architecture dependent interfaces.

This class is a centralized interface to all architecture dependent interface implementations (except miscellaneous functions). It instantiates an implementation of each interface and delegates calls to each method to those implementations. Clients should use the ARCH macro to access this object. Clients must also instantiate exactly one of these objects before attempting to call any method, typically at the beginning of main().

Constructor & Destructor Documentation

◆ Arch() [1/2]

Arch::Arch ( )

◆ Arch() [2/2]

Arch::Arch ( Arch * arch)
explicit

◆ ~Arch()

Arch::~Arch ( )
overridedefault

Member Function Documentation

◆ getInstance()

Arch * Arch::getInstance ( )
static

Return the singleton instance.

The client must have instantiated exactly once Arch object before calling this function.

◆ init()

void Arch::init ( )
override

Call init on other arch classes.

Some arch classes depend on others to exist first. When init is called these classes will have ARCH available for use.

◆ setInstance()

void Arch::setInstance ( Arch * s)
inlinestatic

◆ sleep()

void Arch::sleep ( double timeout)
static

blocks calling thread for timout seconds

Parameters
timeout- blocking time in seconds. if < 0 not blocked if == 0 then caller yields the CPU

◆ time()

double Arch::time ( )
static

time

Returns
Returns the number of seconds since some arbitrary starting time. This should return as high a precision as reasonable.

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