OOFILE  1.9
Public Member Functions | List of all members

Wrapper to read c-tree Plus cross-platform resources. More...

#include <oofCTRes.h>

Public Member Functions

 ctResInfo (ULONG, ULONG)
 Read header of a ct resource identified by resType & resID. More...
 
 ctResInfo (const char *)
 Read header of a ct resource identified by resName. More...
 
 ctResInfo ()
 
const void * infoPtr () const
 
void len (ULONG)
 
ULONG len () const
 
const void * lenPtr () const
 get the resLength field of the resource header. More...
 
void name (const char *)
 Set the name field of the resource header. More...
 
const char * name () const
 Set the name field of the resource header. More...
 
const void * namePtr () const
 get the resName field of the resource header. More...
 
void number (ULONG)
 
ULONG number () const
 
const void * numberPtr () const
 get the resID field of the resource header. More...
 
void readInfo (COUNT datNo)
 
void readInfo (COUNT datNo, char *name)
 Read the resource header of the the named resource from file number datNo. More...
 
void readInfo (COUNT datNo, ULONG type, COUNT resMode=0)
 Read the resource header of the resource identified by the type. More...
 
void readInfo (COUNT datNo, COUNT resMode)
 
void type (ULONG)
 
ULONG type () const
 
const void * typePtr () const
 get the name field of the resource header. More...
 

Detailed Description

Wrapper to read c-tree Plus cross-platform resources.

Used in reading schema stored in database files.

Definition at line 21 of file oofCTRes.h.

Constructor & Destructor Documentation

ctResInfo::ctResInfo ( ULONG  resType,
ULONG  resID 
)

Read header of a ct resource identified by resType & resID.

Todo:
Investigate the resType concept and cross-platform safety especially if use 4 character codes - suspect need byteswapper!

Definition at line 33 of file oofCTRes.cpp.

ctResInfo::ctResInfo ( const char *  resName)

Read header of a ct resource identified by resName.

Default ctor.

Todo:
probably remove this or put sensible defaults in place.
Note
use of oofString members means all init safely by default to empty strings.

Definition at line 46 of file oofCTRes.cpp.

ctResInfo::ctResInfo ( )

Definition at line 60 of file oofCTRes.cpp.

Member Function Documentation

const void * ctResInfo::infoPtr ( ) const

Definition at line 214 of file oofCTRes.cpp.

Referenced by OOFCTResource::getResourcePtr().

void ctResInfo::len ( ULONG  )
ULONG ctResInfo::len ( ) const
const void * ctResInfo::lenPtr ( ) const

get the resLength field of the resource header.

Definition at line 194 of file oofCTRes.cpp.

Referenced by OOFCTResource::getResourcePtr().

void ctResInfo::name ( const char *  theName)

Set the name field of the resource header.

Definition at line 257 of file oofCTRes.cpp.

const char * ctResInfo::name ( ) const

Set the name field of the resource header.

Definition at line 162 of file oofCTRes.cpp.

Referenced by readInfo().

const void * ctResInfo::namePtr ( ) const

get the resName field of the resource header.

Definition at line 205 of file oofCTRes.cpp.

Referenced by OOFCTResource::getResourcePtr().

void ctResInfo::number ( ULONG  )
ULONG ctResInfo::number ( ) const
const void * ctResInfo::numberPtr ( ) const

get the resID field of the resource header.

Definition at line 182 of file oofCTRes.cpp.

void ctResInfo::readInfo ( COUNT  datNo)
void ctResInfo::readInfo ( COUNT  datNo,
ULONG  type,
COUNT  resMode = 0 
)

Read the resource header of the resource identified by the type.

"type from the file identified by datNo using mode resMode

Parameters
resModeis optional

Definition at line 105 of file oofCTRes.cpp.

References LONG(), RAISE_EXCEPTION, and type().

void ctResInfo::readInfo ( COUNT  datNo,
COUNT  resMode 
)
void ctResInfo::type ( ULONG  )
ULONG ctResInfo::type ( ) const

Referenced by readInfo().

const void * ctResInfo::typePtr ( ) const

get the name field of the resource header.

Definition at line 172 of file oofCTRes.cpp.

Referenced by OOFCTResource::getResourcePtr().

Member Data Documentation

void ctResInfo::len

Return the length from the header read from a ctree file resource.

Set the length field of the resource header.

Definition at line 57 of file oofCTRes.h.

void ctResInfo::number

Return the ID from the header read from a ctree file resource.

Set the resID field of the resource header.

Definition at line 56 of file oofCTRes.h.

void ctResInfo::type

Return the length from the header read from a ctree file resource.

Set the type field of the resource header.

Definition at line 55 of file oofCTRes.h.


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