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

omgalgorithm.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Tim Sutton   *
00003  *   tim@linfiniti.com   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef OMGALGORITHM_H
00021 #define OMGALGORITHM_H
00022 
00023 #include <omgguid.h>
00024 #include <omgalgorithmparameter.h>
00025 #include "omgserialisable.h"
00026 
00027 #include <QString>
00028 #include <QVector>
00029 
00035 class OMG_LIB_EXPORT OmgAlgorithm : public OmgSerialisable, public OmgGuid
00036 {
00037 public:
00038   OmgAlgorithm();
00039   ~OmgAlgorithm();
00041   enum Origin {ADAPTERPROFILE=100,USERPROFILE=200,UNDEFINED=300};
00042 
00043   //ancilliary helpers
00044   QString toHtml() const;
00045   int parameterCount();
00046   
00047   //
00048   //serialisable interface
00049   //
00050   
00056   QString toXml() const;
00061   bool fromXml(const QString theXml) ;
00062 
00071   QString toModelCreationXml() const;
00083   QString toModelProjectionXml(QString theModel, QString theNormalization="") const;
00084 
00085   QString toString() const;
00086   //mutators
00087 
00088   void setId(QString theId);
00089   void setName(QString theName);
00090   void setAuthor(QString theAuthor);
00091   void setCodeAuthor(QString theCodeAuthor);
00092   void setContact(QString theContact);
00093   void setVersion(QString theVersion);
00094   void setCategorical(int theCategorical);
00095   void setAbsence(int theAbsence);
00096   void setOverview(QString theOverview);
00097   void setDescription(QString theDescription);
00098   void setBibliography(QString theBibliography);
00099   void setParameters(QVector<OmgAlgorithmParameter> theParameters);
00100   void addParameter(OmgAlgorithmParameter theParameter);
00101   void setOrigin(Origin theOrigin);
00102   //accessors
00103 
00105   QString id();
00106   QString name() const;
00107   QString author();
00108   QString contact();
00109   QString codeAuthor();
00110   QString version();
00111   int categorical();
00112   int absence();
00113   QString overview();
00114   QString description();
00115   QString bibliography();
00116   QVector<OmgAlgorithmParameter> parameters();
00121   OmgAlgorithmParameter parameter(QString theId);
00122   Origin origin();
00123 private:
00124 
00125   QString mId;
00126   QString mName;
00127   QString mAuthor;
00128   QString mCodeAuthor;
00129   QString mContact;
00130   QString mVersion;
00131   int mCategorical;
00132   int mAbsence;
00133   QString mOverview;
00134   QString mDescription;
00135   QString mBibliography;
00136   QVector<OmgAlgorithmParameter> mParameters;
00140   Origin mOrigin;
00141 
00142 };
00143 
00144 #endif //OMGALGORITHM_H

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