summaryrefslogtreecommitdiffabout
path: root/include/sitecing/sitespace.h
authorMichael Krelin <hacker@klever.net>2005-01-29 21:21:05 (UTC)
committer Michael Krelin <hacker@klever.net>2005-01-29 21:21:05 (UTC)
commitce1f37aae46ea95020d7b865f7a80e8abdfad0d8 (patch) (side-by-side diff)
tree4964383ab8cd7e6d8ea821f1a615d1bbcf98dad8 /include/sitecing/sitespace.h
parent3c75c860fc1ad5b3f5185e23ec6f438dd2528958 (diff)
downloadsitecing-ce1f37aae46ea95020d7b865f7a80e8abdfad0d8.zip
sitecing-ce1f37aae46ea95020d7b865f7a80e8abdfad0d8.tar.gz
sitecing-ce1f37aae46ea95020d7b865f7a80e8abdfad0d8.tar.bz2
initial commit into repository0.0
Diffstat (limited to 'include/sitecing/sitespace.h') (more/less context) (show whitespace changes)
-rw-r--r--include/sitecing/sitespace.h76
1 files changed, 76 insertions, 0 deletions
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 <string>
+#include <map>
+#include <list>
+#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<string,component_so*> components_t;
+ /**
+ * The type for listing the components.
+ */
+ typedef list<component_so*> 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 */