00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef _CALGORITHM
00026
#define _CALGORITHM
00027
#include "libMRML/include/uses-declarations.h"
00028
#include "libMRML/include/CXMLElement.h"
00029
#include "libMRML/include/CSelfDestroyPointer.h"
00030
#include <map>
00031
00032
class CQuery;
00033
class CAlgorithmCollection;
00041 class CAlgorithm:
public CXMLElement{
00042
protected:
00043
public:
00047
virtual void addChild(
const string&,
00048
const char*
const*
const inAttributeList=0);
00052
virtual void addChild(
CXMLElement* inChild);
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00075
bool configure(
CAlgorithmCollection& inBaseConfiguration);
00088
void mergeAttributes(
const CAlgorithm& inAlgorithm);
00101
void mergeChildLists(
const CAlgorithm& inAlgorithm);
00104 string
getCollectionID()
const;
00107
double getWeight()
const;
00110 string
getAlgorithmName()
const;
00113 pair<bool,string>
getType()
const;
00117 pair<bool,string>
getInheritsFrom()
const;
00120 string
getBaseType()
const;
00123 string
getID()
const;
00125 string
toOldMRML()
const;
00129
void setDefault(
CAlgorithm& inDefault);
00131
CAlgorithm*
clone()
const;
00133
CAlgorithm(
const char* ,
00134
const char*
const*
const inAttributeList=0);
00136
CAlgorithm(
const string& ,
00137
const list< pair<string,string> >& inList);
00139
CAlgorithm(
const CXMLElement& inAlgorithm);
00141
CAlgorithm(
const CAlgorithm& inAlgorithm);
00142 };
00143
00144
00145
00146
00147
00148
class CSortByID_CA:
public binary_function<const CAlgorithm&,const CAlgorithm&,bool>{
00149
public:
00150
bool operator()(
const CAlgorithm& l,
00151
const CAlgorithm& t)
const;
00152 };
00153
00154
00155
00156
class CSortByBase_CA:
public binary_function<const CAlgorithm&,const CAlgorithm&,bool>{
00157
public:
00158
bool operator()(
const CAlgorithm& l,
00159
const CAlgorithm& t)
const;
00160 };
00161
00162
#endif