summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dalstorage.h45
1 files changed, 33 insertions, 12 deletions
diff --git a/src/dalstorage.h b/src/dalstorage.h
index 0bde7d33..a95ede9f 100644
--- a/src/dalstorage.h
+++ b/src/dalstorage.h
@@ -37,23 +37,18 @@ namespace tmwserv
/**
* A storage class that relies on DAL.
+ *
+ * Notes:
+ * - this class cannot be instanciated nor duplicated in order to force
+ * a user class to use the Storage singleton.
*/
class DALStorage: public Storage
{
- public:
- /**
- * Constructor.
- */
- DALStorage(void);
-
-
- /**
- * Destructor.
- */
- ~DALStorage(void)
- throw();
+ // friend so that Storage can call the constructor.
+ friend class Storage;
+ public:
/**
* Save changes to the database permanently.
*/
@@ -83,6 +78,32 @@ class DALStorage: public Storage
private:
/**
+ * Constructor.
+ */
+ DALStorage(void);
+
+
+ /**
+ * Destructor.
+ */
+ ~DALStorage(void)
+ throw();
+
+
+ /**
+ * Copy constructor.
+ */
+ DALStorage(const DALStorage& rhs);
+
+
+ /**
+ * Assignment operator.
+ */
+ DALStorage&
+ operator=(const DALStorage& rhs);
+
+
+ /**
* Connect to the database and initialize it if necessary.
*/
void