Bayeux  3.4.1
Core Foundation library for SuperNEMO
unary_function_utils.h
Go to the documentation of this file.
1 
3 #ifndef MYGSL_UNARY_FUNCTION_UTILS_H
4 #define MYGSL_UNARY_FUNCTION_UTILS_H 1
5 
6 // Standard library:
7 #include <iostream>
8 #include <limits>
9 #include <functional>
10 #include <string>
11 #include <vector>
12 #include <map>
13 
14 // Third party:
15 // - Bayeux/datatools:
16 #include <datatools/handle.h>
17 
18 namespace mygsl {
19 
20  // Forward class declaration:
22 
25 
28 
30  typedef std::map<std::string, unary_function_handle_type> unary_function_dict_type;
31 
34  {
35  public:
39  virtual ~unary_function_handle();
40  const i_unary_function & func() const;
41  bool is_null() const;
42  void reset(const i_unary_function &);
44  void reset();
45  private:
46  void _check_();
47  private:
49  const i_unary_function * _pfunc_ = nullptr;
50  };
51 
52 } // namespace mygsl
53 
54 #endif // MYGSL_UNARY_FUNCTION_UTILS_H
55 
56 // Local Variables: --
57 // mode: c++ --
58 // c-file-style: "gnu" --
59 // tab-width: 2 --
60 // End: --
datatools::handle< i_unary_function > unary_function_handle_type
Alias for a handle to an unary function object.
Definition: unary_function_utils.h:21
const i_unary_function & func() const
Templatized handle class that wraps a Boost shared pointer and behaves like a reference.
Definition: handle.h:114
Abstract interface for unary functions : R -> R.
Definition: i_unary_function.h:44
Smart handle to an unary function object.
Definition: unary_function_utils.h:33
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
std::map< std::string, unary_function_handle_type > unary_function_dict_type
Alias for dictionary of handles to unary function objects.
Definition: unary_function_utils.h:30
datatools::handle< const i_unary_function > const_unary_function_handle_type
Alias for a handle to a const unary function object.
Definition: unary_function_utils.h:27