summaryrefslogtreecommitdiff
path: root/project2/common/sourceObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'project2/common/sourceObject.h')
-rw-r--r--project2/common/sourceObject.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/project2/common/sourceObject.h b/project2/common/sourceObject.h
index 5e3499c..e5244f0 100644
--- a/project2/common/sourceObject.h
+++ b/project2/common/sourceObject.h
@@ -1,12 +1,10 @@
#ifndef SOURCEOBJECT_H
#define SOURCEOBJECT_H
-#include <boost/intrusive_ptr.hpp>
#include <boost/function.hpp>
#include <string>
#include <map>
#include <visibility.h>
-#include <intrusivePtrBase.h>
#include "scriptLoader.h"
#include "scripts_fwd.h"
@@ -15,8 +13,13 @@ enum DLL_PUBLIC ObjectSource {
Scripted
};
class CommonObjects;
+class DLL_PUBLIC Something {
+ public:
+ virtual ~Something() = default;
+};
+
/// Base class for all Project2 components that can be placed in a Project2 script
-class DLL_PUBLIC SourceObject : public virtual IntrusivePtrBase {
+class DLL_PUBLIC SourceObject : public virtual Something {
public:
typedef int EventID;
typedef boost::function<void()> Event;
@@ -41,7 +44,7 @@ class DLL_PUBLIC SourceObject : public virtual IntrusivePtrBase {
static unsigned int loadOrder;
mutable Events events;
- const ScriptReader * const script;
+ std::weak_ptr<const ScriptReader> const script;
};
#endif