00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef OMGALGORITHMSET_H
00019 #define OMGALGORITHMSET_H
00020
00021 class QString;
00022 #include <QMap>
00023 #include "omgalgorithm.h"
00024 #include "omgserialisable.h"
00032 class OMG_LIB_EXPORT OmgAlgorithmSet : public OmgSerialisable
00033 {
00034 public:
00036 OmgAlgorithmSet();
00038 ~OmgAlgorithmSet();
00039
00046 bool addAlgorithm(OmgAlgorithm theAlgorithm, bool theOverwriteFlag=false);
00050 bool removeAlgorithm(OmgAlgorithm theAlgorithm);
00054 bool removeAlgorithm(QString theAlgorithm);
00055
00058 static OmgAlgorithmSet getFromActivePlugin();
00059
00060
00061
00062
00064 QString name() const;
00067 QString description() const;
00070 QStringList nameList();
00071
00072
00073
00074
00078 void setName(QString theName);
00079
00083 void setDescription(QString theDescription);
00084
00085
00086
00087
00088
00089
00093 void clear();
00094
00095
00099 int count() const;
00102 QString toString();
00103
00108 QString toXml() const;
00112 bool fromXml(const QString) ;
00113
00114
00121 QString toHtml();
00122
00127 void loadAlgorithms(QString theSearchDir);
00128
00135 void saveAlgorithms(QString theSaveDir, bool theUserProfilesFlag=true);
00136
00139 OmgAlgorithm getAlgorithm (QString theGuid);
00140
00142 bool contains(QString theName);
00143
00144
00145
00146
00147
00153 OmgAlgorithm operator [] (int);
00154
00155 private:
00156 QString mName;
00157 QString mDescription;
00158 typedef QMap<QString,OmgAlgorithm> AlgorithmsMap;
00159 AlgorithmsMap mAlgorithmsMap;
00160 };
00161
00162 #endif //OMGALGORITHMSET_H
00163