Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
no_op.hpp
Go to the documentation of this file.
1 #ifndef STAN__COMMON__RECORDER__NO_OP_HPP
2 #define STAN__COMMON__RECORDER__NO_OP_HPP
3 
4 #include <ostream>
5 #include <string>
6 #include <vector>
7 
8 namespace stan {
9  namespace common {
10  namespace recorder {
11 
15  class no_op {
16  public:
23  template <class T>
24  void operator()(const std::vector<T>& x) { }
25 
31  void operator()(const std::string x) { }
32 
37  void operator()() { }
38 
42  bool is_recording() const {
43  return false;
44  }
45  };
46 
47 
48  }
49  }
50 }
51 
52 #endif
void operator()(const std::string x)
Do nothing with a string.
Definition: no_op.hpp:31
void operator()()
Do nothing.
Definition: no_op.hpp:37
bool is_recording() const
Indicator function for whether the instance is recording.
Definition: no_op.hpp:42
void operator()(const std::vector< T > &x)
Do nothing with vector.
Definition: no_op.hpp:24

     [ Stan Home Page ] © 2011–2014, Stan Development Team.