# HG changeset patch # User Alpar Juttner # Date 2008-01-04 21:42:16 # Node ID 742abd64255e03c86128e1d376e4fde0f907f0e0 # Parent 72364ba3466d1a07ad4b6313794d792d3e35dd6d # Parent e337bdf46777bc84e1e3ddaef0714c509ae3ae90 Merge diff --git a/lemon/concept_check.h b/lemon/concept_check.h --- a/lemon/concept_check.h +++ b/lemon/concept_check.h @@ -33,8 +33,8 @@ // See http://www.boost.org/libs/concept_check for documentation. -#ifndef LEMON_BOOST_CONCEPT_CHECKS_HPP -#define LEMON_BOOST_CONCEPT_CHECKS_HPP +#ifndef LEMON_CONCEPT_CHECKS_H +#define LEMON_CONCEPT_CHECKS_H namespace lemon { @@ -102,4 +102,4 @@ } // namespace lemon -#endif // LEMON_BOOST_CONCEPT_CHECKS_HPP +#endif // LEMON_CONCEPT_CHECKS_H diff --git a/lemon/concepts/maps.h b/lemon/concepts/maps.h --- a/lemon/concepts/maps.h +++ b/lemon/concepts/maps.h @@ -34,6 +34,9 @@ /// @{ /// Readable map concept + + /// Readable map concept. + /// template class ReadMap { @@ -45,7 +48,7 @@ /// Returns the value associated with a key. - /// \bug Value should n't need to be default constructible. + /// \bug Value shouldn't need to be default constructible. /// Value operator[](const Key &) const {return Value();} @@ -71,6 +74,9 @@ /// Writable map concept + + /// Writable map concept. + /// template class WriteMap { @@ -107,7 +113,10 @@ }; }; - ///Read/Writable map concept + /// Read/Writable map concept + + /// Read/writable map concept. + /// template class ReadWriteMap : public ReadMap, public WriteMap @@ -133,7 +142,10 @@ }; - ///Dereferable map concept + /// Dereferable map concept + + /// Dereferable map concept. + /// template class ReferenceMap : public ReadWriteMap { @@ -156,12 +168,11 @@ ///Returns a reference to the value associated to a key. Reference operator[](const Key &) { return tmp; } ///Returns a const reference to the value associated to a key. - ConstReference operator[](const Key &) const - { return tmp; } + ConstReference operator[](const Key &) const { return tmp; } /// Sets the value associated with a key. void set(const Key &k,const Value &t) { operator[](k)=t; } - // \todo rethink this concept + /// \todo Rethink this concept. template struct ReferenceMapConcept { @@ -190,5 +201,7 @@ // @} } //namespace concepts + } //namespace lemon + #endif // LEMON_CONCEPT_MAPS_H