Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_processoroptions.hpp
1/*
2##############################################################################
3# file: ms_processoroptions.hpp #
4# 'msparser' toolkit #
5# Represents parameters of "Processors" section of "mascot.dat"-file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2003 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Archive:: /Mowse/ms_mascotresfile/include/ms_processoroptions.hpp $ #
12# $Author: villek@matrixscience.com $ #
13# $Date: 2018-07-30 16:23:53 +0100 $ #
14# $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $ #
15# $NoKeywords:: $ #
16##############################################################################
17*/
18
19#ifndef MS_PROCESSOROPTIONS_HPP
20#define MS_PROCESSOROPTIONS_HPP
21
22
23#include <string>
24#include <vector>
25
26
27namespace matrix_science {
34 class MS_MASCOTRESFILE_API ms_dbprocessors
35 {
36 friend class ms_datfile;
37 friend class ms_processoroptions;
38 public:
41
44
47
49 void defaultValues();
50
52 void copyFrom(const ms_dbprocessors* right);
53
54#ifndef SWIG
56 ms_dbprocessors& operator=(const ms_dbprocessors& right);
57#endif
59 std::string getName() const;
60
62 void setName(const char * str);
63
65 int getNumberOfThreads() const;
66
68 void clearThreads();
69
71 int getThreadProcessorID(const int threadIndex) const;
72
74 void appendThreadProcessorID(const int proccessorID);
75 private:
76 std::string name_;
77 std::vector<int> threads_;
78
79 std::string getStringValue() const;
80 }; // class ms_dbprocessors
81
83
108 class MS_MASCOTRESFILE_API ms_processoroptions : public ms_customproperty
109 {
110 friend class ms_datfile;
111 public:
112
115
118
121
123 void defaultValues();
124
126 void copyFrom(const ms_processoroptions* right);
127
128#ifndef SWIG
130 ms_processoroptions& operator=(const ms_processoroptions& right);
131#endif
133 bool isSectionAvailable() const;
134
136 void setSectionAvailable(const bool value);
137
139 int getNumberOfProcessors() const;
140
142 void clearProcessors();
143
145 int getProcessor(const int index) const;
146
148 void appendProcessor(const int processorID);
149
151 int getNumberOfDatabases() const;
152
154 const ms_dbprocessors* getDatabase(const int index) const;
155
157 void clearDatabases();
158
160 void appendDatabase(const ms_dbprocessors* db);
161
162#ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE
163#include "suppress_ms_customproperty.hpp"
164#endif
165
166 private:
167 bool sectionAvailable_;
168 std::vector<int> processors_;
169 std::vector<ms_dbprocessors*> dbs_;
170 }; // class ms_processoroptions // end of config_group
172} // namespace matrix_science;
173
174#endif // MS_PROCESSOROPTIONS_HPP
175
176/*------------------------------- End of File -------------------------------*/
The class is used as a base for property-containing classes, such as ms_mascotoptions.
Definition: ms_customproperty.hpp:91
Encapsulates the mascot.dat file that contains the most important parameters.
Definition: ms_datfile.hpp:47
Represent a single dabatase entry in the Processors section.
Definition: ms_processoroptions.hpp:35
An instance of this class represents all the parameters specified in the Processors section of mascot...
Definition: ms_processoroptions.hpp:109