#ifndef __SITECING_SITESPACE_H #define __SITECING_SITESPACE_H #include #include #include #include "sitecing/component_factory.h" #include "sitecing/component_so.h" #include "sitecing/configuration.h" /** * @file * @brief The sitespace class declaration. */ namespace sitecing { using namespace std; /** * The class responsible for handling the whole environment (as far as I can * remember). */ class sitespace { public: /** * The type for the map of components from the component name/path * to the loaded component objects. */ typedef map components_t; /** * The type for listing the components. */ typedef list sentenced_t; /** * The main configuration object. */ configuration& config; /** * The components producing factory. */ component_factory factory; /** * The components loaded. */ components_t components; /** * The list of components sentenced to death. */ sentenced_t sentenced; /** * Create an object in accordance with the configuration parsed. * @param c the coniguration container. */ sitespace(configuration& c); ~sitespace(); /** * Fetch the component, providing it with the interface object * pointer. * @param c the component name. * @param scif the interface object. * @return the component fetches. */ so_component fetch(const string& c,sitecing_interface* scif); private: /** * Execute the death sentence as much as we can. */ void execute_sentenced(); }; } #endif /* __SITECING_SITESPACE_H */