From a12d64c24ed2446502340dfd6f9c87e2e4efb5cb Mon Sep 17 00:00:00 2001 From: jwellbelove Date: Thu, 18 Dec 2014 20:03:32 +0000 Subject: [PATCH] Comment changes --- observer.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/observer.h b/observer.h index 2ecc9d05..34be9851 100644 --- a/observer.h +++ b/observer.h @@ -42,20 +42,20 @@ SOFTWARE. /// remain 'abstract' and will not compile. /// This ensures that no overload can be forgotten.
/// -/// \li Subject
+/// \li observable
/// The class derived from this will be observed by the above class. /// It keeps a list of registered observers and will notify all -/// of them with the notification when instructed. +/// of them with the notifications. ///\ingroup patterns //***************************************************************************** #include #include "vector.h" #include "exception.h" +#include "error_handler.h" namespace etl { -#ifdef ETL_THROW_EXCEPTIONS //*************************************************************************** ///\ingroup observer /// The base class for observer exceptions. @@ -83,11 +83,10 @@ namespace etl { } }; -#endif //********************************************************************* /// The object that is being observed. - ///\tparam TObserver The observer type. + ///\tparam TObserver The observer type. ///\tparam MAX_OBSERVERS The maximum number of observers that can be accomodated. ///\ingroup observer //********************************************************************* @@ -103,7 +102,7 @@ namespace etl //***************************************************************** /// Add an observer to the list. /// If ETL_THROW_EXCEPTIONS is defined then an etl::observable_observer_list_full - /// is thrown if the observer list is already full. + /// is emitted if the observer list is already full. ///\param observer A reference to the observer. //***************************************************************** void add_observer(TObserver& observer) @@ -127,6 +126,11 @@ namespace etl { throw observer_list_full(); } +#else + else + { + error_handler::error(observer_list_full()); + } #endif } }