Matrix Science header

ms_processoroptions.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_processoroptions.hpp                                              #
00004 # 'msparser' toolkit                                                         #
00005 # Represents parameters of "Processors" section of "mascot.dat"-file         #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2003 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #    $Archive:: /Mowse/ms_mascotresfile/include/ms_processoroptions.hpp    $ #
00012 #     $Author: francoisr $ #
00013 #       $Date: 2016/05/17 12:49:19 $ #
00014 #   $Revision: 1.10 $ #
00015 # $NoKeywords::                                                            $ #
00016 ##############################################################################
00017 */
00018 
00019 #ifndef MS_PROCESSOROPTIONS_HPP
00020 #define MS_PROCESSOROPTIONS_HPP
00021 
00022 #ifdef _WIN32
00023 #pragma warning(disable:4251)   // Don't want all classes to be exported
00024 #pragma warning(disable:4786)   // Debug symbols too long
00025 #   ifndef _MATRIX_USE_STATIC_LIB
00026 #       ifdef MS_MASCOTRESFILE_EXPORTS
00027 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00028 #       else
00029 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00030 #       endif
00031 #   else
00032 #       define MS_MASCOTRESFILE_API
00033 #   endif
00034 #else
00035 #   define MS_MASCOTRESFILE_API
00036 #endif
00037 
00038 // for the sake of #include <string>
00039 #ifdef __ALPHA_UNIX__
00040 #include <ctype.h>
00041 #endif
00042 #include <string>
00043 #include <vector>
00044 
00045 
00046 namespace matrix_science {
00052 
00053     class MS_MASCOTRESFILE_API ms_dbprocessors
00054     {
00055         friend class ms_datfile;
00056         friend class ms_processoroptions;
00057     public:
00059         ms_dbprocessors();
00060 
00062         ms_dbprocessors(const ms_dbprocessors& src);
00063 
00065         ~ms_dbprocessors();
00066 
00068         void defaultValues();
00069 
00071         void copyFrom(const ms_dbprocessors* right);
00072 
00073 #ifndef SWIG
00074 
00075         ms_dbprocessors& operator=(const ms_dbprocessors& right);
00076 #endif
00077 
00078         std::string getName() const;
00079 
00081         void setName(const char * str);
00082 
00084         int getNumberOfThreads() const;
00085 
00087         void clearThreads();
00088 
00090         int getThreadProcessorID(const int threadIndex) const;
00091 
00093         void appendThreadProcessorID(const int proccessorID);
00094     private:
00095         std::string         name_;
00096         std::vector<int>    threads_;
00097 
00098         std::string getStringValue() const;
00099     }; // class ms_dbprocessors
00100 
00102 
00127     class MS_MASCOTRESFILE_API ms_processoroptions : public ms_customproperty
00128     {
00129         friend class ms_datfile;
00130     public:
00131 
00133         ms_processoroptions();
00134 
00136         ms_processoroptions(const ms_processoroptions& src);
00137 
00139         ~ms_processoroptions();
00140 
00142         void defaultValues();
00143 
00145         void copyFrom(const ms_processoroptions* right);
00146 
00147 #ifndef SWIG
00148 
00149         ms_processoroptions& operator=(const ms_processoroptions& right);
00150 #endif
00151 
00152         bool isSectionAvailable() const;
00153 
00155         void setSectionAvailable(const bool value);
00156 
00158         int getNumberOfProcessors() const;
00159 
00161         void clearProcessors();
00162 
00164         int getProcessor(const int index) const;
00165 
00167         void appendProcessor(const int processorID);
00168 
00170         int getNumberOfDatabases() const;
00171 
00173         const ms_dbprocessors* getDatabase(const int index) const;
00174 
00176         void clearDatabases();
00177 
00179         void appendDatabase(const ms_dbprocessors* db);
00180 
00181 #ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE
00182 #include "suppress_ms_customproperty.hpp"
00183 #endif
00184 
00185     private:
00186         bool                            sectionAvailable_;
00187         std::vector<int>                processors_;
00188         std::vector<ms_dbprocessors*>   dbs_;
00189     }; // class ms_processoroptions // end of config_group
00191 } // namespace matrix_science;
00192 
00193 #endif // MS_PROCESSOROPTIONS_HPP
00194 
00195 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51