System documentation of the GNU Image-Finding Tool

CAlgorithm Class Reference

An algorithm is a CXMLElement which is linked to a CSessionManager together they are able to build CQuery trees. More...

#include <CAlgorithm.h>

Inheritance diagram for CAlgorithm:

CXMLElement CMagic CNoDelete

List of all members.

Public Member Functions

virtual void addChild (const string &, const char *const *const inAttributeList=0)
 Same as in CXMLElement, but making a CAlgorithm instead.
virtual void addChild (CXMLElement *inChild)
 Same as in CXMLElement, but making a CAlgorithm instead.
bool configure (CAlgorithmCollection &inBaseConfiguration)
 reading an attribute for strings
void mergeAttributes (const CAlgorithm &inAlgorithm)
 merging the attributes of two algorithms.
void mergeChildLists (const CAlgorithm &inAlgorithm)
 merging the child lists of two algorithms.
string getCollectionID () const
 get the name of the collection to be treated by this algorithm
double getWeight () const
 get the name of the algorithm
string getAlgorithmName () const
 get the name of the algorithm
pair< bool, string > getType () const
 get the type of the algorithm
pair< bool, string > getInheritsFrom () const
 The father inside the configuration.
string getBaseType () const
 get the basetype of the algorithm
string getID () const
 get the id of the algorithm
string toOldMRML () const
 puts out a flat algorithm tag with just ID and name
void setDefault (CAlgorithm &inDefault)
 set the default we do not take any destroy responsability
CAlgorithmclone () const
 clone this
 CAlgorithm (const char *, const char *const *const inAttributeList=0)
 hand things through to the CXMLElement constructor
 CAlgorithm (const string &, const list< pair< string, string > > &inList)
 hand things through to the CXMLElement constructor
 CAlgorithm (const CXMLElement &inAlgorithm)
 construct CAlgorithm from XML Element
 CAlgorithm (const CAlgorithm &inAlgorithm)
 copy constructor


Detailed Description

An algorithm is a CXMLElement which is linked to a CSessionManager together they are able to build CQuery trees.

: Wolfgang Müller


Member Function Documentation

bool CAlgorithm::configure ( CAlgorithmCollection inBaseConfiguration  ) 

reading an attribute for strings

here we extend the inheritance mechanism. We do not only look at parents, but also at the default values provided by the configuration.

this is virtual in order to plug in other methods of inheritance

See also:
: CXMLElement.h::stringReadAttribute In the long run, we would like to get of build query tree in this class and move it elsewhere.
The first step of this separation is the configure function, which does nothing else but putting the inherited values and the default values into the attribute list of this. After that no inheritance is necessary, and we can get at all the attributes using CXMLElement::createNamedValueList;

void CAlgorithm::mergeAttributes ( const CAlgorithm inAlgorithm  ) 

merging the attributes of two algorithms.

This is useful: 1. for the initial configuration 2. for changing the configuration.

At present this merges attribute lists givig priority to the values in *this.

FIXME: slow way of merging

void CAlgorithm::mergeChildLists ( const CAlgorithm inAlgorithm  ) 

merging the child lists of two algorithms.

This is useful: 1. for the initial configuration 2. for changing the configuration.

At present this merges attribute lists givig priority to the values in *this.

FIXME: slow way of merging


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