System documentation of the GNU Image-Finding Tool

Public Member Functions
CAccessorImplementation Class Reference

CAccessorImplementation - a base class for everything accessing a GIFT database. More...

#include <CAccessorImplementation.h>

Inheritance diagram for CAccessorImplementation:
CAccessor CAcHierarchy CAcURL2FTS CAcInvertedFile CAcIFFileSystem

List of all members.

Public Member Functions

virtual operator bool () const =0
 Is this accessor up and working?
virtual string IDToURL (TID inID) const
 Translate a DocumentID to a URL (for output)
virtual pair< bool,
CAccessorElement
IDToAccessorElement (TID inID) const
 Translate a DocumentID to an accessor Element.
virtual pair< bool, TID > URLToID (const string &inURL) const
 Translate an URL to its document ID.
void getAllIDs (list< TID > &) const
 This is useful for making lists of which images are present in a database etc.
void getAllAccessorElements (list< CAccessorElement > &) const
 List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file.
void getRandomIDs (list< TID > &, list< TID >::size_type) const
 get a given number of random AccessorElement's
void getRandomAccessorElements (list< CAccessorElement > &outResult, list< CAccessorElement >::size_type inSize) const
 For drawing random sets.
int size () const
 The number of images in this accessor.
- Public Member Functions inherited from CAccessor
virtual ~CAccessor ()
 virtual accessor for clean destruction
virtual CXMLElementprepareDatabase ()
 If a new collection is created during runtime, this function prepares the indexing structures such that they are able to accept new objects.
virtual bool isPreparedDatabase () const
 Is the database accessed by this accessor prepared? In other words: is there an index structure to access?

Protected Attributes

for fast access...
string_TID_map mURLToID
 map the url of an image to the id of this image
TID_CAccessorElement_map mIDToAccessorElement
 maps the ID of an image to the URL of this image

Additional Inherited Members

- Protected Member Functions inherited from CAccessor
virtual void dummy () const
 without this function things like upcasting etc.

Detailed Description

CAccessorImplementation - a base class for everything accessing a GIFT database.

at present this will be either an inverted file or a TrackingGIFT accessor. in the future this might be an SQL database or Monet??

modification history:

WM 19990804 created file

compiler defines used:


Member Function Documentation

void CAccessorImplementation::getAllIDs ( list< TID > &  ) const
virtual

This is useful for making lists of which images are present in a database etc.

List of the IDs of all documents present in the accessor file

Implements CAccessor.

Reimplemented in CAcIFFileSystem.

void CAccessorImplementation::getRandomAccessorElements ( list< CAccessorElement > &  outResult,
list< CAccessorElement >::size_type  inSize 
) const
virtual

For drawing random sets.

Why is this part of an CAccessorImplementation? The way the accessor is organised might influence the way random sets can be drawn. At present everything happens in RAM, but we do not want to be fixed on that.

Parameters:
inoutResultListthe list which will contain the result
inSizethe desired size of the inoutResultList

Implements CAccessor.

Reimplemented in CAcIFFileSystem.

void CAccessorImplementation::getRandomIDs ( list< TID > &  ,
list< TID >::size_type   
) const
virtual

get a given number of random AccessorElement's

Parameters:
inoutResultListthe list which will contain the result
inSizethe desired size of the inoutResultList

Implements CAccessor.

Reimplemented in CAcIFFileSystem.

virtual pair<bool,CAccessorElement> CAccessorImplementation::IDToAccessorElement ( TID  inID) const
virtual

Translate a DocumentID to an accessor Element.

Implements CAccessor.

Reimplemented in CAcIFFileSystem.

virtual string CAccessorImplementation::IDToURL ( TID  inID) const
virtual

Translate a DocumentID to a URL (for output)

Implements CAccessor.

Reimplemented in CAcIFFileSystem, CAcInvertedFile, and CAcInvertedFile.

virtual CAccessorImplementation::operator bool ( ) const
pure virtual

Is this accessor up and working?

Implements CAccessor.

Implemented in CAcIFFileSystem, CAcHierarchy, and CAcURL2FTS.

virtual pair<bool,TID> CAccessorImplementation::URLToID ( const string &  inURL) const
virtual

Translate an URL to its document ID.

Implements CAccessor.

Reimplemented in CAcIFFileSystem, CAcInvertedFile, and CAcInvertedFile.


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

Need for discussion? Want to contribute? Contact
help-gift@gnu.org Generated using Doxygen