System documentation of the GNU Image-Finding Tool

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

CAccessor Class Reference

#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
virtual string IDToURL (TID inID) const =0
virtual pair< bool, CAccessorElementIDToAccessorElement (TID inID) const =0
virtual pair< bool, TID > URLToID (const string &inURL) const =0
virtual void getAllIDs (list< TID > &) const =0
 List of the IDs of all documents present in the inverted file.
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::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:
inoutResultList the list which will contain the result
inSize the desired size of the inoutResultList

Implemented in CAccessorImplementation, and CAcIFFileSystem.

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

get a given number of random AccessorElement's

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

Implemented in CAccessorImplementation, and CAcIFFileSystem.

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

Translate a DocumentID to an accessor Element

Implemented in CAccessorImplementation, and CAcIFFileSystem.

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

Translate a DocumentID to a URL (for output)

Implemented in CAccessorImplementation, CAcIFFileSystem, CAcInvertedFile, and CAcInvertedFile.

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

Is this accessor up and working?

Implemented in CAccessorImplementation, CAcURL2FTS, CAcIFFileSystem, and CAcHierarchy.

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 CAccessorImplementation, 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