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

stdbase::system::platform::FileDescriptor Class Reference

A wrapper class hiding the platform specifics of file manipulation. More...

List of all members.

Public Types

enum  Flags {
  CLOSED = 0, READ = 0x0001, WRITE = 0x0002, RDWRMASK = 0x0003,
  BIN = 0x0004, TEXT = 0x0008, TYPEMASK = 0x000C, CREATE = 0x0010,
  APPEND = 0x0020, OPEN = 0x0040, OPNMASK = 0x0070, CREATE_WRITE_BIN = CREATE | WRITE | BIN,
  CREATE_WRITE_TEXT = CREATE | WRITE | TEXT, APPEND_WRITE_BIN = APPEND | WRITE | BIN, APPEND_WRITE_TEXT = APPEND | WRITE | TEXT, CREATE_RDWR_BIN = CREATE | READ | WRITE | BIN,
  CREATE_RDWR_TEXT = CREATE | READ | WRITE | TEXT, APPEND_RDWR_BIN = APPEND | WRITE | BIN, APPEND_RDWR_TEXT = APPEND | WRITE | TEXT, OPEN_READ_BIN = OPEN | READ | BIN,
  OPEN_READ_TEXT = OPEN | READ | TEXT
}
enum  Flags {
  CLOSED = 0, READ = 0x0001, WRITE = 0x0002, RDWRMASK = 0x0003,
  BIN = 0x0004, TEXT = 0x0008, TYPEMASK = 0x000C, CREATE = 0x0010,
  APPEND = 0x0020, OPNMASK = 0x0070, CREATE_WRITE_BIN = CREATE | WRITE | BIN, CREATE_WRITE_TEXT = CREATE | WRITE | TEXT,
  APPEND_WRITE_BIN = APPEND | WRITE | BIN, APPEND_WRITE_TEXT = APPEND | WRITE | TEXT, CREATE_RDWR_BIN = CREATE | READ | WRITE | BIN, CREATE_RDWR_TEXT = CREATE | READ | WRITE | TEXT,
  APPEND_RDWR_BIN = APPEND | WRITE | BIN, APPEND_RDWR_TEXT = APPEND | WRITE | TEXT, OPEN_READ_BIN = OPEN | READ | BIN, OPEN_READ_TEXT = OPEN | READ | TEXT
}
enum  Flags {
  CLOSED = 0, READ = 0x0001, WRITE = 0x0002, RDWRMASK = 0x0003,
  BIN = 0x0004, TEXT = 0x0008, TYPEMASK = 0x000C, CREATE = 0x0010,
  APPEND = 0x0020, OPNMASK = 0x0070, CREATE_WRITE_BIN = CREATE | WRITE | BIN, CREATE_WRITE_TEXT = CREATE | WRITE | TEXT,
  APPEND_WRITE_BIN = APPEND | WRITE | BIN, APPEND_WRITE_TEXT = APPEND | WRITE | TEXT, CREATE_RDWR_BIN = CREATE | READ | WRITE | BIN, CREATE_RDWR_TEXT = CREATE | READ | WRITE | TEXT,
  APPEND_RDWR_BIN = APPEND | WRITE | BIN, APPEND_RDWR_TEXT = APPEND | WRITE | TEXT, OPEN_READ_BIN = OPEN | READ | BIN, OPEN_READ_TEXT = OPEN | READ | TEXT
}
enum  Flags {
  CLOSED = 0, READ = 0x0001, WRITE = 0x0002, RDWRMASK = 0x0003,
  BIN = 0x0004, TEXT = 0x0008, TYPEMASK = 0x000C, CREATE = 0x0010,
  APPEND = 0x0020, OPNMASK = 0x0070, CREATE_WRITE_BIN = CREATE | WRITE | BIN, CREATE_WRITE_TEXT = CREATE | WRITE | TEXT,
  APPEND_WRITE_BIN = APPEND | WRITE | BIN, APPEND_WRITE_TEXT = APPEND | WRITE | TEXT, CREATE_RDWR_BIN = CREATE | READ | WRITE | BIN, CREATE_RDWR_TEXT = CREATE | READ | WRITE | TEXT,
  APPEND_RDWR_BIN = APPEND | WRITE | BIN, APPEND_RDWR_TEXT = APPEND | WRITE | TEXT, OPEN_READ_BIN = OPEN | READ | BIN, OPEN_READ_TEXT = OPEN | READ | TEXT
}

Public Methods

 FileDescriptor ()
 ~FileDescriptor ()
bool isOpen ()
 Test if the file is open for I/O operations. More...

bool open (char *name, Flags f)
 Opens the given file with the appropriate flags. More...

bool open (StdOut)
 Open write-only descriptor to stdout.

bool open (StdErr)
 Open write-only descriptor to stderr.

bool open (StdIn)
 Open read-only descriptor to stdin.

bool close ()
 Closes the file. More...

bool write (char *buffer, int len)
 Write at most len characters to the file. More...

int read (char *buffer, int max)
 Read upto max chars from the file. More...

bool flush ()
 Flushes the file. More...

bool eof ()
 Indicates whether the end of the file has been reached.

 FileDescriptor ()
 ~FileDescriptor ()
bool isOpen ()
 Test if the file is open for I/O operations. More...

bool open (char *name, Flags f)
 Opens the given file with the appropriate flags. More...

bool open (StdOut)
 Open write-only descriptor to stdout.

bool open (StdErr)
 Open write-only descriptor to stderr.

bool open (StdIn)
 Open read-only descriptor to stdin.

bool close ()
 Closes the file. More...

bool write (char *buffer, int len)
 Write at most len characters to the file. More...

int read (char *buffer, int max)
 Read upto max chars from the file. More...

bool flush ()
 Flushes the file. More...

bool eof ()
 Indicates whether the end of the file has been reached.

 FileDescriptor ()
 ~FileDescriptor ()
bool isOpen ()
 Test if the file is open for I/O operations. More...

bool open (char *name, Flags f)
 Opens the given file with the appropriate flags. More...

bool open (StdOut)
 Open write-only descriptor to stdout.

bool open (StdErr)
 Open write-only descriptor to stderr.

bool open (StdIn)
 Open read-only descriptor to stdin.

bool close ()
 Closes the file. More...

bool write (char *buffer, int len)
 Write at most len characters to the file. More...

int read (char *buffer, int max)
 Read upto max chars from the file. More...

bool flush ()
 Flushes the file. More...

bool eof ()
 Indicates whether the end of the file has been reached.

 FileDescriptor ()
 ~FileDescriptor ()
bool isOpen ()
 Test if the file is open for I/O operations. More...

bool open (char *name, Flags f)
 Opens the given file with the appropriate flags. More...

bool open (StdOut)
 Open write-only descriptor to stdout.

bool open (StdErr)
 Open write-only descriptor to stderr.

bool open (StdIn)
 Open read-only descriptor to stdin.

bool close ()
 Closes the file. More...

bool write (char *buffer, int len)
 Write at most len characters to the file. More...

int read (char *buffer, int max)
 Read upto max chars from the file. More...

bool flush ()
 Flushes the file. More...


Static Public Attributes

FileDescriptor stdinFileDescriptor
FileDescriptor stdoutFileDescriptor
FileDescriptor stderrFileDescriptor


Detailed Description

A wrapper class hiding the platform specifics of file manipulation.

Definition at line 49 of file general/FileDescriptor.


Member Function Documentation

bool stdbase::system::platform::FileDescriptor::close [inline]
 

Closes the file.

Returns:
true if the file was closed successfully. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::close [inline]
 

Closes the file.

Returns:
true if the file was closed successfully. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::close [inline]
 

Closes the file.

Returns:
true if the file was closed successfully. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::close [inline]
 

Closes the file.

Returns:
true if the file was closed successfully. false if unsuccessful.

Definition at line 273 of file general/FileDescriptor.

bool stdbase::system::platform::FileDescriptor::flush [inline]
 

Flushes the file.

Returns:
true if the flush succeeded. false on failure.

bool stdbase::system::platform::FileDescriptor::flush [inline]
 

Flushes the file.

Returns:
true if the flush succeeded. false on failure.

bool stdbase::system::platform::FileDescriptor::flush [inline]
 

Flushes the file.

Returns:
true if the flush succeeded. false on failure.

bool stdbase::system::platform::FileDescriptor::flush [inline]
 

Flushes the file.

Returns:
true if the flush succeeded. false on failure.

Definition at line 299 of file general/FileDescriptor.

bool stdbase::system::platform::FileDescriptor::isOpen [inline]
 

Test if the file is open for I/O operations.

Returns:
true if open. false if not open.

bool stdbase::system::platform::FileDescriptor::isOpen [inline]
 

Test if the file is open for I/O operations.

Returns:
true if open. false if not open.

bool stdbase::system::platform::FileDescriptor::isOpen [inline]
 

Test if the file is open for I/O operations.

Returns:
true if open. false if not open.

bool stdbase::system::platform::FileDescriptor::isOpen [inline]
 

Test if the file is open for I/O operations.

Returns:
true if open. false if not open.

Definition at line 179 of file general/FileDescriptor.

bool stdbase::system::platform::FileDescriptor::open char * name,
Flags f
[inline]
 

Opens the given file with the appropriate flags.

Returns:
true if the file was opened successfully. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::open char * name,
Flags f
[inline]
 

Opens the given file with the appropriate flags.

Returns:
true if the file was opened successfully. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::open char * name,
Flags f
[inline]
 

Opens the given file with the appropriate flags.

Returns:
true if the file was opened successfully. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::open char * name,
Flags f
[inline]
 

Opens the given file with the appropriate flags.

Returns:
true if the file was opened successfully. false if unsuccessful.

Definition at line 185 of file general/FileDescriptor.

int stdbase::system::platform::FileDescriptor::read char * buffer,
int max
[inline]
 

Read upto max chars from the file.

Returns:
the number of bytes read.

int stdbase::system::platform::FileDescriptor::read char * buffer,
int max
[inline]
 

Read upto max chars from the file.

Returns:
the number of bytes read.

int stdbase::system::platform::FileDescriptor::read char * buffer,
int max
[inline]
 

Read upto max chars from the file.

Returns:
the number of bytes read.

int stdbase::system::platform::FileDescriptor::read char * buffer,
int max
[inline]
 

Read upto max chars from the file.

Returns:
the number of bytes read.

Definition at line 291 of file general/FileDescriptor.

bool stdbase::system::platform::FileDescriptor::write char * buffer,
int len
[inline]
 

Write at most len characters to the file.

Returns:
true if successful. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::write char * buffer,
int len
[inline]
 

Write at most len characters to the file.

Returns:
true if successful. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::write char * buffer,
int len
[inline]
 

Write at most len characters to the file.

Returns:
true if successful. false if unsuccessful.

bool stdbase::system::platform::FileDescriptor::write char * buffer,
int len
[inline]
 

Write at most len characters to the file.

Returns:
true if successful. false if unsuccessful.

Definition at line 282 of file general/FileDescriptor.


The documentation for this class was generated from the following files:
Generated at Tue Aug 13 14:19:42 2002 for stdnet2 by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001