summaryrefslogtreecommitdiff
path: root/server/src/configuration.h
diff options
context:
space:
mode:
authordeva <deva>2007-09-03 09:11:33 +0000
committerdeva <deva>2007-09-03 09:11:33 +0000
commita34402b79b38624a29ed8ea4e059af817266e6b8 (patch)
tree4df1d9a5756e37c304ddd8b58ed3e12c4a3894c1 /server/src/configuration.h
parent27bc1afc3aa6e0b4465946aa870573499b85ae5d (diff)
Implemented the first version of the XML request. Fixed eXpat incompatability with XML_Get/SetUserData and the void* in the handler functions.
Diffstat (limited to 'server/src/configuration.h')
-rw-r--r--server/src/configuration.h82
1 files changed, 40 insertions, 42 deletions
diff --git a/server/src/configuration.h b/server/src/configuration.h
index 38dd233..1b851f3 100644
--- a/server/src/configuration.h
+++ b/server/src/configuration.h
@@ -32,57 +32,55 @@
#include "exception.h"
-namespace Pentominos {
+/**
+ * This exception is thrown by Configuration when reload fails.
+ */
+class ConfigurationException: public Exception {
+public:
+ ConfigurationException(std::string reason) :
+ Exception(reason) {}
+};
+/**
+ * This is the pentominos configuration class.\n
+ * It simply wraps the libconfig c++ interface. It can be found at
+ * http://www.hyperrealm.com/libconfig/libconfig.html\n
+ * To find out how the interface works, see
+ * http://www.hyperrealm.com/libconfig/libconfig_manual.html#The-C_002b_002b-API
+ */
+class Configuration : public libconfig::Config {
+public:
/**
- * This exception is thrown by Configuration when reload fails.
+ * Constructor.\n
+ * @param filename The filename to be loaded.
*/
- class ConfigurationException: public Pentominos::Exception {
- public:
- ConfigurationException(std::string reason) :
- Pentominos::Exception(reason) {}
- };
+ Configuration(std::string filename);
/**
- * This is the pentominos configuration class.\n
- * It simply wraps the libconfig c++ interface. It can be found at
- * http://www.hyperrealm.com/libconfig/libconfig.html\n
- * To find out how the interface works, see
- * http://www.hyperrealm.com/libconfig/libconfig_manual.html#The-C_002b_002b-API
+ * reload, simply reloads the configuration file attached to the configuration
+ * object.
*/
- class Configuration : public libconfig::Config {
- public:
- /**
- * Constructor.\n
- * @param filename The filename to be loaded.
- */
- Configuration(std::string filename);
+ void reload() throw(ConfigurationException);
- /**
- * reload, simply reloads the configuration file attached to the configuration
- * object.
- */
- void reload() throw(ConfigurationException);
+private:
+ std::string filename;
+};
- private:
- std::string filename;
- };
+/**
+ * Initialize the global configuration.\n
+ * This function sets the Configuration global pointer, that can be reaced through
+ * the config variable.
+ * @param config The value of the Configuration pointer.
+ */
+void initConfig(Configuration *config);
- /**
- * Initialize the global configuration.\n
- * This function sets the Configuration global pointer, that can be reaced through
- * the Pentominos::config variable.
- * @param config The value of the Configuration pointer.
- */
- void initConfig(Configuration *config);
+/**
+ * This function returns the global configuration object pointer.\n
+ * Use initConfig to set it.\n
+ * @return The pointer to the global configuration.
+ */
+Configuration *config()
+ throw(ConfigurationException);
- /**
- * This function returns the global configuration object pointer.\n
- * Use Pentominos::initConfig to set it.\n
- * @return The pointer to the global configuration.
- */
- Configuration *config()
- throw(ConfigurationException);
-};
#endif/*__ARTEFACT_CONFIGURATION_H__*/