Bayeux  3.4.1
Core Foundation library for SuperNEMO
materials_plugin.h
Go to the documentation of this file.
1 /* materials.h
3  * Author(s): François Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2013-02-23
5  * Last modified: 2013-02-23
6  *
7  * License:
8  *
9  * Description:
10  *
11  * materials plugin for the geomtools geometry manager
12  *
13  * History:
14  *
15  */
16 
17 #ifndef GEOMTOOLS_MATERIALS_PLUGIN_H
18 #define GEOMTOOLS_MATERIALS_PLUGIN_H 1
19 
20 // Standard library:
21 #include <cstdlib>
22 #include <iostream>
23 #include <string>
24 #include <exception>
25 
26 // Third party:
27 // - Bayeux/datatools:
28 #include <datatools/properties.h>
29 #include <datatools/utils.h>
30 // - Bayeux/materials:
31 #include <materials/manager.h>
32 
33 // This project:
34 #include <geomtools/manager.h>
36 
37 namespace geomtools {
38 
41  {
42  public:
43 
46 
48  virtual ~materials_plugin ();
49 
51  virtual int initialize(const datatools::properties & config_,
53  const datatools::service_dict_type & services_);
54 
56  virtual int reset();
57 
59  virtual bool is_initialized() const;
60 
62  const materials::manager & get_manager () const;
63 
64  protected:
65 
66  void _build_manager (const datatools::properties & mapping_config_);
67 
68  private:
69 
70  bool _initialized_;
71  materials::manager _manager_;
72 
74 
75  };
76 
77 } // end of namespace geomtools
78 
79 #endif // GEOMTOOLS_MATERIALS_PLUGIN_H
80 
81 /*
82 ** Local Variables: --
83 ** mode: c++ --
84 ** c-file-style: "gnu" --
85 ** tab-width: 2 --
86 ** End: --
87 */
void _build_manager(const datatools::properties &mapping_config_)
materials_plugin()
Default constructor.
A plugin for the geomtools' geometry manager that embeds an isotope/element/material manager.
Definition: materials_plugin.h:40
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
The manager object for isotopes, elements and materials.
Definition: manager.h:53
virtual int reset()
Main reset method.
const materials::manager & get_manager() const
Return a non-mutable reference on a manager of isotopes, elements and materials.
virtual bool is_initialized() const
Check if plugin is initialized.
virtual int initialize(const datatools::properties &config_, const geomtools::manager::plugins_dict_type &plugins_, const datatools::service_dict_type &services_)
Main initialization method.
std::map< std::string, plugin_entry > plugins_dict_type
Dictionary of plugin entries.
Definition: manager.h:75
#define GEOMTOOLS_PLUGIN_REGISTRATION_INTERFACE(PLUGIN_CLASS_NAME)
Definition: manager_macros.h:92
virtual ~materials_plugin()
Destructor.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125