Bayeux  3.4.1
Core Foundation library for SuperNEMO
mapping_plugin.h
Go to the documentation of this file.
1 /* Author(s) : \file geomtools/Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2013-02-24
4  * Last modified: 2013-02-24
5  *
6  * License:
7  *
8  * Description:
9  *
10  * A geometry manager plugin with embeded mapping.
11  *
12  * History:
13  *
14  */
15 
16 #ifndef GEOMTOOLS_MAPPING_PLUGIN_H
17 #define GEOMTOOLS_MAPPING_PLUGIN_H 1
18 
19 // This project:
20 #include <geomtools/manager.h>
22 #include <geomtools/mapping.h>
23 
24 namespace geomtools {
25 
28  {
29  public:
30 
32  mapping_plugin ();
33 
35  virtual ~mapping_plugin ();
36 
38  virtual int initialize(const datatools::properties & config_,
40  const datatools::service_dict_type & services_);
41 
43  virtual int reset();
44 
46  virtual bool is_initialized() const;
47 
49  const geomtools::mapping & get_mapping () const;
50 
51  protected:
52 
54  void _build_mapping (const datatools::properties & mapping_config_);
55 
56  private:
57 
58  bool _initialized_; //<! Initialization flag
59  geomtools::mapping _mapping_; //<! Embeded mapping instance
60 
62 
63  };
64 
65 } // end of namespace geomtools
66 
67 #endif // GEOMTOOLS_MAPPING_PLUGIN_H
68 
69 /*
70 ** Local Variables: --
71 ** mode: c++ --
72 ** c-file-style: "gnu" --
73 ** tab-width: 2 --
74 ** End: --
75 */
The geometry ID mapping.
Definition: mapping.h:43
virtual ~mapping_plugin()
Destructor.
std::map< std::string, service_entry_ptr > service_dict_type
Type alias for a flat dictionary of service entries.
Definition: service_tools.h:196
The geometry manager's plugin base class.
Definition: manager.h:81
const geomtools::mapping & get_mapping() const
Returns a non-mutable reference to the embeded mapping instance.
virtual int reset()
Plugin reset method.
void _build_mapping(const datatools::properties &mapping_config_)
Internal mapping build method.
A geometry manager plugin with embeded mapping with its specific mapping rules.
Definition: mapping_plugin.h:27
std::map< std::string, plugin_entry > plugins_dict_type
Dictionary of plugin entries.
Definition: manager.h:75
virtual int initialize(const datatools::properties &config_, const geomtools::manager::plugins_dict_type &plugins_, const datatools::service_dict_type &services_)
Main plugin initialization method.
#define GEOMTOOLS_PLUGIN_REGISTRATION_INTERFACE(PLUGIN_CLASS_NAME)
Definition: manager_macros.h:92
mapping_plugin()
Default constructor.
virtual bool is_initialized() const
Check if plugin is initialized.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125