29 #ifndef DATATOOLS_SERVICE_TOOLS_H 30 #define DATATOOLS_SERVICE_TOOLS_H 40 #include <boost/cstdint.hpp> 149 bool has_master(
const std::string& name_)
const;
152 virtual void tree_dump(std::ostream& out_ = std::clog,
153 const std::string & title_ =
"",
154 const std::string & indent_ =
"",
155 bool inherit_ =
false)
const;
177 std::string service_name;
179 std::string service_id;
200 const std::string & service_name_);
204 const std::string & service_type_id_,
205 const std::string & service_name_);
210 bool duplicate_throw_ =
false);
214 const std::string & service_type_id_,
215 std::string & service_name_);
219 const std::string & service_type_id_,
220 std::vector<std::string> & service_names_);
224 const std::string & service_name_);
228 const std::string & service_name_);
232 #endif // DATATOOLS_SERVICE_TOOLS_H uint32_t get_service_status() const
Return the service status.
void set_service_config(const datatools::properties &)
Set the service configuration.
service_dependency_dict_type service_masters
The list of services the service depends on (by names)
Definition: service_tools.h:187
Empty flag.
Definition: service_tools.h:92
Initialization flag.
Definition: service_tools.h:94
bool is_initialized() const
Check if the service object is initialized.
service_manager & grab_service_manager()
Return a mutable reference to the service manager.
datatools::properties & grab_service_config()
Return a reference to the mutable service configuration.
Utility macros for exception handling.
Broken dependency flag.
Definition: service_tools.h:95
const std::string & get_service_name() const
Return the service name.
void reset_service_status(uint32_t)
Reset the service status.
Internal entry for service objects stored in the service manager class.
Definition: service_tools.h:85
service_entry()
Default constructor.
bool has_master(const std::string &name_) const
Check if the service object has master service with given name.
service_handle_type & grab_service_handle()
Return a handle to the mutable service.
bool has_service_manager() const
Check if service manager is available.
void set_service_id(const std::string &)
Set the service identifier.
~service_entry()
Destructor.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
void set_service_manager(service_manager &smgr_)
Set the service manager.
void update_service_status(uint32_t)
Update the service status.
const datatools::properties & get_service_config() const
Return a reference to the non mutable service configuration.
bool is_created() const
Check if the service object is instantiated.
const service_handle_type & get_service_handle() const
Return a handle to the non mutable service.
Creation/instantiation flag.
Definition: service_tools.h:93
const service_manager & get_service_manager() const
Return a reference to the service manager.
bool can_be_dropped() const
Check if service can be dropped.
void set_service_name(const std::string &)
Set the service name.
const std::string & get_service_id() const
Return the service identifier.
status_type
Service status flags.
Definition: service_tools.h:91