ISupportFile Class Reference

Formal Interface for managing arbitrary files that will be added to the HDF5 file. More...

Inherited by MXASupportFile.

Inheritance diagram for ISupportFile:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::vector< ISupportFile::Pointer > Container

Public Member Functions

 MXA_SHARED_POINTERS (ISupportFile)
 ISupportFile ()
virtual ~ISupportFile ()
virtual void setFileSystemPath (const std::string &filesystemPath)=0
 Sets the path to the file on the local filesystem.
virtual std::string getFileSystemPath ()=0
 Returns the path to the file on the local filesystem.
virtual void setFileType (const std::string &fileType)=0
 Sets the File type as a hint for viewers on how to render the file if possible. The default is "Binary". You may also use "Text".
virtual std::string getFileType ()=0
 Returns the file type.
virtual uint8 * getFilePointer (uint64 offset)=0
 Returns a pointer to the specified offset in the cached file. Note that if the file has NOT been read then this will return a NULL pointer.
virtual uint64 getFileSize ()=0
 Returns the size of the file which could be Zero if the file has NOT been read or can not be read.
virtual bool isFileCached ()=0
 Has the file been read into memory.
virtual void flushCachedFile ()=0
 If the file is residing in memory, free the memory by unloading the file from memory.
virtual int32 readFromFileSystem ()=0
 Read from the filesystem and cache the file into memory. Careful when doing this with large files.
virtual void setIndex (int index)=0
 Sets the internal value used by the MXA API to store the file in teh HDF5 file.
virtual int getIndex ()=0
 Returns the internal index used by the MXA API to store the file in the HDF5 file.
virtual int32 readFromMXAFile ()=0
 Reads file contents from the HDF5 file into memory. From this point you can write the file out to the local filesystem if needed.

Private Member Functions

 ISupportFile (const ISupportFile &)
void operator= (const ISupportFile &)

Detailed Description

Formal Interface for managing arbitrary files that will be added to the HDF5 file.

Author:
Mike Jackson for BlueQuartz Software
Date:
Sep 23, 2008
Version:
Revision
1.2


Member Typedef Documentation

typedef std::vector<ISupportFile::Pointer> ISupportFile::Container


Constructor & Destructor Documentation

ISupportFile::ISupportFile (  )  [inline]

virtual ISupportFile::~ISupportFile (  )  [inline, virtual]

ISupportFile::ISupportFile ( const ISupportFile  )  [private]


Member Function Documentation

ISupportFile::MXA_SHARED_POINTERS ( ISupportFile   ) 

virtual void ISupportFile::setFileSystemPath ( const std::string &  filesystemPath  )  [pure virtual]

Sets the path to the file on the local filesystem.

Parameters:
filesystemPath The path to the file on the local filesystem

Implemented in MXASupportFile.

virtual std::string ISupportFile::getFileSystemPath (  )  [pure virtual]

Returns the path to the file on the local filesystem.

Implemented in MXASupportFile.

virtual void ISupportFile::setFileType ( const std::string &  fileType  )  [pure virtual]

Sets the File type as a hint for viewers on how to render the file if possible. The default is "Binary". You may also use "Text".

Parameters:
fileType "Binary" or "Text"

Implemented in MXASupportFile.

virtual std::string ISupportFile::getFileType (  )  [pure virtual]

Returns the file type.

Implemented in MXASupportFile.

virtual uint8* ISupportFile::getFilePointer ( uint64  offset  )  [pure virtual]

Returns a pointer to the specified offset in the cached file. Note that if the file has NOT been read then this will return a NULL pointer.

Parameters:
offset The offset into the cached file to read.
Returns:
Pointer to the data at the specified offset.

Implemented in MXASupportFile.

virtual uint64 ISupportFile::getFileSize (  )  [pure virtual]

Returns the size of the file which could be Zero if the file has NOT been read or can not be read.

Returns:
Size of the file.

Implemented in MXASupportFile.

virtual bool ISupportFile::isFileCached (  )  [pure virtual]

Has the file been read into memory.

Returns:

Implemented in MXASupportFile.

virtual void ISupportFile::flushCachedFile (  )  [pure virtual]

If the file is residing in memory, free the memory by unloading the file from memory.

Implemented in MXASupportFile.

virtual int32 ISupportFile::readFromFileSystem (  )  [pure virtual]

Read from the filesystem and cache the file into memory. Careful when doing this with large files.

Returns:
Error code. Negative value indicates error.

Implemented in MXASupportFile.

virtual void ISupportFile::setIndex ( int  index  )  [pure virtual]

Sets the internal value used by the MXA API to store the file in teh HDF5 file.

Parameters:
index The index to use.

Implemented in MXASupportFile.

virtual int ISupportFile::getIndex (  )  [pure virtual]

Returns the internal index used by the MXA API to store the file in the HDF5 file.

Implemented in MXASupportFile.

virtual int32 ISupportFile::readFromMXAFile (  )  [pure virtual]

Reads file contents from the HDF5 file into memory. From this point you can write the file out to the local filesystem if needed.

Returns:
Error code. Negative is an error.

Implemented in MXASupportFile.

void ISupportFile::operator= ( const ISupportFile  )  [private]


The documentation for this class was generated from the following file:
Generated on Tue Nov 17 18:43:14 2009 for MXADataModel by  doxygen 1.5.2