aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-13 20:19:14 +0000
committerlloyd <[email protected]>2008-10-13 20:19:14 +0000
commite21ac3a33cde261736529fed8a1f34b2a1aaf236 (patch)
tree712605b3bf21dd4f423d78ea9bd2976fab09575a /src
parentdd16af0fa865cc5b85ff111323c89d63b2e2fc5c (diff)
Add InSiTo Doxygen comments for freestore.h
Diffstat (limited to 'src')
-rw-r--r--src/cert/cvc/freestore.h44
1 files changed, 40 insertions, 4 deletions
diff --git a/src/cert/cvc/freestore.h b/src/cert/cvc/freestore.h
index abcd1e3ae..e33c0f094 100644
--- a/src/cert/cvc/freestore.h
+++ b/src/cert/cvc/freestore.h
@@ -18,24 +18,60 @@
namespace Botan {
+/**
+* This class is intended as an function call parameter type and
+* enables convenient automatic conversions between plain and smart
+* pointer types. It internally stores a SharedPointer which can be
+* accessed.
+*/
template<typename T>
class BOTAN_DLL SharedPtrConverter
{
public:
typedef std::tr1::shared_ptr<T> SharedPtr;
- SharedPtrConverter() : ptr() {};
- SharedPtrConverter(SharedPtrConverter const& other)
- : ptr(other.ptr) {};
+ /**
+ * Construct a null pointer equivalent object.
+ */
+ SharedPtrConverter() : ptr() {}
+ /**
+ * Copy constructor.
+ */
+ SharedPtrConverter(SharedPtrConverter const& other) :
+ ptr(other.ptr) {}
+
+ /**
+ * Construct a converter object from another pointer type.
+ * @param p the pointer which shall be set as the internally stored
+ * pointer value of this converter.
+ */
template<typename Ptr>
SharedPtrConverter(Ptr p)
- : ptr(p) {};
+ : ptr(p) {}
+ /**
+ * Get the internally stored shared pointer.
+ * @return the internally stored shared pointer
+ */
SharedPtr const& get_ptr() const { return this->ptr; }
+
+ /**
+ * Get the internally stored shared pointer.
+ * @return the internally stored shared pointer
+ */
SharedPtr get_ptr() { return this->ptr; }
+ /**
+ * Get the internally stored shared pointer.
+ * @return the internally stored shared pointer
+ */
SharedPtr const& get_shared() const { return this->ptr; }
+
+ /**
+ * Get the internally stored shared pointer.
+ * @return the internally stored shared pointer
+ */
SharedPtr get_shared() { return this->ptr; }
private: