00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00042 #ifndef _CRELEVANCELEVEL
00043 #define _CRELEVANCELEVEL
00044 #include "libMRML/include/uses-declarations.h"
00045 #include <iostream>
00046 #include <string>
00047 #include "libMRML/include/TID.h"
00048 #include <functional>
00049
00060 class CRelevanceLevel{
00062 string mURL;
00064 double mRelevanceLevel;
00065 public:
00072 CRelevanceLevel();
00073
00079 CRelevanceLevel(const string& inURL,
00080 double inRelevanceLevel);
00081
00087 CRelevanceLevel(const CRelevanceLevel& inElement);
00088
00095 bool input(istream& inStream);
00096
00102 bool output(ostream& outStream)const;
00103
00109 bool outputHTML(ostream& outStream)const;
00110
00112
00118 string getURL()const;
00119
00125 double getRelevanceLevel()const;
00126
00132 void setRelevanceLevel(const double inRelevanceLevel);
00133
00139 void adjustRelevanceLevel(const double inRelevanceLevel);
00140
00146 void divideRelevanceLevelBy(const double inDivisor);
00148 string toXML()const;
00149 };
00150
00156 bool operator<(const CRelevanceLevel& l,
00157 const CRelevanceLevel& t);
00158
00160 class CSortByURL_RL:public binary_function<CRelevanceLevel,CRelevanceLevel,bool>{
00161 public:
00163 bool operator()(const CRelevanceLevel& l,
00164 const CRelevanceLevel& t)const;
00165 };
00166
00167
00168 #endif