Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

mpcl::system::TSystem Class Reference

Wrapper for POSIX.1 operating system services. More...

#include <system.hh>

Inheritance diagram for mpcl::system::TSystem:

mpcl::system::ISystem List of all members.

Public Types

typedef TBigEndianBuffer TBigEndianBuffer
 Conversion of big endian dependent buffers type.

typedef TLittleEndianBuffer TLittleEndianBuffer
 Conversion of little endian dependent buffers type.

typedef TMachineDependent TMachineDependent
 Machine conversions type.


Public Methods

 TSystem (void)
 Builds a new instance.

TString getCurrentDirectory (void) const
char getDirectorySeparator (void) const
std::size_t getFileSize (const char *pkcFILE_NAME) const throw (TErrorException)
char getPathSeparator (void) const
int getProcessId (void) const
void sleep (std::size_t zSECONDS, std::size_t zNANOSECONDS=0) const
void yield (void) const

Detailed Description

Wrapper for POSIX.1 operating system services.

Definition at line 42 of file posix_1/system.hh.


Member Function Documentation

mpcl::text::TString mpcl::system::TSystem::getCurrentDirectory void    const [virtual]
 

Get current directory.

Returns:
Current directory.
Exceptions:
std::bad_alloc  If there is no memory available.

Implements mpcl::system::ISystem.

Definition at line 82 of file posix_1/system.cc.

References mpcl::text::TString.

char mpcl::system::TSystem::getDirectorySeparator void    const [virtual]
 

Get symbol for directory separator.

Returns:
The directory separator.

Implements mpcl::system::ISystem.

Definition at line 138 of file posix_1/system.cc.

std::size_t mpcl::system::TSystem::getFileSize const char *    pkcFILE_NAME const throw (TErrorException) [virtual]
 

Get file size.

Parameters:
pkcFILE_NAME  File name.
Returns:
Size of pkcFILE_NAME.

Implements mpcl::system::ISystem.

Definition at line 117 of file posix_1/system.cc.

References mpcl::system::GetErrorMessage().

char mpcl::system::TSystem::getPathSeparator void    const [virtual]
 

Get symbol for path separator.

Returns:
The path separator.

Implements mpcl::system::ISystem.

Definition at line 145 of file posix_1/system.cc.

int mpcl::system::TSystem::getProcessId void    const [virtual]
 

Gets an unique integer value that identifies the current process.

Returns:
The process identifier.

Implements mpcl::system::ISystem.

Definition at line 75 of file posix_1/system.cc.

void mpcl::system::TSystem::sleep std::size_t    zSECONDS,
std::size_t    zNANOSECONDS = 0
const [virtual]
 

Sleeps zSECONDS seconds and zNANOSECONDS nanoseconds. According to POSIX.1, sleep() affect only to the current thread.

Parameters:
zSECONDS  Seconds to wait.
zNANOSECONDS  Nanoseconds to wait.

Implements mpcl::system::ISystem.

Definition at line 57 of file posix_1/system.cc.

void mpcl::system::TSystem::yield void    const [virtual]
 

Yields yield the processor. A process can relinquish the processor voluntarily without blocking by calling yield(). The process will then be moved to the end of the queue for its static priority and a new process gets to run.

See also:
std::sched_yield().

Implements mpcl::system::ISystem.

Definition at line 68 of file posix_1/system.cc.


The documentation for this class was generated from the following files:
Generated on Mon Oct 13 02:35:25 2003 for MPCL by doxygen1.2.18