Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Oscoffee


Compounds

class  OSFileFuncBase
 Abstracts an OS specific file fucntion set. More...

class  OSFileFuncUnix
class  OSFileFuncWin
 Implements COFFEE file specific extensions for MS-Windows. More...


Typedefs

typedef long long file_size_t
 The longest integer available on the platform.

typedef OSFileFuncUnix OSFileFunc
 Definition that hooks COFFEE for Windows in your application.


Enumerations

enum  LockMode { LM_SHARED, LM_SHARED_RO, LM_EXCLUSIVE }
 Basic locking schemes used by various systems at open time. More...

enum  OpenMode {
  OM_RO, OM_WO, OM_RW, OM_TRUNC_WO,
  OM_TRUNC_RW, OM_APPEND_WO, OM_APPEND_RW
}
 Basic open modes used by various systems. More...

enum  CreateMode {
  CM_ARCHIVE, CM_SYSTEM, CM_EXECUTABLE, CM_PRIVATE,
  CM_PRIVATE_EX
}
 Creation modes. More...

enum  CffStatus {
  CFF_DONE, CFF_WAITING, CFF_TIMEDOUT, CFF_SOFTERROR,
  CFF_HARDERROR, CFF_PROGERROR
}
 Cooperative File Functions Status Cooperative file functions retunrs this os-independent high level status code to inform the caller about the status of the operation, and give the caller the ability to take corrective actions indipendently from operating system error codes. More...

enum  SeekWhence { SW_FROM_BEGIN = 0, SW_FROM_CUR = 1, SW_FROM_CURENT = 1, SW_FROM_END = 2 }
 Position indicators for file seeks. More...


Typedef Documentation

typedef long long Wefts::file_size_t
 

The longest integer available on the platform.

typedef OSFileFuncWin Wefts::OSFileFunc
 

Definition that hooks COFFEE for Windows in your application.


Enumeration Type Documentation

enum Wefts::CffStatus
 

Cooperative File Functions Status Cooperative file functions retunrs this os-independent high level status code to inform the caller about the status of the operation, and give the caller the ability to take corrective actions indipendently from operating system error codes.

Theoretically, this would leave operating system error codes only to be used for logging/reporting to use reasons, but if the application still needs to know why the underlying system reported a failure, the OS specific error can be accessed with i.e. OSFileFuncBase::OSerrorCode(); it can be directly used if the application is not meant to be portable, or it's meaning can be decoded in ifthef OS_TYPE sections, or by subclasses implementing this semantic.

Enumeration values:
CFF_DONE  Operation completed.
CFF_WAITING  Operation cannot be completed immediately...

...but up to date everything is fine.

CFF_TIMEDOUT  Timed out.

There is no phisical error (up to date), but a requested timeout has expired.

As CffStatus is an ordered enum, CFF_WAITING acts as a separator between errors and success (also partial) reports; every CffStatus greater than CFF_WAITING is an error, while any status equal or below CFF_WAITING is a success (or partial success).

CFF_SOFTERROR  Soft error.

There is an error that is catalogued as "soft": usually, this means that operation failed temporarily (i.e. failed to acquire an exclusive lock on an existing file).

CFF_HARDERROR  Hard error.

There is an error that is catalogued as "hard": the operation failed hopelessy.

CFF_PROGERROR  Program's error.

The program is misbehaving, i.e. passing invalid parameters, or invalid file names, or any other thing that should have not happened.

Usually, this should rise an exception, but we don't as the error may be caused with the cooperation of the user. In example, if the user enters a unexisting filename that the program tires to open, the error returned will be CFF_HARDERROR, but if she enters an invalid filename, the error will be CFF_PROGERROR. Anyhow, the program may use this information to feedback the user, so it is not advisable to break the program flow with an exception.

Subclasses of the OS specific COFFEE implementation may rise an exception instead of returning this error in some situation, if they wants to.

enum Wefts::CreateMode
 

Creation modes.

This creation modes are meant to be as portable as possible, and to be just an "indication" for the underlying OS operation on how to create a file. Applications that need a greater control over file creation attribute, and that not need to coordinate file creation with Wefts++, may create the file and then pass the descriptor to the OSFileFunc class they wish to use. Refer to the os-specific OSFileFunc documentation to know what kind of OS-Level file descriptor are accepted.

Also, refer to os-specific implementation documentation to know how this reuqest are interpreted and passed to the underlying system.

Note:
Also if the creation modes mimics the names of known filesystem attributes, they do not necessarily map directly to the attribute they refer to; also they cannot be mixed with an bitwise OR operator.
Enumeration values:
CM_ARCHIVE  Create as a standard archive.
CM_SYSTEM  Create as system-relevant file.
CM_EXECUTABLE  Create a file meant to be executed.

Implementations will behave so that OM_SYSTEM is considered a subset of OM_EXECUTABLE capabilites given to the file. That is, a file created with OM_EXECUTABLE should have all the characteristics of a OM_SYSTEM file, where applicable.

CM_PRIVATE  Creates a file meant to be used only by the creator.
CM_PRIVATE_EX  Creates a file meant to be used or executed only by the creator.

enum Wefts::LockMode
 

Basic locking schemes used by various systems at open time.

Enumeration values:
LM_SHARED 
LM_SHARED_RO 
LM_EXCLUSIVE 

enum Wefts::OpenMode
 

Basic open modes used by various systems.

Enumeration values:
OM_RO  To open the file in read-only mode.
OM_WO  To open the file in write-only mode.
OM_RW  To open the file in read-write mode.
OM_TRUNC_WO  To open the file in write-only mode.

The file is truncated it at beginning if it is not empty. A file open with this flag should not be read nor seeked; the unterlying system may or may not support it.

OM_TRUNC_RW  To open the file in read-write mode.

The file is truncated it at beginning if it is not empty. A file open with this flag should not be read nor seeked; the unterlying system may or may not support it.

OM_APPEND_WO  To open for write-only and position the file pointer at bottom.
OM_APPEND_RW  To open for read-write and position the file pointer at bottom.

enum Wefts::SeekWhence
 

Position indicators for file seeks.

Enumeration values:
SW_FROM_BEGIN 
SW_FROM_CUR 
SW_FROM_CURENT 
SW_FROM_END 


Generated on Mon Dec 22 04:12:36 2003 for Wefts by doxygen1.2.18