MURE
Loading...
Searching...
No Matches
Reaction.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _Reaction_
20#define _Reaction_
21
22#include <vector>
23#include <string>
24#include <algorithm>
25#include <iosfwd>
26
27using namespace std;
28
30
41{
42 public:
43 Reaction(); // Default constructor
44 ~Reaction(); // Default constructor
45 Reaction(const Reaction &r);
46 Reaction(int code);
47 void Add(int code);
48 void Multiply(int code);
49 string Print() const;
50 vector < int > GetCode() const
51 {
52 return fCode;
53 }
54 bool operator== (const Reaction r)const ;
55 private:
56 vector < int > fCode;
57 vector < char > fOperator;
58};
59
60
61#endif
Define a Reaction list for Tally multiplicator inputs.
Definition Reaction.hxx:41
vector< char > fOperator
the operator list (":" for addition, " " for multiplicatio)
Definition Reaction.hxx:57
bool operator==(const Reaction r) const
true if 2 reactions are identical
Definition Reaction.cxx:93
~Reaction()
Definition Reaction.cxx:63
string Print() const
Print a reaction list.
Definition Reaction.cxx:83
void Add(int code)
Add a reaction (e.g. fission+capture)
Definition Reaction.cxx:71
void Multiply(int code)
multiply reaction (e.g. nu*fission)
Definition Reaction.cxx:77
vector< int > fCode
the reaction code list
Definition Reaction.hxx:56
vector< int > GetCode() const
Definition Reaction.hxx:50
the namespace of the Standard C++

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024