yat  0.21pre
NodeValue.h
1 #ifndef theplu_yat_utility_detail_node_value
2 #define theplu_yat_utility_detail_node_value
3 
4 // $Id: NodeValue.h 4065 2021-08-05 06:11:05Z peter $
5 
6 /*
7  Copyright (C) 2021 Peter Johansson
8 
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10 
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15 
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23 */
24 
25 // This is a private file used by yat/utility/Ranking.h
26 
27 #include "NodeBase.h"
28 
29 #include <memory>
30 
31 namespace theplu {
32 namespace yat {
33 namespace utility {
34 
36 
37  // namespace for internal classes used in class Ranking
38  namespace ranking {
39 
40  template<typename T>
41  class NodeValue : public NodeBase
42  {
43  public:
44  NodeValue(const T& value)
45  : value_(value)
46  {}
47 
48  NodeValue(T&& value)
49  : value_(std::move(value))
50  {}
51 
52  const T& value(void) const { return value_; }
53  private:
54  T value_;
55  };
56 
57  } // end of namespace ranking
58 
60 
61 }}} // of namespace utility, yat, and theplu
62 #endif
The Department of Theoretical Physics namespace as we define it.
Definition: stl_utility.h:64

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14