OOFILE  1.9
Public Member Functions | Protected Attributes | List of all members
OOFCTResource Class Reference

To allow access to ct resources. More...

#include <oofCTRes.h>

Collaboration diagram for OOFCTResource:
Collaboration graph
[legend]

Public Member Functions

void closeFile ()
 Close the resourcefile. More...
 
unsigned long dataLength ()
 calculate the length of the variable length data of a ctree resource just loaded. More...
 
void describe (ostream &)
 
const void * getResourcePtr (COUNT resMode)
 
void loadData (ostringstream resourceString, const oofString resourceName="")
 
void loadData (const oofString &)
 
void loadData (ostringstream resourceString)
 
void loadResource (ULONG resType, ULONG resID, COUNT resMode)
 Load a resource identified by resType & resID from the file opened by the method openFile of this object or set at construct time. More...
 
void loadResource (COUNT datNo, ULONG resType, ULONG resID, COUNT resMode)
 Load a resource identified by resType resID using resMode from the open file pointed to by datNo. More...
 
void loadResource (COUNT resMode)
 
void loadResource (ULONG resType)
 Load a resource identified by resType from the file opened by the method openFile of this object or set at construct time. More...
 
void loadResource (oofString &, oofString &ext, oofString &iExt)
 
void newFile (const oofString &inFile, const oofString &connectionName)
 
 OOFCTResource ()
 
 OOFCTResource (ULONG type, ULONG id)
 
 OOFCTResource (oofString &, oofString &ext, oofString &iExt)
 
 OOFCTResource (COUNT datno, COUNT resMode)
 
 OOFCTResource (COUNT datno)
 
void openFile (const oofString &inFile, const oofString &connectionName)
 open the resource file with name inFile. More...
 
void openFile (oofFileRef &inFile)
 Open a CT file to get a resource. More...
 
void openIFile (const oofString &inFile, const oofString &connectionName)
 Open a CT ISAM file to get a resource. More...
 
void resource (std::ostream &resourceString, const oofString &resourceName="")
 
const char * resource ()
 return a pointer to the data of this resource. More...
 
void saveResource ()
 Load a resource identified by resType from the file opened by the method openFile of this object or set at construct time. More...
 
void saveResource (COUNT datno)
 Write the resource to the file identified by datno. More...
 
 ~OOFCTResource ()
 

Protected Attributes

VOID * mBuffer
 
VRLEN mBufferLength
 
COUNT mDataNo
 
ctResInfo mResLenInfo
 
ULONG mResourceNumber
 
ULONG mResourceType
 

Detailed Description

To allow access to ct resources.

Definition at line 66 of file oofCTRes.h.

Constructor & Destructor Documentation

OOFCTResource::OOFCTResource ( )

Definition at line 269 of file oofCTRes.cpp.

References mBuffer, and mDataNo.

OOFCTResource::OOFCTResource ( ULONG  type,
ULONG  id 
)

Definition at line 301 of file oofCTRes.cpp.

OOFCTResource::OOFCTResource ( oofString fileName,
oofString ext,
oofString iExt 
)

Definition at line 318 of file oofCTRes.cpp.

References loadResource().

OOFCTResource::OOFCTResource ( COUNT  datno,
COUNT  resMode 
)

dg debug 20001023 i think this is wrong

Definition at line 287 of file oofCTRes.cpp.

References loadResource().

OOFCTResource::OOFCTResource ( COUNT  datno)
OOFCTResource::~OOFCTResource ( )

Definition at line 332 of file oofCTRes.cpp.

References mBuffer.

Member Function Documentation

void OOFCTResource::closeFile ( )

Close the resourcefile.

Definition at line 645 of file oofCTRes.cpp.

References mDataNo, and RAISE_EXCEPTION.

Referenced by newFile(), openFile(), and openIFile().

unsigned long OOFCTResource::dataLength ( )

calculate the length of the variable length data of a ctree resource just loaded.

Definition at line 855 of file oofCTRes.cpp.

References mBuffer, and mBufferLength.

void OOFCTResource::describe ( ostream &  )
const void * OOFCTResource::getResourcePtr ( COUNT  resMode)
void OOFCTResource::loadData ( ostringstream  resourceString,
const oofString  resourceName = "" 
)
void OOFCTResource::loadData ( const oofString )
void OOFCTResource::loadData ( ostringstream  resourceString)
void OOFCTResource::loadResource ( ULONG  resType,
ULONG  resID,
COUNT  resMode 
)

Load a resource identified by resType & resID from the file opened by the method openFile of this object or set at construct time.

Definition at line 802 of file oofCTRes.cpp.

References mDataNo, mResourceNumber, and mResourceType.

Referenced by loadResource(), and OOFCTResource().

void OOFCTResource::loadResource ( COUNT  datNo,
ULONG  resType,
ULONG  resID,
COUNT  resMode 
)

Load a resource identified by resType resID using resMode from the open file pointed to by datNo.

Definition at line 788 of file oofCTRes.cpp.

References loadResource(), mDataNo, mResourceNumber, and mResourceType.

void OOFCTResource::loadResource ( COUNT  resMode)
void OOFCTResource::loadResource ( ULONG  resType)

Load a resource identified by resType from the file opened by the method openFile of this object or set at construct time.

Definition at line 776 of file oofCTRes.cpp.

References loadResource(), mDataNo, and mResourceType.

void OOFCTResource::loadResource ( oofString ,
oofString ext,
oofString iExt 
)
void OOFCTResource::newFile ( const oofString inFile,
const oofString connectionName 
)
void OOFCTResource::openFile ( const oofString inFile,
const oofString connectionName 
)

open the resource file with name inFile.

Definition at line 396 of file oofCTRes.cpp.

References closeFile(), oofDirectory::gotoDirectory(), mDataNo, RAISE_EXCEPTION, and OOF_ctreeBackend::sFileMode.

void OOFCTResource::openFile ( oofFileRef inFile)

Open a CT file to get a resource.

mIFIL.dreclen = 2; mIFIL.dxtdsiz = 0;//kDataExtendSize; mIFIL.dfilmod = OOF_ctreeBackend::sFileMode | ctFIXED; mIFIL.dnumidx = 0; // try and read withou the indexes mIFIL.ixtdsiz = 0; mIFIL.ifilmod = 0; mIFIL.ix = 0; mIFIL.rfstfld = 0; mIFIL.rlstfld = 0;

Definition at line 465 of file oofCTRes.cpp.

References oofString::charsForOldInterfacesNotWriting(), closeFile(), oofFileRef::filename(), oofFileRef::gotoParentDirectory(), mDataNo, and RAISE_EXCEPTION.

void OOFCTResource::openIFile ( const oofString inFile,
const oofString connectionName 
)

Open a CT ISAM file to get a resource.

Definition at line 568 of file oofCTRes.cpp.

References closeFile(), oofDirectory::gotoDirectory(), mDataNo, RAISE_EXCEPTION, and OOF_ctreeBackend::sFileMode.

void OOFCTResource::resource ( std::ostream &  resourceString,
const oofString resourceName = "" 
)
const char * OOFCTResource::resource ( )

return a pointer to the data of this resource.

Definition at line 676 of file oofCTRes.cpp.

References mBuffer.

void OOFCTResource::saveResource ( )

Load a resource identified by resType from the file opened by the method openFile of this object or set at construct time.

Definition at line 941 of file oofCTRes.cpp.

References mBuffer, mBufferLength, mDataNo, and RAISE_EXCEPTION.

void OOFCTResource::saveResource ( COUNT  datno)

Write the resource to the file identified by datno.

If the resource exists update it else create a new resource

Definition at line 909 of file oofCTRes.cpp.

References mBuffer, mBufferLength, and RAISE_EXCEPTION.

Member Data Documentation

VOID* OOFCTResource::mBuffer
protected

Definition at line 137 of file oofCTRes.h.

Referenced by dataLength(), OOFCTResource(), resource(), saveResource(), and ~OOFCTResource().

VRLEN OOFCTResource::mBufferLength
protected

Definition at line 138 of file oofCTRes.h.

Referenced by dataLength(), and saveResource().

COUNT OOFCTResource::mDataNo
protected
ctResInfo OOFCTResource::mResLenInfo
protected

Definition at line 142 of file oofCTRes.h.

Referenced by getResourcePtr().

ULONG OOFCTResource::mResourceNumber
protected

Definition at line 140 of file oofCTRes.h.

Referenced by loadResource().

ULONG OOFCTResource::mResourceType
protected

Definition at line 139 of file oofCTRes.h.

Referenced by loadResource().


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