Bayeux  3.4.1
Core Foundation library for SuperNEMO
dummy_module.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date : 2011-06-19
4  * Last modified : 2013-12-13
5  *
6  * Copyright (C) 2011-2013 Francois Mauger <mauger@lpccaen.in2p3.fr>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  *
24  * Description:
25  *
26  * A dummy data processing module.
27  *
28  */
29 
30 #ifndef DPP_DUMMY_MODULE_H
31 #define DPP_DUMMY_MODULE_H 1
32 
33 // Standard library:
34 #include <string>
35 
36 // This project:
37 #include <dpp/base_module.h>
38 
39 namespace dpp {
40 
42 
46  : public base_module
47  {
48  public:
49 
50  static const std::string & default_gp_label();
51  static const std::string & default_flag_name();
52 
54  void set_flag_name(const std::string & flag_name_);
55 
57  const std::string & get_flag_name() const;
58 
60  void set_GP_label(const std::string & gp_label_);
61 
63  const std::string & get_GP_label() const;
64 
67 
69  virtual ~dummy_module();
70 
80  virtual void initialize(const datatools::properties & properties_,
81  datatools::service_manager & srv_mgr_,
82  module_handle_dict_type & mod_dict_);
83 
85  virtual void reset();
86 
91  virtual process_status process(datatools::things & data_record_);
92 
93  private:
94 
95  std::string _GP_label_;
96  std::string _flag_name_;
97 
98  // Macro to automate the registration of the module :
100 
101  };
102 
103 } // end of namespace dpp
104 
105 #endif // DPP_DUMMY_MODULE_H
106 
107 // Local Variables: --
108 // mode: c++ --
109 // c-file-style: "gnu" --
110 // tab-width: 2 --
111 // End: --
A generic serializable and noncopyable container for arbitrary serializable objects.
Definition: things.h:85
static const std::string & default_gp_label()
static const std::string & default_flag_name()
void set_flag_name(const std::string &flag_name_)
Set the flag name.
const std::string & get_GP_label() const
Get the "GP" bank label.
priority
Priority levels for logging from most to least critical.
Definition: logger.h:82
Top-level namespace of the Bayeux/dpp module library.
Definition: base_module.h:56
A fatal error. The application will most likely terminate. This is the highest priority.
Definition: logger.h:85
virtual ~dummy_module()
Destructor.
process_status
Processing status flags used as the returned value of data processing methods through the pipeline.
Definition: base_module.h:65
A dummy data processing module for tests.
Definition: dummy_module.h:45
const std::string & get_flag_name() const
Get the flag name.
virtual void initialize(const datatools::properties &properties_, datatools::service_manager &srv_mgr_, module_handle_dict_type &mod_dict_)
std::map< std::string, module_entry_type > module_handle_dict_type
Definition: module_tools.h:141
Base processing module (abstract interface)
Definition: base_module.h:59
#define DPP_MODULE_REGISTRATION_INTERFACE(T)
Definition: base_module.h:231
void set_GP_label(const std::string &gp_label_)
Set the "GP" bank label.
virtual process_status process(datatools::things &data_record_)
virtual void reset()
Termination method.
dummy_module(datatools::logger::priority=datatools::logger::PRIO_FATAL)
Constructor.
Service management class.
Definition: service_manager.h:57
A dictionary of arbitrary properties.
Definition: properties.h:125