From 59f0ba70166af0781bde3010e408cd52aed9a113 Mon Sep 17 00:00:00 2001 From: Francois Bleibel <fbleibel@gmail.com> Date: Thu, 24 Jun 2010 12:41:54 +0900 Subject: [PATCH] Removed all using namespace directives from headers. Some minor resulting bugfixes. --- include/dynamic-graph/all-signals.h | 6 ++---- include/dynamic-graph/signal-caster.h | 2 +- include/dynamic-graph/signal-ptr.t.cpp | 3 ++- include/dynamic-graph/signal.t.cpp | 4 +++- include/dynamic-graph/time-dependency.h | 6 ++++++ include/dynamic-graph/time-dependency.t.cpp | 4 ++-- unitTesting/test_depend.cpp | 2 +- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/dynamic-graph/all-signals.h b/include/dynamic-graph/all-signals.h index 82f3175..c305eff 100644 --- a/include/dynamic-graph/all-signals.h +++ b/include/dynamic-graph/all-signals.h @@ -2,18 +2,16 @@ * all-signals.h * * Created on: Jun 16, 2010 - * Author: blue + * Author: Francois Bleibel */ #ifndef ALLSIGNALS_H_ #define ALLSIGNALS_H_ -/// Utility header files including all signals and using namespace dynamicgraph +/// Utility header files including all signal headers #include <dynamic-graph/signal.h> #include <dynamic-graph/signal-ptr.h> #include <dynamic-graph/signal-time-dependant.h> -using namespace dynamicgraph; - #endif /* ALLSIGNALS_H_ */ diff --git a/include/dynamic-graph/signal-caster.h b/include/dynamic-graph/signal-caster.h index 3c5700c..1f65c73 100644 --- a/include/dynamic-graph/signal-caster.h +++ b/include/dynamic-graph/signal-caster.h @@ -2,7 +2,7 @@ * SignalCaster.h * * Created on: Jun 14, 2010 - * Author: blue + * Author: Francois Bleibel */ #ifndef SIGNALCASTER_H_ diff --git a/include/dynamic-graph/signal-ptr.t.cpp b/include/dynamic-graph/signal-ptr.t.cpp index b89ca4b..a0bcd64 100644 --- a/include/dynamic-graph/signal-ptr.t.cpp +++ b/include/dynamic-graph/signal-ptr.t.cpp @@ -29,7 +29,7 @@ #define VP_TEMPLATE_DEBUG_MODE 0 #include <dynamic-graph/debug.h> -using namespace dynamicgraph; +namespace dynamicgraph { template< class T,class Time > bool SignalPtr<T,Time>:: @@ -262,6 +262,7 @@ displayDependancies( std::ostream& os,const int depth, return os; } +} // namespace dynamicgraph #endif // #ifndef __SIGNAL_PTR_TCPP diff --git a/include/dynamic-graph/signal.t.cpp b/include/dynamic-graph/signal.t.cpp index 1eeab4c..0d00e7d 100644 --- a/include/dynamic-graph/signal.t.cpp +++ b/include/dynamic-graph/signal.t.cpp @@ -30,7 +30,7 @@ #define VP_TEMPLATE_DEBUG_MODE 0 #include <dynamic-graph/debug.h> -using namespace dynamicgraph; +namespace dynamicgraph { #define __SIGNAL_INIT(name,Tcpy,Tref,TrefNC,mutex) \ SignalBase<Time>(name) \ @@ -327,6 +327,8 @@ display (std::ostream& os) const return os<<")"; } +} // namespace dynamicgraph + #endif // #ifndef __SIGNAL_TEMPLATE /* diff --git a/include/dynamic-graph/time-dependency.h b/include/dynamic-graph/time-dependency.h index ca0cc3f..3a4f1ec 100644 --- a/include/dynamic-graph/time-dependency.h +++ b/include/dynamic-graph/time-dependency.h @@ -29,6 +29,9 @@ #include <dynamic-graph/signal-base.h> #include <dynamic-graph/signal-array.h> +namespace dynamicgraph { + + template< class Time > class TimeDependancy { @@ -90,6 +93,9 @@ class TimeDependancy }; +} // namespace dynamicgraph + + #include <dynamic-graph/time-dependency.t.cpp> #endif /* #ifndef __TIME_DEPENDANCY_HH */ diff --git a/include/dynamic-graph/time-dependency.t.cpp b/include/dynamic-graph/time-dependency.t.cpp index e35c472..de3000f 100644 --- a/include/dynamic-graph/time-dependency.t.cpp +++ b/include/dynamic-graph/time-dependency.t.cpp @@ -25,7 +25,7 @@ #include <dynamic-graph/time-dependency.h> -using namespace dynamicgraph; +namespace dynamicgraph { #undef VP_TEMPLATE_DEBUG_MODE #define VP_TEMPLATE_DEBUG_MODE 0 @@ -176,7 +176,7 @@ displayDependancies( std::ostream& os,const int depth, return os; } - +} // namespace dynamicgraph #endif /* #ifndef __TIME_DEPENDANCY_TCPP */ diff --git a/unitTesting/test_depend.cpp b/unitTesting/test_depend.cpp index 6f0bb28..13d2e54 100644 --- a/unitTesting/test_depend.cpp +++ b/unitTesting/test_depend.cpp @@ -30,7 +30,7 @@ #include <string> using namespace std; - +using namespace dynamicgraph; -- GitLab