- changed namespace

This commit is contained in:
terrorfisch 2014-10-10 23:28:49 +02:00
parent db1b93498d
commit 5248917a6c
2 changed files with 99 additions and 94 deletions

View file

@ -19,13 +19,13 @@ namespace ESM
} }
} }
template< class Base > class DerivedClassStorage;
namespace MWMechanics namespace MWMechanics
{ {
class AiPackage; class AiPackage;
template< class Base > class DerivedClassStorage;
class AiTemporaryBase; class AiTemporaryBase;
typedef DerivedClassStorage<AiTemporaryBase> AiState; typedef DerivedClassStorage<AiTemporaryBase> AiState;

View file

@ -8,8 +8,14 @@
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/type_traits/is_base_of.hpp> #include <boost/type_traits/is_base_of.hpp>
namespace MWMechanics
{
/// \brief stores an object of any class derived from Base /** \brief stores one object of any class derived from Base.
* Requesting a certain dereived class via get() either returns
* the stored object if it has the correct type or otherwise replaces
* it with an object of the requested type.
*/
template< class Base > template< class Base >
class DerivedClassStorage class DerivedClassStorage
{ {
@ -110,8 +116,7 @@ public:
}; };
namespace MWMechanics
{
/// \brief base class for the temporary storage of AiPackages. /// \brief base class for the temporary storage of AiPackages.
/** /**
* Each AI package with temporary values needs a AiPackageStorage class * Each AI package with temporary values needs a AiPackageStorage class