Commit 795bcd09 authored by Robert Menzel's avatar Robert Menzel
Browse files

Moved shared pointer includes

The shared and weak pointers are now included via ACGL.hh, this way there is one
one central place to replace the pointers if needed (C++11, TR1, boost, own variant).
For this, they are placed in a ptr namespace so std:: (C++11) and str::tr1:: (C++98)
variants as well as boost and own implementations can all get redirected.
C++11 detection added and correct non-tr1 header include added (should make VS2010
porting easier).
parent cff02428
......@@ -8,7 +8,6 @@
#include <vector>
#include <string>
#include <tr1/memory>
#include <iostream>
#include <ACGL/ACGL.hh>
......
......@@ -13,8 +13,6 @@
* making managers more flexibe.
*/
#include <tr1/memory>
#include <ACGL/ACGL.hh>
namespace ACGL{
......@@ -27,7 +25,7 @@ class BasicCreateController
// ========================================================================================== INTERFACE \/
// ==================================================================================================== \/
public:
virtual std::tr1::shared_ptr<RESOURCE> create(void) = 0;
virtual ptr::shared_ptr<RESOURCE> create(void) = 0;
};
} // Resource
......
......@@ -13,8 +13,6 @@
* making managers more flexibe.
*/
#include <tr1/memory>
#include <ACGL/ACGL.hh>
namespace ACGL{
......@@ -27,7 +25,7 @@ class BasicUpdateController
// ========================================================================================== INTERFACE \/
// ==================================================================================================== \/
public:
virtual bool update(std::tr1::shared_ptr<RESOURCE>&) = 0;
virtual bool update(ptr::shared_ptr<RESOURCE>&) = 0;
};
} // Resource
......
......@@ -11,7 +11,6 @@
#include <ACGL/Base/Macros.hh>
#include <ACGL/Resource/FileController.hh>
#include <tr1/memory>
#include <map>
#include <string>
......@@ -24,7 +23,7 @@ class FileManager : public Base::Singleton< FileManager<RESOURCE> >
ACGL_SINGLETON(FileManager<RESOURCE>)
public:
typedef std::tr1::shared_ptr< FileController<RESOURCE> > SharedController;
typedef ptr::shared_ptr< FileController<RESOURCE> > SharedController;
ACGL_SHARED_TYPEDEF(RESOURCE)
struct Resource
{
......
......@@ -10,7 +10,6 @@
#include <ACGL/Base/Singleton.hh>
#include <ACGL/Resource/BasicCreateController.hh>
#include <tr1/memory>
#include <map>
#include <string>
......@@ -23,7 +22,7 @@ class NameManager : public Base::Singleton< NameManager<RESOURCE> >
friend class Base::Singleton< NameManager<RESOURCE> >;
public:
typedef std::tr1::shared_ptr<RESOURCE> SharedResource;
typedef ptr::shared_ptr<RESOURCE> SharedResource;
typedef std::map<std::string, SharedResource> ResourceMap;
typedef ResourceMap ResourceContainer;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment