Added more API documentation.
This commit is contained in:
@@ -27,6 +27,8 @@
|
|||||||
//! \class abstract_attribute
|
//! \class abstract_attribute
|
||||||
//! \brief Abstract base class for attributes.
|
//! \brief Abstract base class for attributes.
|
||||||
//!
|
//!
|
||||||
|
//! The class can't be instantiated.
|
||||||
|
//!
|
||||||
class abstract_attribute {
|
class abstract_attribute {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@@ -61,10 +63,12 @@ public:
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
class attribute : public abstract_attribute {
|
class attribute : public abstract_attribute {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//!
|
//!
|
||||||
//! \brief Constructor
|
//! \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.
|
//! \param object Reference to object of type T.
|
||||||
//!
|
//!
|
||||||
explicit attribute(T &object)
|
explicit attribute(T &object)
|
||||||
@@ -98,7 +102,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T &reference;
|
T &reference; //!< Reference to T object.
|
||||||
};
|
};
|
||||||
|
|
||||||
//!
|
//!
|
||||||
@@ -116,6 +120,8 @@ public:
|
|||||||
//!
|
//!
|
||||||
//! Sets named attribute \e attr to value \e value.
|
//! 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) {
|
void set_attribute(const std::string &attr, const std::string &value) {
|
||||||
attributes_map::iterator it = attributes.find(attr);
|
attributes_map::iterator it = attributes.find(attr);
|
||||||
|
|
||||||
@@ -140,7 +146,7 @@ private:
|
|||||||
typedef boost::shared_ptr<abstract_attribute> attribute_ptr;
|
typedef boost::shared_ptr<abstract_attribute> attribute_ptr;
|
||||||
typedef std::map<std::string, attribute_ptr> attributes_map;
|
typedef std::map<std::string, attribute_ptr> attributes_map;
|
||||||
|
|
||||||
attributes_map attributes;
|
attributes_map attributes; //!< internal attributes map.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SETTABLE_HPP */
|
#endif /* SETTABLE_HPP */
|
||||||
|
|||||||
Reference in New Issue
Block a user