GEOCAT Class Reference

GeoSpatial Catalog class. More...

#include <mi32/geocat.h>

List of all members.

Classes

class  CONST_ITERATOR
 Iterator for searching the catalog. More...
class  RECORD
 A record in the catalog. More...

Public Member Functions

 GEOCAT ()
 ~GEOCAT ()
ERRVALUE AddMedia (const MISTRING &desc)
ERRVALUE BuildIndex ()
ERRVALUE Close ()
ERRVALUE ExcludeFolders (const FILEPATHLIST &list, bool AddExcludeFile)
void GetExcludeAllFolders (FILEPATHLIST &list)
void GetExcludeFolders (FILEPATHLIST &list)
const FILEPATHGetFilePath () const
ERRVALUE GetMediaList (MISTRINGLIST &list)
ERRVALUE GetRecord (const MISTRING &filepath, RECORD &record) const
ERRVALUE GetRecord (UINT32 id, RECORD &FileRecord) const
void GetScanFolders (FILEPATHLIST &list)
void IteratorBegin (CONST_ITERATOR &iterator) const
ERRVALUE Make (const FILEPATH &catalog)
ERRVALUE Open (const FILEPATH &catalog, bool bCreateIfNotFound=false, bool bOpenForWrite=false)
ERRVALUE PrescanDirectory (const FILEPATH &dir, STATUSCONTEXT &StatusContext, bool bScanSubDirs=true) const
ERRVALUE Remove (const RECORD &record)
ERRVALUE Remove (const FILEPATH &file)
ERRVALUE ScanDirectory (const FILEPATH &dir, STATUSCONTEXT *StatusContext=0, bool bScanSubDirs=true)
ERRVALUE ScanFile (const FILEPATH &file)
ERRVALUE SetScanFolders (const FILEPATHLIST &list)
ERRVALUE Write (RECORD &record)

Static Public Member Functions

static const SPATREF::COORDREFSYSGetCoordRefSys ()

Detailed Description

GeoSpatial Catalog class.

This class handles a catalog file.


Constructor & Destructor Documentation

GEOCAT::GEOCAT (  ) 

Default Constructor.

Doesn't open anything. Use Open or Make methods below.

GEOCAT::~GEOCAT (  ) 

Destructor.


Member Function Documentation

ERRVALUE GEOCAT::AddMedia ( const MISTRING desc  ) 

Add a media description to catalog.

ERRVALUE GEOCAT::BuildIndex (  ) 

Build index for location field.

ERRVALUE GEOCAT::Close (  ) 

Close the catalog.

ERRVALUE GEOCAT::ExcludeFolders ( const FILEPATHLIST list,
bool  AddExcludeFile 
)

Add folder to be excluded from searching.

static const SPATREF::COORDREFSYS& GEOCAT::GetCoordRefSys (  )  [static]

Get CRS for objects used in catalogs.

void GEOCAT::GetExcludeAllFolders ( FILEPATHLIST list  )  [inline]

Get list of folders that the geocatexlude file was found in.

void GEOCAT::GetExcludeFolders ( FILEPATHLIST list  )  [inline]

Get list of folders excluded for this catalog.

const FILEPATH& GEOCAT::GetFilePath (  )  const [inline]

Get path to geocatalog file.

ERRVALUE GEOCAT::GetMediaList ( MISTRINGLIST list  ) 
ERRVALUE GEOCAT::GetRecord ( const MISTRING filepath,
RECORD record 
) const

Retrieve the record for a given file given a location string pointing to the file.

Returns -1 if not found.

ERRVALUE GEOCAT::GetRecord ( UINT32  id,
RECORD FileRecord 
) const

Retrieve the record for a given file given it's ID.

Returns -1 if record not found.

void GEOCAT::GetScanFolders ( FILEPATHLIST list  )  [inline]
void GEOCAT::IteratorBegin ( CONST_ITERATOR iterator  )  const

Get iterator pointing to first item in the catalog.

ERRVALUE GEOCAT::Make ( const FILEPATH catalog  ) 

Create a catalog file.

ERRVALUE GEOCAT::Open ( const FILEPATH catalog,
bool  bCreateIfNotFound = false,
bool  bOpenForWrite = false 
)

Open a catalog file.

Catalog files have the extention ".gsc" for GeoSpatial Catalog May skip open mode parameter. Just open for read and the scan methods can change it to write as needed.

ERRVALUE GEOCAT::PrescanDirectory ( const FILEPATH dir,
STATUSCONTEXT StatusContext,
bool  bScanSubDirs = true 
) const

Does a prescan of the directory counting files to index.

ERRVALUE GEOCAT::Remove ( const RECORD record  ) 

Remove all references to given file from the catalog.

ERRVALUE GEOCAT::Remove ( const FILEPATH file  ) 

Remove all references to given file from the catalog.

If the file is really a directory, it will remove references to all files in the given directory.

ERRVALUE GEOCAT::ScanDirectory ( const FILEPATH dir,
STATUSCONTEXT StatusContext = 0,
bool  bScanSubDirs = true 
)

Scan all RVC files in a given directory.

Also scans the catalog for any files which were in this directory but are not there any more and deletes them from the catalog. If you want to provide status, call PrescanDirectory() to initialize the StatusContext

ERRVALUE GEOCAT::ScanFile ( const FILEPATH file  ) 

Scans an RVC file and adds or updates it's records in the catalog.

If already cataloged and time stamp agrees, it won't do anyting.

ERRVALUE GEOCAT::SetScanFolders ( const FILEPATHLIST list  ) 
ERRVALUE GEOCAT::Write ( RECORD record  ) 

Write a record.

If a record for the given object's ID already exists, it is updated. If the record does not exist, a new record is created, and the record's ID is updated.


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

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