Added more API documentation.

This commit is contained in:
Jens Luedicke
2011-01-23 17:50:31 +01:00
parent ee303aa707
commit 5ba97afde9

View File

@@ -27,6 +27,8 @@
//! \class abstract_attribute
//! \brief Abstract base class for attributes.
//!
//! The class can't be instantiated.
//!
class abstract_attribute {
public:
@@ -61,10 +63,12 @@ public:
template<typename T>
class attribute : public abstract_attribute {
public:
//!
//! \brief Constructor
//!
//! Constructs an attribute object for \e object. \e object needs to
//! be an Assignable type.
//!
//! \param object Reference to object of type T.
//!
explicit attribute(T &object)
@@ -98,7 +102,7 @@ public:
}
private:
T &reference;
T &reference; //!< Reference to T object.
};
//!
@@ -116,6 +120,8 @@ public:
//!
//! Sets named attribute \e attr to value \e value.
//!
//! Calling this method with an registered attribute \e attr has no effect.
//!
void set_attribute(const std::string &attr, const std::string &value) {
attributes_map::iterator it = attributes.find(attr);
@@ -140,7 +146,7 @@ private:
typedef boost::shared_ptr<abstract_attribute> attribute_ptr;
typedef std::map<std::string, attribute_ptr> attributes_map;
attributes_map attributes;
attributes_map attributes; //!< internal attributes map.
};
#endif /* SETTABLE_HPP */