CQPerl Class

# CQPerl Class Reference

[CADIHash.h Index] [CADIHash.h Hierarchy]

Linking GIFT to Perl More...

`#include <../libInvertedFile/include/CQPerl.h>`

Inherits: CQuery

## Public Members

- CQPerl (CAccessorCollection& inAccessorCollection, CAlgorithm& inAlgorithm)
- CQPerl ()
- ~CQPerl ()
- virtual CXMLElement* query (const CXMLElement& inQuery)
- virtual CIDRelevanceLevelPairList* fastQuery (const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest)
- virtual CXMLElement* getRandomImages (int inNumberOfInterestingImages)
- virtual CIDRelevanceLevelPairList* getRandomIDs (int inNumberOfInterestingImages)
- virtual list<TID>* getAllIDs ()
- virtual list<CAccessorElement>* getAllAccessorElements ()
- bool setAlgorithm (CAlgorithm& inAlgorithm)
- void init ()

## Protected Members

- PerlInterpreter* mPerl
- CXMLElement* callPerl (const CXMLElement* inElement, string inFunction)
- CXMLElement* callConstruct ()

## Detailed Description

Linking GIFT to Perl.The goal is to hand through about all necessary communication and configuration data to Perl.

## ~CQPerl()

destroying the perl

## virtual CXMLElement* query(const CXMLElement& inQuery)

do a query

## virtual CIDRelevanceLevelPairList* fastQuery(const CXMLElement& inQuery, int inNumberOfInterestingImages, double inDifferenceToBest)

instead of URL/RelevanceLevel pairs

## virtual CXMLElement* getRandomImages(int inNumberOfInterestingImages)

get some random images (handed through to accessor)

## virtual CIDRelevanceLevelPairList* getRandomIDs(int inNumberOfInterestingImages)

get some random images (handed through to accessor)

## virtual list<TID>* getAllIDs()

get the IDs of all images (handed through to accessor)

## virtual list<CAccessorElement>* getAllAccessorElements()

get the IDs of all images (handed through to accessor)

## bool setAlgorithm(CAlgorithm& inAlgorithm)

set the algorithm and configure this

## void init()

an initialising function called by the constructors. will we ever need it?

## PerlInterpreter* mPerl

The perl interpreter used by *this

## CXMLElement* callPerl(const CXMLElement* inElement, string inFunction)

Transforms a CXMLElement to an CXMLTripletList, and finally pushes this list onto the Perl stack.

cleans up behind itself

## CXMLElement* callConstruct()

calls the function "construct" in the perl script and DOES NOT CLEAN UP

| Kdoc