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

FX::FXIO Class Reference

FXIO is a base class for a generic i/o device. More...

#include <FXIO.h>

Inheritance diagram for FX::FXIO:
FX::FXIODevice FX::FXFile FX::FXPipe FX::FXSocket FX::FXMemMap

List of all members.

Public Types

enum  {
  NoAccess = 0, ReadOnly = 1, WriteOnly = 2, ReadWrite = ReadOnly|WriteOnly,
  Append = 4, Truncate = 8, Create = 16, Exclusive = 32,
  NonBlocking = 64, Executable = 128, OwnHandle = 256, NoAccessTime = 512,
  Inheritable = 1024, Reading = ReadOnly, Writing = ReadWrite|Create|Truncate
}
 Access modes. More...
enum  { Begin = 0, Current = 1, End = 2 }
 Positioning modes. More...
enum  {
  OtherExec = 0x00001, OtherWrite = 0x00002, OtherRead = 0x00004, OtherReadWrite = OtherRead|OtherWrite,
  OtherFull = OtherReadWrite|OtherExec, GroupExec = 0x00008, GroupWrite = 0x00010, GroupRead = 0x00020,
  GroupReadWrite = GroupRead|GroupWrite, GroupFull = GroupReadWrite|GroupExec, OwnerExec = 0x00040, OwnerWrite = 0x00080,
  OwnerRead = 0x00100, OwnerReadWrite = OwnerRead|OwnerWrite, OwnerFull = OwnerReadWrite|OwnerExec, AllRead = OtherRead|GroupRead|OwnerRead,
  AllWrite = OtherWrite|GroupWrite|OwnerWrite, AllExec = OtherExec|GroupExec|OwnerExec, AllReadWrite = AllRead|AllWrite, AllFull = AllReadWrite|AllExec,
  Hidden = 0x00200, Directory = 0x00400, File = 0x00800, SymLink = 0x01000,
  SetUser = 0x02000, SetGroup = 0x04000, Sticky = 0x08000, Character = 0x10000,
  Block = 0x20000, Socket = 0x40000, Fifo = 0x80000
}
 File modes. More...

Public Member Functions

FXbool isReadable () const
 Is readable.
FXbool isWritable () const
 Is writable.
FXuint mode () const
 Return access mode.
virtual FXbool isOpen () const
 Return true if open.
virtual FXbool isSerial () const
 Return true if serial access only.
virtual FXlong position () const
 Get current file position.
virtual FXlong position (FXlong offset, FXuint from=FXIO::Begin)
 Change file position, returning new position from start.
virtual FXival readBlock (void *data, FXival count)
 Read block of bytes, returning number of bytes read.
virtual FXival writeBlock (const void *data, FXival count)
 Write block of bytes, returning number of bytes written.
virtual FXlong truncate (FXlong size)
 Truncate file.
virtual FXbool flush ()
 Flush to disk.
virtual FXbool eof ()
 Test if we're at the end.
virtual FXlong size ()
 Return size of i/o device.
virtual FXbool close ()
 Close handle.
virtual ~FXIO ()
 Destroy and close.

Protected Member Functions

 FXIO (FXuint m)

Protected Attributes

FXuint access

Detailed Description

FXIO is a base class for a generic i/o device.


Member Enumeration Documentation

anonymous enum

Access modes.

Enumerator:
NoAccess 

Basic access options.

ReadOnly 

No access.

WriteOnly 

Open for reading.

ReadWrite 

Open for writing.

Append 

Open for both read and write.

Truncate 

Open for append.

Create 

Truncate to zero when writing.

Exclusive 

Create if it doesn't exist.

NonBlocking 

Fail if trying to create a file which already exists.

Executable 

Non-blocking i/o.

OwnHandle 

Executable (memory map)

NoAccessTime 

File handle is ours.

Inheritable 

Don't change access time of file.

Reading 

Child process can inherit handle.

Convenience access options

Writing 

Normal options for reading.

anonymous enum

Positioning modes.

Enumerator:
Current 

Position from the begin (default)

End 

Position relative to current position.

anonymous enum

File modes.

Enumerator:
OtherExec 

Permissions.

OtherWrite 

Others have execute permission.

OtherRead 

Others have write permisson.

OtherReadWrite 

Others have read permission.

OtherFull 

Others have read and write permission.

GroupExec 

Others have full access.

GroupWrite 

Group has execute permission.

GroupRead 

Group has write permission.

GroupReadWrite 

Group has read permission.

GroupFull 

Group has read and write permission.

OwnerExec 

Group has full access.

OwnerWrite 

Owner has execute permission.

OwnerRead 

Owner has write permission.

OwnerReadWrite 

Owner has read permission.

OwnerFull 

Owner has read and write permission.

AllRead 

Owner has full access.

AllWrite 

Read permission for all.

AllExec 

Write permisson for all.

AllReadWrite 

Execute permission for all.

AllFull 

Read and write permission for all.

Hidden 

Full access for all.

Other flags

Directory 

Hidden file.

File 

Is directory.

SymLink 

Is regular file.

SetUser 

Is symbolic link.

Special mode bits

SetGroup 

Set user id.

Sticky 

Set group id.

Character 

Sticky bit.

Device special files

Block 

Character device.

Socket 

Block device.

Fifo 

Socket device.


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

Copyright © 1997-2011 Jeroen van der Zijp