From 4f806e266a24188bc472cf1c2bb1e8512821b968 Mon Sep 17 00:00:00 2001
From: fluxgen <fluxgen>
Date: Sat, 10 May 2003 13:45:50 +0000
Subject: comments

---
 src/Resource.hh  | 53 +++++++++++++++++++++++++++++++----------------------
 src/RootTheme.hh |  8 +++-----
 2 files changed, 34 insertions(+), 27 deletions(-)

diff --git a/src/Resource.hh b/src/Resource.hh
index 0ea2dd1..d657b5b 100644
--- a/src/Resource.hh
+++ b/src/Resource.hh
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: Resource.hh,v 1.11 2003/05/07 11:32:42 fluxgen Exp $
+// $Id: Resource.hh,v 1.12 2003/05/10 13:44:24 fluxgen Exp $
 
 #ifndef RESOURCE_HH
 #define RESOURCE_HH
@@ -27,9 +27,8 @@
 #include "NotCopyable.hh"
 #include <string>
 #include <list>
-/**
-	Base class for resources
-*/
+
+/// Base class for resources, this is only used in ResourceManager
 class Resource_base:private FbTk::NotCopyable
 {
 public:
@@ -66,40 +65,47 @@ public:
 
     ResourceManager() { }
     virtual ~ResourceManager() {}
-    /**
-       load all resouces registered to this class
-    */
+
+    /// Load all resources registered to this class
+    /// @return true on success
     virtual bool load(const char *filename);
-    /**
-       save all resouces registered to this class
-    */
+
+    /// Save all resouces registered to this class
+    /// @return true on success
     virtual bool save(const char *filename, const char *mergefilename=0);
-    /**
-       add resource to list
-    */
+
+    /// Add resource to list, only used in Resource<T>
     template <class T>
     void addResource(Resource<T> &r) {
         m_resourcelist.push_back(&r);
         m_resourcelist.unique();
     }
-    /**
-       Remove a specific resource
-    */
+
+    /// Remove a specific resource, only used in Resource<T>
     template <class T>
     void removeResource(Resource<T> &r) {
         m_resourcelist.remove(&r);
     }
+
 protected:
     static void ensureXrmIsInitialize();
-private:
 
+private:
     static bool m_init;
     ResourceList m_resourcelist;
 };
 
+
+/// Real resource class
 /**
-	Real resource class
-*/
+ * usage: Resource<int> someresource(resourcemanager, 10, "someresourcename", "somealternativename"); \n
+ * and then implement setFromString and getString \n
+ * example: \n
+ * template <> \n
+ * void Resource<int>::setFromString(const char *str) { \n
+ *   *(*this) = atoi(str); \n
+ * }
+ */
 template <typename T>
 class Resource:public Resource_base
 {
@@ -117,10 +123,13 @@ public:
     }
 
     inline void setDefaultValue() {  m_value = m_defaultval; }
+    /// sets resource from string, specialized, must be implemented
     void setFromString(const char *strval);
     inline Resource<T>& operator = (const T& newvalue) { m_value = newvalue;  return *this;}
-	
-    std::string getString();	
+    /// specialized, must be implemented
+    /// @return string value of resource
+    std::string getString();
+
     inline T& operator*() { return m_value; }
     inline const T& operator*() const { return m_value; }
     inline T *operator->() { return &m_value; }
@@ -130,4 +139,4 @@ private:
     ResourceManager &m_rm;
 };
 
-#endif //_RESOURCE_HH_
+#endif // RESOURCE_HH
diff --git a/src/RootTheme.hh b/src/RootTheme.hh
index e848e66..b1b9406 100644
--- a/src/RootTheme.hh
+++ b/src/RootTheme.hh
@@ -19,7 +19,7 @@
 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-// $Id: RootTheme.hh,v 1.1 2003/04/25 10:14:54 fluxgen Exp $
+// $Id: RootTheme.hh,v 1.2 2003/05/10 13:45:50 fluxgen Exp $
 
 #ifndef ROOTTHEME_HH
 #define ROOTTHEME_HH
@@ -30,10 +30,8 @@
 #include <X11/Xlib.h>
 #include <string>
 
-/**
- Contains border color, border size, bevel width and opGC for objects like 
- geometry window in BScreen
-*/
+
+/// Contains border color, border size, bevel width and opGC for objects like geometry window in BScreen
 class RootTheme: public FbTk::Theme {
 public:
     /// constructor
-- 
cgit v0.11.2