Colobot
Public Member Functions | List of all members
CSystemUtilsLinux Class Reference
Inheritance diagram for CSystemUtilsLinux:
Inheritance graph
[legend]

Public Member Functions

void Init () override
 Performs platform-specific initialization. More...
 
SystemDialogResult SystemDialog (SystemDialogType type, const std::string &title, const std::string &message) override
 Displays a system dialog. More...
 
void InterpolateTimeStamp (SystemTimeStamp *dst, SystemTimeStamp *a, SystemTimeStamp *b, float i) override
 Interpolates between two timestamps. If i=0 then dst=a. If i=1 then dst=b. If i=0.5 then dst is halfway between. More...
 
void GetCurrentTimeStamp (SystemTimeStamp *stamp) override
 Returns a time stamp associated with current time. More...
 
long long TimeStampExactDiff (SystemTimeStamp *before, SystemTimeStamp *after) override
 Returns the exact (in nanosecond units) difference between two timestamps. More...
 
std::string GetSaveDir () override
 Returns the save dir location. More...
 
std::string GetEnvVar (const std::string &name) override
 Returns the environment variable with the given name or an empty string if it does not exist. More...
 
bool OpenPath (const std::string &path) override
 Opens a path with default file browser. More...
 
bool OpenWebsite (const std::string &url) override
 Opens a website with default web browser. More...
 
void Usleep (int usec) override
 Sleep for given amount of microseconds. More...
 
- Public Member Functions inherited from CSystemUtils
virtual void Init ()=0
 Performs platform-specific initialization. More...
 
virtual SystemDialogResult SystemDialog (SystemDialogType, const std::string &title, const std::string &message)=0
 Displays a system dialog. More...
 
TEST_VIRTUAL SystemDialogResult ConsoleSystemDialog (SystemDialogType type, const std::string &title, const std::string &message)
 Displays a fallback system dialog using console. More...
 
TEST_VIRTUAL SystemTimeStampCreateTimeStamp ()
 Creates a new time stamp object. More...
 
TEST_VIRTUAL void DestroyTimeStamp (SystemTimeStamp *stamp)
 Destroys a time stamp object. More...
 
TEST_VIRTUAL void CopyTimeStamp (SystemTimeStamp *dst, SystemTimeStamp *src)
 Copies the time stamp from src to dst. More...
 
virtual void InterpolateTimeStamp (SystemTimeStamp *dst, SystemTimeStamp *a, SystemTimeStamp *b, float i)=0
 Interpolates between two timestamps. If i=0 then dst=a. If i=1 then dst=b. If i=0.5 then dst is halfway between. More...
 
virtual void GetCurrentTimeStamp (SystemTimeStamp *stamp)=0
 Returns a time stamp associated with current time. More...
 
TEST_VIRTUAL float TimeStampDiff (SystemTimeStamp *before, SystemTimeStamp *after, SystemTimeUnit unit=STU_SEC)
 Returns a difference between two timestamps in given time unit. More...
 
virtual long long TimeStampExactDiff (SystemTimeStamp *before, SystemTimeStamp *after)=0
 Returns the exact (in nanosecond units) difference between two timestamps. More...
 
virtual std::string GetBasePath ()
 Returns the path where the executable binary is located (ends with the path separator) More...
 
virtual std::string GetDataPath ()
 Returns the data path (containing textures, levels, helpfiles, etc) More...
 
virtual std::string GetLangPath ()
 Returns the translations path. More...
 
virtual std::string GetSaveDir ()
 Returns the save dir location. More...
 
virtual std::string GetEnvVar (const std::string &name)
 Returns the environment variable with the given name or an empty string if it does not exist. More...
 
virtual bool OpenPath (const std::string &path)
 Opens a path with default file browser. More...
 
virtual bool OpenWebsite (const std::string &url)
 Opens a website with default web browser. More...
 
virtual void Usleep (int usecs)=0
 Sleep for given amount of microseconds. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from CSystemUtils
static std::unique_ptr< CSystemUtilsCreate ()
 Creates system utils for specific platform. More...
 

Member Function Documentation

◆ Init()

void CSystemUtilsLinux::Init ( )
overridevirtual

Performs platform-specific initialization.

Implements CSystemUtils.

◆ SystemDialog()

SystemDialogResult CSystemUtilsLinux::SystemDialog ( SystemDialogType  ,
const std::string &  title,
const std::string &  message 
)
overridevirtual

Displays a system dialog.

Implements CSystemUtils.

◆ InterpolateTimeStamp()

void CSystemUtilsLinux::InterpolateTimeStamp ( SystemTimeStamp dst,
SystemTimeStamp a,
SystemTimeStamp b,
float  i 
)
overridevirtual

Interpolates between two timestamps. If i=0 then dst=a. If i=1 then dst=b. If i=0.5 then dst is halfway between.

Implements CSystemUtils.

◆ GetCurrentTimeStamp()

void CSystemUtilsLinux::GetCurrentTimeStamp ( SystemTimeStamp stamp)
overridevirtual

Returns a time stamp associated with current time.

Implements CSystemUtils.

◆ TimeStampExactDiff()

long long CSystemUtilsLinux::TimeStampExactDiff ( SystemTimeStamp before,
SystemTimeStamp after 
)
overridevirtual

Returns the exact (in nanosecond units) difference between two timestamps.

The difference is after - before.

Implements CSystemUtils.

◆ GetSaveDir()

std::string CSystemUtilsLinux::GetSaveDir ( )
overridevirtual

Returns the save dir location.

Reimplemented from CSystemUtils.

◆ GetEnvVar()

std::string CSystemUtilsLinux::GetEnvVar ( const std::string &  name)
overridevirtual

Returns the environment variable with the given name or an empty string if it does not exist.

Reimplemented from CSystemUtils.

◆ OpenPath()

bool CSystemUtilsLinux::OpenPath ( const std::string &  path)
overridevirtual

Opens a path with default file browser.

Returns
true if successful

Reimplemented from CSystemUtils.

◆ OpenWebsite()

bool CSystemUtilsLinux::OpenWebsite ( const std::string &  url)
overridevirtual

Opens a website with default web browser.

Returns
true if successful

Reimplemented from CSystemUtils.

◆ Usleep()

void CSystemUtilsLinux::Usleep ( int  usecs)
overridevirtual

Sleep for given amount of microseconds.

Implements CSystemUtils.


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