From ce1f37aae46ea95020d7b865f7a80e8abdfad0d8 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sat, 29 Jan 2005 21:21:05 +0000 Subject: initial commit into repository --- (limited to 'include/sitecing/sitespace.h') diff --git a/include/sitecing/sitespace.h b/include/sitecing/sitespace.h new file mode 100644 index 0000000..38fafe4 --- a/dev/null +++ b/include/sitecing/sitespace.h @@ -0,0 +1,76 @@ +#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 */ -- cgit v0.9.0.2