Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

omgalgorithmset.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           omgalgorithm.h  -  description
00003                              -------------------
00004     begin                : March 2006
00005     copyright            : (C) 2003 by Tim Sutton
00006     email                : tim@linfiniti.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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         // Accessors
00061         //
00062 
00064         QString name() const;
00067         QString description() const;
00070         QStringList nameList();
00071         //
00072         // Mutators
00073         //
00074 
00078         void setName(QString theName);
00079 
00083         void setDescription(QString theDescription);
00084 
00085 
00086         //
00087         // Ancilliary helper methods
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         // Overloaded operators
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 

Generated on Mon Apr 28 15:08:05 2008 for openModellerDesktop by  doxygen 1.4.1-20050210