System documentation of the GNU Image-Finding Tool

Public Member Functions | Protected Member Functions
CAccessor Class Reference

CAccessor - an abstract base class for everything accessing a GIFT database. More...

#include <CAccessor.h>

Inheritance diagram for CAccessor:
CAccessorImplementation CAcInvertedFile CAcHierarchy CAcURL2FTS CAcIFFileSystem 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 =0
 Translate a DocumentID to a URL (for output)
virtual pair< bool,
CAccessorElement
IDToAccessorElement (TID inID) const =0
 Translate a DocumentID to an accessor Element.
virtual pair< bool, TID > URLToID (const string &inURL) const =0
 Translate an URL to its document ID.
virtual void getAllIDs (list< TID > &) const =0
 This is useful for making lists of which images are present in a database etc.
virtual void getAllAccessorElements (list< CAccessorElement > &) const =0
 List of triplets (ID,imageURL,thumbnailURL) of all the documents present in the inverted file.
virtual void getRandomIDs (list< TID > &, list< TID >::size_type) const =0
 get a given number of random AccessorElement's
virtual void getRandomAccessorElements (list< CAccessorElement > &outResult, list< CAccessorElement >::size_type inSize) const =0
 For drawing random sets.
virtual int size () const =0
 The number of images in this accessor.
virtual ~CAccessor ()
 virtual accessor for clean destruction
Database Construction
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 Member Functions

virtual void dummy () const
 without this function things like upcasting etc.

Detailed Description

CAccessor - an abstract base class for everything accessing a GIFT database.

in the future this might be an SQL database or Monet??

modification history:

WM 19990804 created file

compiler defines used:


Member Function Documentation

virtual void CAccessor::dummy ( ) const [protected, virtual]

without this function things like upcasting etc.

won't work (see stroustrup for this)

virtual void CAccessor::getAllIDs ( list< TID > &  ) const [pure 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 inverted file

Implemented in CAcIFFileSystem, and CAccessorImplementation.

virtual void CAccessor::getRandomAccessorElements ( list< CAccessorElement > &  outResult,
list< CAccessorElement >::size_type  inSize 
) const [pure virtual]

For drawing random sets.

Why is this part of an CAccessor? 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

Implemented in CAcIFFileSystem, and CAccessorImplementation.

virtual void CAccessor::getRandomIDs ( list< TID > &  ,
list< TID >::size_type   
) const [pure virtual]

get a given number of random AccessorElement's

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

Implemented in CAcIFFileSystem, and CAccessorImplementation.

virtual pair<bool,CAccessorElement> CAccessor::IDToAccessorElement ( TID  inID) const [pure virtual]

Translate a DocumentID to an accessor Element.

Implemented in CAcIFFileSystem, and CAccessorImplementation.

virtual string CAccessor::IDToURL ( TID  inID) const [pure virtual]

Translate a DocumentID to a URL (for output)

Implemented in CAcIFFileSystem, CAcInvertedFile, CAccessorImplementation, and CAcInvertedFile.

virtual CAccessor::operator bool ( ) const [pure virtual]

Is this accessor up and working?

Implemented in CAcIFFileSystem, CAcHierarchy, CAcURL2FTS, and CAccessorImplementation.

virtual CXMLElement* CAccessor::prepareDatabase ( ) [virtual]

If a new collection is created during runtime, this function prepares the indexing structures such that they are able to accept new objects.

The collection id and name must be given when constructing *this. All other data are added to the configuration tag in this. The resulting configuration tag is output as result of prepareDatabase.

Returns:
configuration element that contains new configuration data as result of prepareDatabase
virtual pair<bool,TID> CAccessor::URLToID ( const string &  inURL) const [pure virtual]

Translate an URL to its document ID.

Implemented in CAcIFFileSystem, CAcInvertedFile, CAccessorImplementation, 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