diff --git a/src/common/util.hpp b/src/common/util.hpp index 00c7bb638..402cbb435 100644 --- a/src/common/util.hpp +++ b/src/common/util.hpp @@ -31,10 +31,10 @@ -namespace util - { +namespace util { + using std::string; - + template inline int @@ -43,7 +43,7 @@ namespace util return (n==0)? 0 :((n<0)? -1:+1 ); } - + /** a family of util functions providing a "no value whatsoever" test. Works on strings and all STL containers, includes NULL test for pointers */ template @@ -65,7 +65,7 @@ namespace util { return !pCStr || 0 == std::strlen(pCStr); } - + /** cut a numeric value to be >=0 */ template @@ -100,7 +100,7 @@ namespace util } /** shortcut for brute-force containment test - * in any sequencial container */ + * in any sequential container */ template inline bool contains (SEQ& cont, typename SEQ::const_reference val) @@ -112,7 +112,7 @@ namespace util } /** shortcut for removing all copies of an Element - * in any sequencial collection */ + * in any sequential collection */ template inline typename SEQ::iterator removeall (SEQ& coll, typename SEQ::value_type& val) @@ -187,7 +187,7 @@ namespace util /** produce an identifier based on the given string. * remove non-standard-chars, reduce sequences of punctuation - * and whitespace to single underscores. The sanitized string + * and whitespace to single underscores. The sanitised string * will start with an alphanumeric character. * * @par Example Conversions @@ -215,7 +215,7 @@ namespace util { return org.c_str(); } - + } // namespace util @@ -223,7 +223,7 @@ namespace util /* === some common macro definitions === */ -/** supress "warning: unused variable" on vars, which are +/** suppress "warning: unused variable" on vars, which are * introduced into a scope because of some sideeffect, i.e. Locking */ #define SIDEEFFECT __attribute__ ((unused)); diff --git a/src/lumiera/subsys.hpp b/src/lumiera/subsys.hpp index df7db5255..ad6b37534 100644 --- a/src/lumiera/subsys.hpp +++ b/src/lumiera/subsys.hpp @@ -48,6 +48,7 @@ #include "lumiera/option.hpp" #include +#include //#include //#include #include @@ -59,6 +60,7 @@ namespace lumiera { using std::string; // using boost::scoped_ptr; using boost::noncopyable; + using std::tr1::function; @@ -71,7 +73,7 @@ namespace lumiera { : private noncopyable { public: - typedef void (SigTerm)(Error*); ///////////////////TODO better use Glib-- Signal type? + typedef function SigTerm; virtual ~Subsys(); @@ -81,20 +83,23 @@ namespace lumiera { Subsys& depends (Subsys& prereq); - /** a query to run on the application option state - * to determine if this subsystem should be activated. */ + /** query application option state to determine + * if this subsystem should be activated. */ virtual bool shouldStart (lumiera::Option&) =0; /** how to start up this subsystem. Failure to start up * usually terminates the whole application. When this subsystem * ceases to work, it must assure to activate the given signal. - * @param termination to be signalled by the subsystem. + * @param options may be influencing the operation mode + * @param termination to be signalled by the subsystem. + * @warning termination must be signalled reliably. * @return \c true if actually started. */ - virtual bool start (lumiera::Option&, SigTerm termination) =0; + virtual bool start (lumiera::Option&, SigTerm) =0; /** initiate termination of this subsystem. + * may be called repeatedly any time... * @warning must not block nor throw. */ virtual void triggerShutdown () throw() =0; diff --git a/src/proc/mobject/session/defsregistry.hpp b/src/proc/mobject/session/defsregistry.hpp index 75068ec92..2973b85e7 100644 --- a/src/proc/mobject/session/defsregistry.hpp +++ b/src/proc/mobject/session/defsregistry.hpp @@ -173,7 +173,7 @@ namespace mobject }; - // static vars to organize one Table Slot per type.... + // static vars to organise one Table Slot per type.... template size_t Slot::index (0);