FILE_LEGACY_HANDLE Class Reference

Class to provide open/close access as "handle" (int) for 3rd-party libraries. More...

#include <mi32/filelegacy.h>

List of all members.

Public Member Functions

 FILE_LEGACY_HANDLE ()
 ~FILE_LEGACY_HANDLE ()
void Close ()
int GetHandle () const
bool IsOpen () const
ERRVALUE Open (const FILEPATH &filepath, FILE_ACCESS access=FILE_ACCESS_Read, FILE_SHARE share=FILE_SHARE_Auto)
 operator int () const

Detailed Description

Class to provide open/close access as "handle" (int) for 3rd-party libraries.

Provides implicit cast to int handle.


Constructor & Destructor Documentation

FILE_LEGACY_HANDLE::FILE_LEGACY_HANDLE (  ) 

Default constructor.

FILE_LEGACY_HANDLE::~FILE_LEGACY_HANDLE (  ) 

Destructor, closes file if open.


Member Function Documentation

void FILE_LEGACY_HANDLE::Close (  ) 

Close file if open.

int FILE_LEGACY_HANDLE::GetHandle (  )  const [inline]

Get legacy handle.

bool FILE_LEGACY_HANDLE::IsOpen (  )  const [inline]

Determine if file is currently open.

ERRVALUE FILE_LEGACY_HANDLE::Open ( const FILEPATH filepath,
FILE_ACCESS  access = FILE_ACCESS_Read,
FILE_SHARE  share = FILE_SHARE_Auto 
)

Open or create specified file.

If file is already open the previous file will be closed. Note that sharing modes are not supported on all platforms and filesystems. If specified sharing mode is not supported then will open with SHARE_Any.

Parameters:
filepath Path to file to be opened or created
access Desired access
share Sharing mode
FILE_LEGACY_HANDLE::operator int (  )  const [inline]

Cast to legacy "handle".


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

Generated on Sun Oct 7 21:33:21 2012 for TNTsdk 2012 by  doxygen 1.6.1