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.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/project2/common/sourceObject.h b/project2/common/sourceObject.h
new file mode 100644
index 0000000..3ebae2c
--- /dev/null
+++ b/project2/common/sourceObject.h
@@ -0,0 +1,26 @@
+#ifndef SOURCEOBJECT_H
+#define SOURCEOBJECT_H
+
+#include <libxml++/nodes/element.h>
+#include <boost/intrusive_ptr.hpp>
+#include "intrusivePtrBase.h"
+
+class CommonObjects;
+class SourceObject;
+typedef boost::intrusive_ptr<SourceObject> SourceObjectPtr;
+/// Base class for all Project2 components that can be placed in a Project2 script
+class SourceObject : public virtual IntrusivePtrBase {
+ public:
+ SourceObject(const xmlpp::Element * p);
+ SourceObject(const std::string & name);
+ virtual ~SourceObject() = 0;
+
+ virtual void loadComplete(const CommonObjects *) = 0;
+
+ const std::string name;
+ const unsigned int order;
+ private:
+ static unsigned int loadOrder;
+};
+
+#endif