rasdaman complete source
|
#include <akgnet_fdescr.hh>
Public Member Functions | |
~FileDescriptor () throw () | |
Destructor, if open, closes the file descriptor. More... | |
int | operator() () throw () |
Returns the OS file descriptor. More... | |
bool | isOpen () throw () |
void | close () throw () |
Closes the descriptor. More... | |
int | getErrno () throw () |
Returns the error number of the last operation. More... | |
int | write (const void *buffer, int count) throw () |
int | read (void *buffer, int count) throw () |
bool | setNonBlocking (bool nonBlocking) throw () |
bool | isNonBlocking () throw () |
Returns true if the descriptors is in non-blocking mode. More... | |
Protected Member Functions | |
FileDescriptor () throw () | |
Protected constructor. More... | |
void | saveErrno () throw () |
Saves the errno. More... | |
Protected Attributes | |
int | fileDescriptor |
int | savedErrno |
This class the base class for a hierarchie, which are envelopes for the usual OS file descriptors. They offer only that much functionallity as needed for our library The objects of this hierarchie can't be copied!
akg::FileDescriptor::~FileDescriptor | ( | ) | ||
throw | ( | |||
) |
Destructor, if open, closes the file descriptor.
|
protected |
Protected constructor.
void akg::FileDescriptor::close | ( | ) | ||
throw | ( | |||
) |
Closes the descriptor.
int akg::FileDescriptor::getErrno | ( | ) | ||
throw | ( | |||
) |
Returns the error number of the last operation.
bool akg::FileDescriptor::isNonBlocking | ( | ) | ||
throw | ( | |||
) |
Returns true if the descriptors is in non-blocking mode.
bool akg::FileDescriptor::isOpen | ( | ) | ||
throw | ( | |||
) |
Returns true if the descriptor is open. Be aware that closing the file descriptor by using SO specific functions instead of the methods of this class can lead to incorrect results
int akg::FileDescriptor::operator() | ( | ) | ||
throw | ( | |||
) |
Returns the OS file descriptor.
int akg::FileDescriptor::read | ( | void * | buffer, |
int | count | ||
) | |||
throw | ( | ||
) |
Reads the specified number of bytes into the specified buffer. Returns the number of bytes actually read
|
protected |
Saves the errno.
Sets the non-blocking mode on or off Returns true o succes
int akg::FileDescriptor::write | ( | const void * | buffer, |
int | count | ||
) | |||
throw | ( | ||
) |
Writes the specified number of bytes from the specified buffer. Returns the number of bytes actually written
|
protected |
|
protected |