IsisDlm  Version 0.2
ISISDLM::FileRepository Class Reference

#include <FileRepository.h>

Collaboration diagram for ISISDLM::FileRepository:

Public Member Functions

int size () const
iFile::Iid addCube (const std::string &filename, Isis::Cube *cube, bool readonly=true)
iFile::Iid addPvl (const std::string &filename, Isis::Pvl *pvl, bool readonly=true)
iFilegetFile (iFile::Iid id)
iFilegetNthFile (int nth=0)
bool removeFile (iFile::Iid id)
void Purge ()

Static Public Member Functions

static FileRepositoryInstance ()

Static Public Attributes

static const char *const ID = "$Revision: 1.3 $ $Date: 2004/11/02 15:38:53 $"
 Class version.

Protected Member Functions

 FileRepository ()

Private Member Functions

 ~FileRepository ()
 FileRepository (const FileRepository &k)
FileRepository operator= (const FileRepository &k)

Private Attributes

std::list< iFile * > _files
 List of maintained files.

Static Private Attributes

static FileRepository_instance = 0
 The all important pointer to itself.

Detailed Description

ISIS DLM File repository This class follows the classic Singleton pattern by the Gang Of Four (GOF). A discussion of this technique can be studied in their book Design Patterns: Elements of Reusable Object-Oriented Software.

This particular class serves as a holding tank for ISIS cube files and PVL like files. Although ISIS files have a PVL label, I distinguish between the two because they require different management schemes.

Isis labels are managed in real time in that all label manipulation is immediate. Any change that results in a modification of the the label content is immediately reflected in the file label (?).

PVL labels are contained within this repository until they are explicitly closed by the user or the program terminates and a purging of the repository is performed.

Constructor & Destructor Documentation

ISISDLM::FileRepository::FileRepository ( )
inlineprotected

Referenced by Instance().

ISISDLM::FileRepository::~FileRepository ( )
private

References Purge().

Here is the call graph for this function:

ISISDLM::FileRepository::FileRepository ( const FileRepository k)
private

Member Function Documentation

iFile::Iid ISISDLM::FileRepository::addCube ( const std::string &  filename,
Isis::Cube *  cube,
bool  readonly = true 
)
iFile::Iid ISISDLM::FileRepository::addPvl ( const std::string &  filename,
Isis::Pvl *  pvl,
bool  readonly = true 
)

References _files, and ISISDLM::iFile::getId().

Referenced by ISISDLM::isis_create().

Here is the call graph for this function:

iFile * ISISDLM::FileRepository::getNthFile ( int  nth = 0)

References _files.

Referenced by ISISDLM::isis_query().

FileRepository * ISISDLM::FileRepository::Instance ( )
static

The unique access method This method is the one and only one method that provides access to this object. It maintains an instance of itself by checking to see if the _instance variable is defined. If not it creates an instance of itself and returns a pointer.

Note that the destructor is private to disallow user to delete it. This is forcibly maintained by the compiler.

References _instance, and FileRepository().

Referenced by ISISDLM::isis_close(), ISISDLM::isis_create(), ISISDLM::isis_open(), ISISDLM::isis_query(), ISISDLM::isis_query_key(), ISISDLM::isis_read(), ISISDLM::isis_read_blob(), ISISDLM::isis_read_brick(), ISISDLM::isis_read_image(), ISISDLM::isis_write(), and ISISDLM::isis_write_image().

Here is the call graph for this function:

FileRepository ISISDLM::FileRepository::operator= ( const FileRepository k)
private
void ISISDLM::FileRepository::Purge ( )

References _files.

Referenced by IsisTerminate(), and ~FileRepository().

bool ISISDLM::FileRepository::removeFile ( iFile::Iid  id)

References _files.

Referenced by ISISDLM::isis_close().

int ISISDLM::FileRepository::size ( ) const
inline

References _files.

Referenced by ISISDLM::isis_query().

Member Data Documentation

std::list<iFile *> ISISDLM::FileRepository::_files
private

List of maintained files.

Referenced by addCube(), addPvl(), getFile(), getNthFile(), Purge(), removeFile(), and size().

FileRepository * ISISDLM::FileRepository::_instance = 0
staticprivate

The all important pointer to itself.

Initialize the internal instance of itself.

Referenced by Instance().

const char *const ISISDLM::FileRepository::ID = "$Revision: 1.3 $ $Date: 2004/11/02 15:38:53 $"
static

Class version.


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