System documentation of the GNU Image-Finding Tool

Public Member Functions | Protected Attributes | Friends | List of all members
CAcURL2FTS Class Reference

This accessor is a base class for accessors which use an URL2FTS file to implement the interface of the CAccessor base class. More...

#include <CAcURL2FTS.h>

Inheritance diagram for CAcURL2FTS:
CAccessorImplementation CAccessor CAcInvertedFile CAcIFFileSystem

Public Member Functions

const string & getURLToFeatureFileName () const
 gives back the content of mURLToFeatureFileName
 
 CAcURL2FTS (const CXMLElement &inContentElement)
 Constructor: slurp in an url2fts file and fill the maps. More...
 
virtual operator bool () const
 Is this accessor up and working? More...
 
virtual int size () const
 Give the number of elements stored in this accessor. More...
 
pair< bool, string > URLToFFN (const string &inURL) const
 gives the feature file name which corresponds to a given URL return value: pair of bool (does the feature file exsist) string (the feature file name)
 
pair< bool, string > IDToFFN (TID inID) const
 gives the feature file name which corresponds to a given URL return value: pair of bool (does the feature file exsist) string (the feature file name)
 
- Public Member Functions inherited from CAccessorImplementation
virtual string IDToURL (TID inID) const
 Translate a DocumentID to a URL (for output) More...
 
virtual pair< bool,
CAccessorElement
IDToAccessorElement (TID inID) const
 Translate a DocumentID to an accessor Element. More...
 
virtual pair< bool, TID > URLToID (const string &inURL) const
 Translate an URL to its document ID. More...
 
void getAllIDs (list< TID > &) const
 This is useful for making lists of which images are present in a database etc. More...
 
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 More...
 
void getRandomAccessorElements (list< CAccessorElement > &outResult, list< CAccessorElement >::size_type inSize) const
 For drawing random sets. More...
 
- 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. More...
 
virtual bool isPreparedDatabase () const
 Is the database accessed by this accessor prepared? In other words: is there an index structure to access?
 

Protected Attributes

TID mID
 the ID of the next element
 
string mURLPrefix
 the url-prefix for the image list
 
string mThumbnailURLPrefix
 the thumbnail-url-prefix for the image list
 
CMutex mMutexURL2FTS
 the mutex for multithreading the name is intended to be unique and immune against inheritance...
 
string_string_map mURLToFFN
 map from the url of an image to the name of the feature file for this image
 
TID_string_map mIDToFFN
 map from the id of an image to the name of the feature file for this image
 
ifstream mURLToFeatureFile
 URL -> FeatureFileName.
 
string mURLToFeatureFileName
 Name of the file that contains pairs of URL and the Feature file that belongs to the URL.
 
- Protected Attributes inherited from CAccessorImplementation
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
 

Friends

class CAcIFFileSystem
 
void newStartURL2FTSElement (void *inUserData, const char *inElementName, const char **inAttributes)
 we construct this with a little help from this friend
 
void newEndURL2FTSElement (void *inUserData, const char *inElementName)
 we construct this with a little help from this friend
 

Additional Inherited Members

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

Detailed Description

This accessor is a base class for accessors which use an URL2FTS file to implement the interface of the CAccessor base class.

Constructor & Destructor Documentation

CAcURL2FTS::CAcURL2FTS ( const CXMLElement inContentElement)

Constructor: slurp in an url2fts file and fill the maps.

Like every accessor, this accessor takes a <collection> MRML element as input (

See Also
CXMLElement for how to access the attributes of this element). Currently this accessor understands the following attributes

cui-base-dir: the directory containing the following files cui-feature-file-location: the location of the "url2fts" file which translates urls to feature file names.

Member Function Documentation

virtual CAcURL2FTS::operator bool ( ) const
virtual

Is this accessor up and working?

Implements CAccessorImplementation.

Reimplemented in CAcIFFileSystem.

virtual int CAcURL2FTS::size ( ) const
virtual

Give the number of elements stored in this accessor.

Reimplemented from CAccessorImplementation.

Reimplemented in CAcIFFileSystem.


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