Main Page   Class Hierarchy   Compound List   File List   Compound Members  

SmartSockets::System Class Reference

#include <tsystem.h>

List of all members.

Static Public Methods

void runCommand (const char *command) throw (SystemException)
real8 getTime () throw ()
void sleep (real8 timeout) throw (SystemException)
void exit (int4 exitCode) throw ()
int4 getIntFormat () throw ()
int4 getFloatingPointFormat () throw ()

Static Public Attributes

const int4 INT_BIG_ENDIAN
const int4 INT_LITTLE_ENDIAN
const int4 REAL_DEC_D
const int4 REAL_DEC_G
const int4 REAL_IEEE
const int4 REAL_IBM_370


Detailed Description

Class used to wrap miscellaneous System calls.


Member Function Documentation

void SmartSockets::System::exit int4    exitCode throw () [static]
 

Calls all exit handlers registered internally by SmartSockets in the reverse order of their registration and then calls the system call exit(). If the process has registered any functions by calling atexit(), these functions are called only after the internal SmartSockets exit handlers functions have been called. If the process calls the system call exit() instead of TutExit(), the internal SmartSockets exit handlers are not called and the behavior of the process or application is unknown. The correct way to terminate a SmartSockets application or process is to call exit().

Parameters:
exitCode  exit status returned to the operating system when the process exits.

int4 SmartSockets::System::getFloatingPointFormat   throw () [static]
 

Gets the floating point format for this process. This is equivalent to calling TutGetRealFormat()

Returns:
System::REAL_DEC_D, System::REAL_DEC_G, System::REAL_IEEE, or System::REAL_IBM_370.
See also:
REAL_DEC_D , REAL_DEC_G , REAL_IEEE , REAL_IBM_370

int4 SmartSockets::System::getIntFormat   throw () [static]
 

Gets the integer format for this process. This is equivalent to calling TutGetIntFormat()

Returns:
System::INT_BIG_ENDIAN or System::INT_LITTLE_ENDIAN.
See also:
INT_BIG_ENDIAN , INT_LITTLE_ENDIAN

real8 SmartSockets::System::getTime   throw () [static]
 

Gets the current system time.

Returns:
floating-point number containing current computer wall clock time in the number of seconds since midnight January 1, 1970.

void SmartSockets::System::runCommand const char *    command throw (SystemException) [static]
 

Passes a command to be executed by an OS command processor.

This is useful for writing code that is portable between OpenVMS, UNIX, and Windows.

The Bourne shell (/bin/sh) is used on UNIX, DCL is used on OpenVMS, and the Windows command prompt is used on Windows. On MVS, TSO or SAS execution services ultimately processes the request. runCommand() returns the exit status of command (on OpenVMS the exit status 1 is mapped to 0 to emulate UNIX semantics). runCommand() on UNIX and MVS simply calls the function system. On OpenVMS, runCommand() calls system unless the command string ends with an ampersand (&) character. In this case, TutSystem emulates a UNIX shell by calling LIB$SPAWN with the NOWAIT bit set (on UNIX this is called running the command in the background). On Windows, TutSystem emulates UNIX to accomodate the limitations of COMMAND.COM on Windows. On MVS, ending the command string with & does not submit the command for batch execution. This is equivalent to calling TutSystem().

Parameters:
command  command to be executed by the OS.
Exceptions:
SystemException  thrown if the exit code of a command is not zero.

void SmartSockets::System::sleep real8    timeout throw (SystemException) [static]
 

Sleeps the thread for timeout number of seconds. This is equivalent to calling TutSleep(). Note that it is recommended that Thread::sleep() be used whenever using TIBCO's SmartSockets Thread class.

Parameters:
timeout  number of seconds to sleep.
Exceptions:
SystemException  thrown if an invalid timeout is passed, or if an operating system error occurs.


Member Data Documentation

const int4 SmartSockets::System::INT_BIG_ENDIAN [static]
 

Integer format where the most significant byte is stored in the highest byte.

const int4 SmartSockets::System::INT_LITTLE_ENDIAN [static]
 

Integer format where the most significant byte is stored in the lowest byte.

const int4 SmartSockets::System::REAL_DEC_D [static]
 

Floating point format that is the default for OpenVMS VAX.

const int4 SmartSockets::System::REAL_DEC_G [static]
 

Floating point format that is the default for OpenVMS VAX.

const int4 SmartSockets::System::REAL_IBM_370 [static]
 

Floating point format that is the default for MVS.

const int4 SmartSockets::System::REAL_IEEE [static]
 

Floating point format that is the default for most Unix and Windows OSs.


The documentation for this class was generated from the following file:
Generated on Fri Jul 14 15:05:55 2006 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001