diff --git a/src/proc/control/typed-allocation-manager.hpp b/src/lib/typed-allocation-manager.hpp similarity index 98% rename from src/proc/control/typed-allocation-manager.hpp rename to src/lib/typed-allocation-manager.hpp index 346ad1b17..febfc8449 100644 --- a/src/proc/control/typed-allocation-manager.hpp +++ b/src/lib/typed-allocation-manager.hpp @@ -77,7 +77,7 @@ -namespace control { ////////////////////////////////////////////////////////////TODO: should go into namespace lib +namespace lib { using std::tr1::shared_ptr; @@ -318,5 +318,5 @@ namespace control { //////////////////////////////////////////////////////////// return allocCnt_.get(); } -} // namespace control +} // namespace lib #endif diff --git a/src/proc/control/command-argument-holder.hpp b/src/proc/control/command-argument-holder.hpp index c2bcbb0f7..3248c11ce 100644 --- a/src/proc/control/command-argument-holder.hpp +++ b/src/proc/control/command-argument-holder.hpp @@ -42,7 +42,7 @@ #ifndef CONTROL_COMMAND_ARGUMENT_HOLDER_H #define CONTROL_COMMAND_ARGUMENT_HOLDER_H -#include "proc/control/typed-allocation-manager.hpp" +#include "lib/typed-allocation-manager.hpp" #include "proc/control/argument-tuple-accept.hpp" #include "proc/control/command-closure.hpp" #include "proc/control/memento-tie.hpp" @@ -54,6 +54,7 @@ namespace control { + using lib::TypedAllocationManager; using lib::InPlaceBuffer; using std::string; diff --git a/src/proc/control/command-closure.hpp b/src/proc/control/command-closure.hpp index 73b94ceda..1519ec113 100644 --- a/src/proc/control/command-closure.hpp +++ b/src/proc/control/command-closure.hpp @@ -77,7 +77,7 @@ #include "lib/format.hpp" #include "lib/util.hpp" #include "proc/control/argument-erasure.hpp" -#include "proc/control/typed-allocation-manager.hpp" +#include "lib/typed-allocation-manager.hpp" #include #include @@ -98,6 +98,7 @@ namespace control { using lumiera::typelist::StoreFunction; using lumiera::typelist::NullType; + using lib::TypedAllocationManager; using util::unConst; using std::tr1::function; using std::ostream; diff --git a/src/proc/control/command-impl.hpp b/src/proc/control/command-impl.hpp index 92871a509..0a2161cbe 100644 --- a/src/proc/control/command-impl.hpp +++ b/src/proc/control/command-impl.hpp @@ -45,7 +45,7 @@ #include "proc/control/command.hpp" #include "proc/control/command-closure.hpp" #include "proc/control/command-mutation.hpp" -#include "proc/control/typed-allocation-manager.hpp" +#include "lib/typed-allocation-manager.hpp" #include "lib/bool-checkable.hpp" #include @@ -57,6 +57,7 @@ namespace control { + using lib::TypedAllocationManager; using std::tr1::function; using std::tr1::shared_ptr; diff --git a/src/proc/control/command-registry.hpp b/src/proc/control/command-registry.hpp index 3e90d7cf9..269bd8b2d 100644 --- a/src/proc/control/command-registry.hpp +++ b/src/proc/control/command-registry.hpp @@ -68,7 +68,7 @@ #include "proc/control/command.hpp" #include "proc/control/command-signature.hpp" #include "proc/control/command-argument-holder.hpp" -#include "proc/control/typed-allocation-manager.hpp" +#include "lib/typed-allocation-manager.hpp" #include #include @@ -85,6 +85,7 @@ namespace control { using boost::noncopyable; using std::tr1::shared_ptr; using std::tr1::unordered_map; + using lib::TypedAllocationManager; using util::getValue_or_default; using util::contains; using std::string; diff --git a/tests/40components.tests b/tests/40components.tests index 1d6dacbf9..01d959a34 100644 --- a/tests/40components.tests +++ b/tests/40components.tests @@ -853,7 +853,7 @@ return: 0 END -TEST "TypedAllocationManager_test" TypedAllocationManager_test < -//#include -//#include -//#include #include -//#include -namespace control { -namespace test { - - -// using boost::format; -// using boost::str; - //using lumiera::Time; - //using util::contains; - using std::tr1::shared_ptr; -// using std::tr1::bind; -// using std::string; - using std::rand; - //using std::cout; - //using std::endl; -// using lib::test::showSizeof; +namespace lib { +namespace test{ + + using util::isSameObject; -// using util::contains; - -// using session::test::TestClip; -// using lib::Symbol; -// using lumiera::P; + using std::tr1::shared_ptr; + using std::rand; - //using lumiera::typelist::BuildTupleAccessor; -// using lumiera::error::LUMIERA_ERROR_EXTERNAL; namespace { // test data and helpers... @@ -99,7 +74,7 @@ namespace test { * @test cover the basic implementation of a custom allocator, delegating to mpool. * TypedAllocationManager is a base class, used e.g. to build the CommandRegistry. * - * @todo planned but not implemented as of 8/09 see also Ticket #217 + * @todo as of 9/09 we do heap allocation, but we should use mpool -- see also Ticket #219 * * @see CommandRegistry * @see command-registry-test.cpp @@ -162,4 +137,4 @@ namespace test { LAUNCHER (TypedAllocationManager_test, "unit common"); -}} // namespace control::test +}} // namespace lib::test