Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

FileStyle Class Reference

Inheritance diagram for FileStyle:

ConduitStyle List of all members.

Public Types

enum  Open { Exists = 0, Create, Truncate, Append }
enum  Share { Read = 0, Write, ReadWrite }
enum  Cache { None = 0x00, Random = 0x01, Stream = 0x02, WriteThru = 0x04 }

Public Member Functions

 this (Access access, Open open=Open.Exists, Share share=Share.Read, Cache cache=Cache.None)
Open open ()
Share share ()
Cache cache ()

Static Public Member Functions

static this ()

Static Public Attributes

static FileStyle ReadExisting
static FileStyle WriteTruncate
static FileStyle WriteAppending
static FileStyle ReadWriteCreate
static FileStyle ReadWriteExisting

Private Types

enum  Access { Read = 0x01, Write = 0x02, ReadWrite = 0x03 }

Private Member Functions

 this (Access access)
Access access ()

Private Attributes

Open m_open
Share m_share
Cache m_cache

Detailed Description

Defines how a file should be opened. You can use the predefined instances, or create specializations for your own needs.

Definition at line 50 of file FileStyle.d.


Member Enumeration Documentation

enum Open
 

Enumeration values:
Exists 
Create 
Truncate 
Append 

Definition at line 68 of file FileStyle.d.

enum Share
 

Enumeration values:
Read  Expose common instances of ConduitStyle
Write  Expose common instances of ConduitStyle
ReadWrite  Expose common instances of ConduitStyle

Definition at line 79 of file FileStyle.d.

enum Cache
 

Enumeration values:
None 
Random 
Stream 
WriteThru 

Definition at line 89 of file FileStyle.d.

enum Access [inherited]
 

Declare the basic styles for a Conduit

Enumeration values:
Read 
Write 
ReadWrite 

Definition at line 57 of file ConduitStyle.d.


Member Function Documentation

static this  )  [inline, static]
 

Construct a set of typical FileStyle instances.

Reimplemented from ConduitStyle.

Definition at line 110 of file FileStyle.d.

References FileStyle, ReadExisting, ReadWriteCreate, ReadWriteExisting, WriteAppending, and WriteTruncate.

this Access  access,
Open  open = Open.Exists,
Share  share = Share.Read,
Cache  cache = Cache.None
[inline]
 

Construct a FileStyle with the given properties. Defaults are set to indicate the file should exist, will be opened for read-only sharing, and should not be cache optimized in any special manner by the OS.

Definition at line 128 of file FileStyle.d.

References cache(), m_cache, m_open, m_share, open(), and share().

Open open  )  [inline]
 

Return the style of opening

Definition at line 145 of file FileStyle.d.

References m_open.

Referenced by FileConduit::VersionPosix::open(), FileConduit::VersionWin32::open(), and this().

Share share  )  [inline]
 

Return the style of sharing

Definition at line 156 of file FileStyle.d.

References m_share.

Referenced by FileConduit::VersionPosix::open(), FileConduit::VersionWin32::open(), and this().

Cache cache  )  [inline]
 

Return the style of caching

Definition at line 167 of file FileStyle.d.

References m_cache.

Referenced by FileConduit::VersionWin32::open(), and this().

this Access  access  )  [inline, inherited]
 

Construct a ConduitStyle with the given access

Definition at line 94 of file ConduitStyle.d.

References ConduitStyle::access(), and ConduitStyle::m_access.

Access access  )  [inline, inherited]
 

Return the access attribute of this ConduitStyle

Definition at line 105 of file ConduitStyle.d.

References ConduitStyle::m_access.

Referenced by Conduit::isReadable(), Conduit::isWritable(), FileConduit::VersionPosix::open(), FileConduit::VersionWin32::open(), VersionMapped::MappedFile::VersionWin32::this(), and ConduitStyle::this().


Member Data Documentation

FileStyle ReadExisting [static]
 

Instantiate some common styles

Definition at line 58 of file FileStyle.d.

Referenced by this().

FileStyle WriteTruncate [static]
 

Instantiate some common styles

Definition at line 58 of file FileStyle.d.

Referenced by this().

FileStyle WriteAppending [static]
 

Instantiate some common styles

Definition at line 58 of file FileStyle.d.

Referenced by this().

FileStyle ReadWriteCreate [static]
 

Instantiate some common styles

Definition at line 58 of file FileStyle.d.

Referenced by this().

FileStyle ReadWriteExisting [static]
 

Instantiate some common styles

Definition at line 58 of file FileStyle.d.

Referenced by this().

Open m_open [private]
 

Definition at line 100 of file FileStyle.d.

Referenced by open(), and this().

Share m_share [private]
 

Definition at line 101 of file FileStyle.d.

Referenced by share(), and this().

Cache m_cache [private]
 

Definition at line 102 of file FileStyle.d.

Referenced by cache(), and this().


The documentation for this class was generated from the following file:
Generated on Mon Nov 14 10:59:52 2005 for Mango by  doxygen 1.4.0