3D Audio GSoC:
[blender.git] / intern / audaspace / intern / AUD_Reference.h
index 25cc7bcda58a05e0127a284b3b872d3969f065d6..3977b22a1dd5ad0d3b18e56ba274b8caa57decc4 100644 (file)
 #include <typeinfo>
 #endif
 
+/**
+ * This class handles the reference counting.
+ */
 class AUD_ReferenceHandler
 {
 private:
+       /**
+        * Saves the reference counts.
+        */
        static std::map<void*, int> m_references;
 
 public:
+       /**
+        * Reference increment.
+        * \param reference The reference.
+        */
        static inline void incref(void* reference)
        {
                if(!reference)
@@ -62,6 +72,11 @@ public:
                }
        }
 
+       /**
+        * Reference decrement.
+        * \param reference The reference.
+        * \return Whether the reference has to be deleted.
+        */
        static inline bool decref(void* reference)
        {
                if(!reference)
@@ -193,6 +208,9 @@ public:
                return m_reference;
        }
 
+       /**
+        * Returns the original pointer.
+        */
        inline void* getOriginal() const
        {
                return m_original;