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: villek@matrixscience.com $ #
00013 #       $Date: 2018-07-30 16:23:53 +0100 $ #
00014 #   $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $ #
00015 # $NoKeywords::                                                            $ #
00016 ##############################################################################
00017 */
00018 
00019 #ifndef MS_PROCESSOROPTIONS_HPP
00020 #define MS_PROCESSOROPTIONS_HPP
00021 
00022 
00023 #include <string>
00024 #include <vector>
00025 
00026 
00027 namespace matrix_science {
00033 
00034     class MS_MASCOTRESFILE_API ms_dbprocessors
00035     {
00036         friend class ms_datfile;
00037         friend class ms_processoroptions;
00038     public:
00040         ms_dbprocessors();
00041 
00043         ms_dbprocessors(const ms_dbprocessors& src);
00044 
00046         ~ms_dbprocessors();
00047 
00049         void defaultValues();
00050 
00052         void copyFrom(const ms_dbprocessors* right);
00053 
00054 #ifndef SWIG
00055 
00056         ms_dbprocessors& operator=(const ms_dbprocessors& right);
00057 #endif
00058 
00059         std::string getName() const;
00060 
00062         void setName(const char * str);
00063 
00065         int getNumberOfThreads() const;
00066 
00068         void clearThreads();
00069 
00071         int getThreadProcessorID(const int threadIndex) const;
00072 
00074         void appendThreadProcessorID(const int proccessorID);
00075     private:
00076         std::string         name_;
00077         std::vector<int>    threads_;
00078 
00079         std::string getStringValue() const;
00080     }; // class ms_dbprocessors
00081 
00083 
00108     class MS_MASCOTRESFILE_API ms_processoroptions : public ms_customproperty
00109     {
00110         friend class ms_datfile;
00111     public:
00112 
00114         ms_processoroptions();
00115 
00117         ms_processoroptions(const ms_processoroptions& src);
00118 
00120         ~ms_processoroptions();
00121 
00123         void defaultValues();
00124 
00126         void copyFrom(const ms_processoroptions* right);
00127 
00128 #ifndef SWIG
00129 
00130         ms_processoroptions& operator=(const ms_processoroptions& right);
00131 #endif
00132 
00133         bool isSectionAvailable() const;
00134 
00136         void setSectionAvailable(const bool value);
00137 
00139         int getNumberOfProcessors() const;
00140 
00142         void clearProcessors();
00143 
00145         int getProcessor(const int index) const;
00146 
00148         void appendProcessor(const int processorID);
00149 
00151         int getNumberOfDatabases() const;
00152 
00154         const ms_dbprocessors* getDatabase(const int index) const;
00155 
00157         void clearDatabases();
00158 
00160         void appendDatabase(const ms_dbprocessors* db);
00161 
00162 #ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE
00163 #include "suppress_ms_customproperty.hpp"
00164 #endif
00165 
00166     private:
00167         bool                            sectionAvailable_;
00168         std::vector<int>                processors_;
00169         std::vector<ms_dbprocessors*>   dbs_;
00170     }; // class ms_processoroptions // end of config_group
00172 } // namespace matrix_science;
00173 
00174 #endif // MS_PROCESSOROPTIONS_HPP
00175 
00176 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:29