Bayeux  3.4.1
Core Foundation library for SuperNEMO
geometry_service.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date : 2011-06-07
4  * Last modified : 2013-12-14
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  * Description:
24  *
25  * Generic geometry service.
26  *
27  * History:
28  *
29  */
30 
31 #ifndef GEOMTOOLS_GEOMETRY_SERVICE_H
32 #define GEOMTOOLS_GEOMETRY_SERVICE_H 1
33 
34 // Standard library:
35 #include <iostream>
36 #include <string>
37 
38 // Third party :
39 // - Bayeux/datatools:
40 #include <datatools/base_service.h>
42 
43 namespace datatools {
44  class properties;
45 }
46 
47 namespace geomtools {
48 
49  class manager;
50 
53  {
54 
55  public:
56 
58  virtual bool is_initialized () const;
59 
61  virtual int initialize (const datatools::properties & a_config,
62  datatools::service_dict_type & a_service_dict);
63 
65  virtual int reset ();
66 
68  const geomtools::manager & get_geom_manager () const;
69 
72 
74  virtual ~geometry_service ();
75 
77  virtual void tree_dump (std::ostream & a_out = std::clog,
78  const std::string & a_title = "",
79  const std::string & a_indent = "",
80  bool a_inherit = false) const;
81 
82  private:
83 
84  bool _initialized_;
85  geomtools::manager * _geom_manager_;
86 
87  // Registration :
89 
90  };
91 
92 } // end of namespace geomtools
93 
94 #include <datatools/ocd_macros.h>
95 
96 // Declare the OCD interface of the module
98 
99 #endif // GEOMTOOLS_GEOMETRY_SERVICE_H
100 
101 /*
102 ** Local Variables: --
103 ** mode: c++ --
104 ** c-file-style: "gnu" --
105 ** tab-width: 2 --
106 ** End: --
107 */
const geomtools::manager & get_geom_manager() const
Return a reference to the non mutable geoemtry manager.
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 base service class.
Definition: base_service.h:68
virtual int reset()
Termination.
#define DATATOOLS_SERVICE_REGISTRATION_INTERFACE(SERVICE_CLASS_NAME)
Definition: base_service.h:152
virtual ~geometry_service()
Destructor.
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
virtual bool is_initialized() const
Check initialization flag.
Generic geometry service.
Definition: geometry_service.h:52
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
Geometry manager for virtual geometry modelling. Main geometry manager for the modelisation of variou...
Definition: manager.h:70
virtual void tree_dump(std::ostream &a_out=std::clog, const std::string &a_title="", const std::string &a_indent="", bool a_inherit=false) const
Smart print.
geometry_service()
Default constructor.
virtual int initialize(const datatools::properties &a_config, datatools::service_dict_type &a_service_dict)
Initialization.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125