CAccessor - an abstract base class for everything accessing a GIFT database. More...
#include <CAccessor.h>
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 CXMLElement * | prepareDatabase () |
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. |
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:
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 CAccessorImplementation, and CAcIFFileSystem.
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.
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
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.
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.