diff options
Diffstat (limited to 'project2/common/aggregate.h')
| -rw-r--r-- | project2/common/aggregate.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/project2/common/aggregate.h b/project2/common/aggregate.h index 7f33b6b..222cf09 100644 --- a/project2/common/aggregate.h +++ b/project2/common/aggregate.h @@ -4,8 +4,9 @@ #include "scripts.h" #include "variables.h" #include <boost/function.hpp> +#include <visibility.h> -class Aggregate : public SourceObject { +class DLL_PUBLIC Aggregate : public SourceObject { public: Aggregate(ScriptNodePtr); @@ -17,21 +18,23 @@ class Aggregate : public SourceObject { Variable value; }; -class ValueAggregate : public Aggregate { +class DLL_PUBLIC ValueAggregate : public Aggregate { public: ValueAggregate(ScriptNodePtr); virtual VariableType resultValue() const = 0; }; -typedef boost::intrusive_ptr<const ValueAggregate> ValueAggregateCPtr; +typedef std::shared_ptr<const ValueAggregate> ValueAggregateCPtr; +typedef AdHoc::Factory<ValueAggregate, std::shared_ptr<const ScriptNode>> ValueAggregateFactory; -class SetAggregate : public Aggregate { +class DLL_PUBLIC SetAggregate : public Aggregate { public: typedef boost::function1<void, VariableType> UseAgg; SetAggregate(ScriptNodePtr); virtual void onResultValues(const UseAgg &) const = 0; }; -typedef boost::intrusive_ptr<const SetAggregate> SetAggregateCPtr; +typedef std::shared_ptr<const SetAggregate> SetAggregateCPtr; +typedef AdHoc::Factory<SetAggregate, std::shared_ptr<const ScriptNode>> SetAggregateFactory; #endif |
