summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-01-24 21:09:32 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-01-24 21:09:32 +0000
commit635f036e9587544c691ee183c726d36f9bb2626c (patch)
tree2519bc6a5aba2e07095d6bb08e844ede9dc3c6fe
parentIgnore IO errors writing CgiResults to clients as they may be gone away (diff)
downloadproject2-635f036e9587544c691ee183c726d36f9bb2626c.tar.bz2
project2-635f036e9587544c691ee183c726d36f9bb2626c.tar.xz
project2-635f036e9587544c691ee183c726d36f9bb2626c.zip
Partially tested global visibility hidden in all projects
-rw-r--r--Jamroot.jam8
-rw-r--r--project2/basics/options/flagSet.h3
-rw-r--r--project2/basics/options/showHelp.h3
-rw-r--r--project2/basics/views/flatView.cpp2
-rw-r--r--project2/basics/views/flatView.h5
-rw-r--r--project2/cgi/cgiAppEngine.h3
-rw-r--r--project2/cgi/cgiContentNegotiate.cpp2
-rw-r--r--project2/cgi/cgiOutputOptions.cpp2
-rw-r--r--project2/cgi/cgiOutputOptions.h2
-rw-r--r--project2/cgi/cgiProgRouter.cpp4
-rw-r--r--project2/cgi/cgiStageDefaultError.cpp2
-rw-r--r--project2/cgi/cgiStagePresent.cpp4
-rw-r--r--project2/cli/claOptions.h5
-rw-r--r--project2/common/aggregate.cpp4
-rw-r--r--project2/common/aggregate.h11
-rw-r--r--project2/common/appInstance.h3
-rw-r--r--project2/common/check.cpp2
-rw-r--r--project2/common/check.h5
-rw-r--r--project2/common/checkHost.h3
-rw-r--r--project2/common/columns.h3
-rw-r--r--project2/common/commonObjects.h3
-rw-r--r--project2/common/dataSource.cpp2
-rw-r--r--project2/common/dataSource.h5
-rw-r--r--project2/common/definedColumns.h5
-rw-r--r--project2/common/exceptions.h9
-rw-r--r--project2/common/execContext.h3
-rw-r--r--project2/common/fileStrmVarWriter.h3
-rw-r--r--project2/common/iHaveParameters.h3
-rw-r--r--project2/common/iHaveSubTasks.h3
-rw-r--r--project2/common/lifeCycle.h3
-rw-r--r--project2/common/logger.h5
-rw-r--r--project2/common/loggerFactory.h5
-rw-r--r--project2/common/options.h3
-rw-r--r--project2/common/optionsSource.h3
-rw-r--r--project2/common/presenter.cpp5
-rw-r--r--project2/common/presenter.h13
-rw-r--r--project2/common/presenterCache.cpp2
-rw-r--r--project2/common/presenterCache.h5
-rw-r--r--project2/common/rowProcessor.h3
-rw-r--r--project2/common/rowSet.cpp2
-rw-r--r--project2/common/rowSet.h7
-rw-r--r--project2/common/rowSetCache.cpp2
-rw-r--r--project2/common/rowSetCache.h5
-rw-r--r--project2/common/scriptLoader.cpp6
-rw-r--r--project2/common/scriptLoader.h3
-rw-r--r--project2/common/scriptStorage.h14
-rw-r--r--project2/common/scripts.h7
-rw-r--r--project2/common/scripts_fwd.h5
-rw-r--r--project2/common/session.h3
-rw-r--r--project2/common/sessionContainer.h3
-rw-r--r--project2/common/sourceObject.h7
-rw-r--r--project2/common/stream.cpp2
-rw-r--r--project2/common/stream.h5
-rw-r--r--project2/common/task.cpp2
-rw-r--r--project2/common/task.h5
-rw-r--r--project2/common/taskHost.h3
-rw-r--r--project2/common/test.cpp4
-rw-r--r--project2/common/test.h5
-rw-r--r--project2/common/transform.cpp6
-rw-r--r--project2/common/transform.h13
-rw-r--r--project2/common/variableType.h13
-rw-r--r--project2/common/variables.cpp2
-rw-r--r--project2/common/variables.h9
-rw-r--r--project2/common/variables/literal.h3
-rw-r--r--project2/common/view.cpp4
-rw-r--r--project2/common/view.h5
-rw-r--r--project2/common/viewHost.h3
-rw-r--r--project2/daemon/lib/daemon.h3
-rw-r--r--project2/files/fsRows.cpp2
-rw-r--r--project2/files/fsRows.h2
-rw-r--r--project2/files/optionsSource.h5
-rw-r--r--project2/files/presenterCache.cpp2
-rw-r--r--project2/ice/buildComms.cpp2
-rw-r--r--project2/ice/iceBase.h3
-rw-r--r--project2/ice/iceClient.h3
-rw-r--r--project2/ice/iceCompile.cpp2
-rw-r--r--project2/ice/iceConvert.h5
-rw-r--r--project2/ice/iceDaemon.h3
-rw-r--r--project2/ice/iceDataSource.h3
-rw-r--r--project2/ice/iceModule.h3
-rw-r--r--project2/ice/iceRows.h3
-rw-r--r--project2/ice/iceboxDaemon.cpp1
-rw-r--r--project2/ice/slice2Common.h3
-rw-r--r--project2/ice/sliceCompile.h3
-rw-r--r--project2/ice/unittests/conversions.cpp4
-rw-r--r--project2/url/curlHelper.h5
-rw-r--r--project2/ut/testAppInstance.h3
-rw-r--r--project2/ut/testOptionsSource.h3
-rw-r--r--project2/ut/testPresenter.h9
-rw-r--r--project2/ut/testScriptHost.h3
-rw-r--r--project2/ut/testScriptNode.h3
-rw-r--r--project2/xml/transformHtml.h3
-rw-r--r--project2/xml/transformText.h3
-rw-r--r--project2/xml/xmlCache.cpp2
-rw-r--r--project2/xml/xmlPresenter.cpp2
-rw-r--r--project2/xml/xmlPresenter.h5
-rw-r--r--project2/xml/xmlScriptParser.h3
97 files changed, 237 insertions, 166 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index cc16698..f42f929 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -8,13 +8,13 @@ variant coverage : debug ;
project
: requirements
- <variant>release:<cflags>"-std=c++1y"
+ <variant>release:<cflags>"-std=c++1y -fvisibility=hidden"
<variant>release:<linkflags>"-Wl,-z,defs,--warn-once,--gc-sections"
- <variant>debug:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y"
+ <variant>debug:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y -fvisibility=hidden"
<variant>debug:<linkflags>"-Wl,-z,defs,--warn-once"
- <variant>coverage:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y --coverage"
+ <variant>coverage:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y --coverage -fvisibility=hidden"
<variant>coverage:<linkflags>"-Wl,-z,defs,--warn-once --coverage"
- <variant>component:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y -fPIC"
+ <variant>component:<cflags>"-W -Wall -Werror -Wwrite-strings -std=c++1y -fPIC -fvisibility=hidden"
<variant>component:<linkflags>"-Wl,-z,lazy,--warn-once,-fPIC"
;
diff --git a/project2/basics/options/flagSet.h b/project2/basics/options/flagSet.h
index 0e7830f..e956e8a 100644
--- a/project2/basics/options/flagSet.h
+++ b/project2/basics/options/flagSet.h
@@ -2,8 +2,9 @@
#define OPTIONS_FLAGSET_H
#include <options.h>
+#include <visibility.h>
-class OptionFlagSet : public Options::Target {
+class DLL_PUBLIC OptionFlagSet : public Options::Target {
public:
OptionFlagSet(bool * target);
diff --git a/project2/basics/options/showHelp.h b/project2/basics/options/showHelp.h
index c42a736..eb94155 100644
--- a/project2/basics/options/showHelp.h
+++ b/project2/basics/options/showHelp.h
@@ -3,8 +3,9 @@
#include <options.h>
#include <lifeCycle.h>
+#include <visibility.h>
-class ShowHelpComponent : public LifeCycle {
+class DLL_PUBLIC ShowHelpComponent : public LifeCycle {
public:
void onConfigLoad() override;
static Options::TargetPtr Option();
diff --git a/project2/basics/views/flatView.cpp b/project2/basics/views/flatView.cpp
index 1ad2c68..aba684f 100644
--- a/project2/basics/views/flatView.cpp
+++ b/project2/basics/views/flatView.cpp
@@ -6,7 +6,7 @@
#include <factory.impl.h>
NAMEDFACTORY("flatview", FlatView, FlatViewFactory);
-INSTANTIATEFACTORY(FlatView, ScriptNodePtr);
+INSTANTIATEFACTORY(FlatView, const ScriptNode *);
FlatView::FlatView(ScriptNodePtr p) :
SourceObject(p),
diff --git a/project2/basics/views/flatView.h b/project2/basics/views/flatView.h
index 3e7f9d2..b79162b 100644
--- a/project2/basics/views/flatView.h
+++ b/project2/basics/views/flatView.h
@@ -5,9 +5,10 @@
#include "rowProcessor.h"
#include "view.h"
#include "aggregate.h"
+#include <visibility.h>
/// Project2 component to create output based on a records in a flat row set
-class FlatView : public SourceObject, public RowProcessor {
+class DLL_PUBLIC FlatView : public SourceObject, public RowProcessor {
public:
FlatView(ScriptNodePtr);
virtual ~FlatView();
@@ -23,7 +24,7 @@ class FlatView : public SourceObject, public RowProcessor {
typedef std::map<Glib::ustring, Variable> Columns;
Columns viewColumns;
};
-typedef AdHoc::Factory<FlatView, ScriptNodePtr> FlatViewFactory;
+typedef AdHoc::Factory<FlatView, const ScriptNode *> FlatViewFactory;
#endif
diff --git a/project2/cgi/cgiAppEngine.h b/project2/cgi/cgiAppEngine.h
index d8271b5..b9a30d9 100644
--- a/project2/cgi/cgiAppEngine.h
+++ b/project2/cgi/cgiAppEngine.h
@@ -17,6 +17,7 @@
#include "cgiRequestContext.h"
#include <cgicc/Cgicc.h>
#include <appInstance.h>
+#include <visibility.h>
class Session;
namespace cgicc {
@@ -24,7 +25,7 @@ namespace cgicc {
class CgiEnvironment;
}
-class CgiApplicationEngine : AppInstance {
+class DLL_PUBLIC CgiApplicationEngine : AppInstance {
public:
typedef boost::shared_ptr<Project2HttpHeader> HttpHeaderPtr;
typedef std::pair<Glib::ustring, Glib::RefPtr<Glib::Regex>> PlatformHostname;
diff --git a/project2/cgi/cgiContentNegotiate.cpp b/project2/cgi/cgiContentNegotiate.cpp
index 0d1bbaf..beff91c 100644
--- a/project2/cgi/cgiContentNegotiate.cpp
+++ b/project2/cgi/cgiContentNegotiate.cpp
@@ -5,7 +5,7 @@
class ContentNegotiateFactory : public PresenterFactory {
public:
- MultiRowSetPresenter * create(const ScriptNodePtr & s, const ObjectSource & os, ExecContext * const & ec) const
+ MultiRowSetPresenter * create(const ScriptNode * const & s, const ObjectSource & os, ExecContext * const & ec) const override
{
auto accept = static_cast<const CgiRequestContext *>(ec)->getAccept();
typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
diff --git a/project2/cgi/cgiOutputOptions.cpp b/project2/cgi/cgiOutputOptions.cpp
index 07dbf79..56590ff 100644
--- a/project2/cgi/cgiOutputOptions.cpp
+++ b/project2/cgi/cgiOutputOptions.cpp
@@ -32,5 +32,5 @@ DECLARE_OPTIONS(OutputOptions, "CGI default output options")
END_OPTIONS(OutputOptions)
NAMEDFACTORY("outputoptions", OutputOptions, OutputOptionsFactory)
-INSTANTIATEFACTORY(OutputOptions, ScriptNodePtr);
+INSTANTIATEFACTORY(OutputOptions, const ScriptNode *);
diff --git a/project2/cgi/cgiOutputOptions.h b/project2/cgi/cgiOutputOptions.h
index 6c40388..9914665 100644
--- a/project2/cgi/cgiOutputOptions.h
+++ b/project2/cgi/cgiOutputOptions.h
@@ -30,6 +30,6 @@ class OutputOptions : public IntrusivePtrBase {
static bool parameters;
};
typedef boost::intrusive_ptr<OutputOptions> OutputOptionsPtr;
-typedef AdHoc::Factory<OutputOptions, ScriptNodePtr> OutputOptionsFactory;
+typedef AdHoc::Factory<OutputOptions, const ScriptNode *> OutputOptionsFactory;
#endif
diff --git a/project2/cgi/cgiProgRouter.cpp b/project2/cgi/cgiProgRouter.cpp
index 562b922..9993441 100644
--- a/project2/cgi/cgiProgRouter.cpp
+++ b/project2/cgi/cgiProgRouter.cpp
@@ -16,7 +16,7 @@ typedef std::map<std::string, std::string> VarMap;
class RoutingTable {
public:
class Route;
- typedef AdHoc::Factory<RoutingTable::Route, ScriptNodePtr> RouteFactory;
+ typedef AdHoc::Factory<RoutingTable::Route, const ScriptNode *> RouteFactory;
void loadRoutesFromFile(const std::string & routeFile) {
routeScriptPath = routeFile;
@@ -224,5 +224,5 @@ class Routes : public RowSet {
};
NAMEDFACTORY("routes", Routes, RowSetFactory);
-INSTANTIATEFACTORY(RoutingTable::Route, ScriptNodePtr);
+INSTANTIATEFACTORY(RoutingTable::Route, const ScriptNode *);
diff --git a/project2/cgi/cgiStageDefaultError.cpp b/project2/cgi/cgiStageDefaultError.cpp
index e5d1b9f..f932f78 100644
--- a/project2/cgi/cgiStageDefaultError.cpp
+++ b/project2/cgi/cgiStageDefaultError.cpp
@@ -16,7 +16,7 @@ CgiApplicationEngine::DefaultErrorStage::DefaultErrorStage(const std::exception
auto xp = dynamic_cast<TransformSource *>(pres.get());
auto cp = dynamic_cast<ContentPresenter *>(pres.get());
if (xp && cp && cp->contentType == CgiApplicationEngine::transformContentType) {
- auto h = TransformTargetFactory::createNew(CgiApplicationEngine::transformTargetType, root, Default);
+ auto h = TransformTargetFactory::createNew(CgiApplicationEngine::transformTargetType, root.get(), Default);
xp->addTarget(h, crc, root);
}
}
diff --git a/project2/cgi/cgiStagePresent.cpp b/project2/cgi/cgiStagePresent.cpp
index dffc98e..04fae92 100644
--- a/project2/cgi/cgiStagePresent.cpp
+++ b/project2/cgi/cgiStagePresent.cpp
@@ -11,11 +11,11 @@ CgiApplicationEngine::PresentStage::PresentStage(ScriptReaderPtr s, CgiRequestCo
CheckHost(s->root()),
ViewHost(s->root()),
presenter([this, crc] {
- auto p = PresenterFactory::createNew(CgiApplicationEngine::defaultPresenter, root, Default, crc);
+ auto p = PresenterFactory::createNew(CgiApplicationEngine::defaultPresenter, root.get(), Default, crc);
auto xp = dynamic_cast<TransformSource *>(p);
auto cp = dynamic_cast<ContentPresenter *>(p);
if (xp && cp && cp->contentType == CgiApplicationEngine::transformContentType) {
- auto h = TransformTargetFactory::createNew(CgiApplicationEngine::transformTargetType, root, Default);
+ auto h = TransformTargetFactory::createNew(CgiApplicationEngine::transformTargetType, root.get(), Default);
xp->addTarget(h, crc, root);
}
return p;
diff --git a/project2/cli/claOptions.h b/project2/cli/claOptions.h
index 3f13b4b..d178720 100644
--- a/project2/cli/claOptions.h
+++ b/project2/cli/claOptions.h
@@ -2,12 +2,13 @@
#define CLAOPTIONS_H
#include "../common/optionsSource.h"
+#include <visibility.h>
-class CommandLineArguments : public OptionsSource {
+class DLL_PUBLIC CommandLineArguments : public OptionsSource {
public:
typedef boost::function<void(const char * const)> Others;
CommandLineArguments(int c, const char * const * v, const Others &);
- void loadInto(const ConfigConsumer & consume, const Options::CurrentPlatform & platform) const;
+ void loadInto(const ConfigConsumer & consume, const Options::CurrentPlatform & platform) const override;
boost::posix_time::ptime modifiedTime() const override;
private:
diff --git a/project2/common/aggregate.cpp b/project2/common/aggregate.cpp
index f00f7dc..07d6902 100644
--- a/project2/common/aggregate.cpp
+++ b/project2/common/aggregate.cpp
@@ -23,6 +23,6 @@ Aggregate::pushValue(ExecContext * ec) const
pushValue(value(ec), ec);
}
-INSTANTIATEFACTORY(ValueAggregate, ScriptNodePtr);
-INSTANTIATEFACTORY(SetAggregate, ScriptNodePtr);
+INSTANTIATEFACTORY(ValueAggregate, const ScriptNode *);
+INSTANTIATEFACTORY(SetAggregate, const ScriptNode *);
diff --git a/project2/common/aggregate.h b/project2/common/aggregate.h
index a2ad54d..90d8248 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,16 +18,16 @@ 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 AdHoc::Factory<ValueAggregate, ScriptNodePtr> ValueAggregateFactory;
+typedef AdHoc::Factory<ValueAggregate, const ScriptNode *> ValueAggregateFactory;
-class SetAggregate : public Aggregate {
+class DLL_PUBLIC SetAggregate : public Aggregate {
public:
typedef boost::function1<void, VariableType> UseAgg;
SetAggregate(ScriptNodePtr);
@@ -34,6 +35,6 @@ class SetAggregate : public Aggregate {
virtual void onResultValues(const UseAgg &) const = 0;
};
typedef boost::intrusive_ptr<const SetAggregate> SetAggregateCPtr;
-typedef AdHoc::Factory<SetAggregate, ScriptNodePtr> SetAggregateFactory;
+typedef AdHoc::Factory<SetAggregate, const ScriptNode *> SetAggregateFactory;
#endif
diff --git a/project2/common/appInstance.h b/project2/common/appInstance.h
index 50ade4d..4494b5e 100644
--- a/project2/common/appInstance.h
+++ b/project2/common/appInstance.h
@@ -3,8 +3,9 @@
#include <set>
#include "scripts.h"
+#include <visibility.h>
-class AppInstance {
+class DLL_PUBLIC AppInstance {
public:
typedef std::map<ScriptReader::ScriptKey, ScriptReaderPtr> ScriptCache;
diff --git a/project2/common/check.cpp b/project2/common/check.cpp
index 703a3ea..37879e2 100644
--- a/project2/common/check.cpp
+++ b/project2/common/check.cpp
@@ -29,5 +29,5 @@ Check::performCheck(ExecContext * ec) const
return test->passes(ec);
}
-INSTANTIATEFACTORY(Check, ScriptNodePtr);
+INSTANTIATEFACTORY(Check, const ScriptNode *);
diff --git a/project2/common/check.h b/project2/common/check.h
index d108f7c..8b9ce14 100644
--- a/project2/common/check.h
+++ b/project2/common/check.h
@@ -4,11 +4,12 @@
#include "sourceObject.h"
#include "variables.h"
#include "test.h"
+#include <visibility.h>
class ExecContext;
/// Base class for Project2 compoments that perform checks
-class Check : public SourceObject {
+class DLL_PUBLIC Check : public SourceObject {
public:
Check(ScriptNodePtr p);
virtual ~Check();
@@ -21,7 +22,7 @@ class Check : public SourceObject {
TestPtr test;
};
typedef boost::intrusive_ptr<const Check> CheckCPtr;
-typedef AdHoc::Factory<Check, ScriptNodePtr> CheckFactory;
+typedef AdHoc::Factory<Check, const ScriptNode *> CheckFactory;
#endif
diff --git a/project2/common/checkHost.h b/project2/common/checkHost.h
index f404d9e..46b5a04 100644
--- a/project2/common/checkHost.h
+++ b/project2/common/checkHost.h
@@ -6,8 +6,9 @@
#include <set>
#include <boost/function.hpp>
#include "commonObjects.h"
+#include <visibility.h>
-class CheckHost : virtual public CommonObjects {
+class DLL_PUBLIC CheckHost : virtual public CommonObjects {
public:
class CheckFailure : std::exception {
public:
diff --git a/project2/common/columns.h b/project2/common/columns.h
index d3e2c97..72fd40b 100644
--- a/project2/common/columns.h
+++ b/project2/common/columns.h
@@ -5,8 +5,9 @@
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/ordered_index.hpp>
+#include <visibility.h>
-class Column : public IntrusivePtrBase {
+class DLL_PUBLIC Column : public IntrusivePtrBase {
public:
Column(unsigned int idx, ScriptNodePtr p);
Column(unsigned int i, const Glib::ustring & n, const Variable & v = Variable(Null()));
diff --git a/project2/common/commonObjects.h b/project2/common/commonObjects.h
index 788e3bd..474e7e4 100644
--- a/project2/common/commonObjects.h
+++ b/project2/common/commonObjects.h
@@ -5,8 +5,9 @@
#include "rowSet.h"
#include "scriptStorage.h"
#include "options.h"
+#include <visibility.h>
-class CommonObjects : public virtual IntrusivePtrBase {
+class DLL_PUBLIC CommonObjects : public virtual IntrusivePtrBase {
public:
typedef STORAGEOF(RowSet) RowSets;
typedef STORAGEOF(DataSource) DataSources;
diff --git a/project2/common/dataSource.cpp b/project2/common/dataSource.cpp
index 5b23c9a..da1ab52 100644
--- a/project2/common/dataSource.cpp
+++ b/project2/common/dataSource.cpp
@@ -8,5 +8,5 @@ DataSource::DataSource(ScriptNodePtr p) :
{
}
-INSTANTIATEFACTORY(DataSource, ScriptNodePtr);
+INSTANTIATEFACTORY(DataSource, const ScriptNode *);
diff --git a/project2/common/dataSource.h b/project2/common/dataSource.h
index c60cceb..baaaac7 100644
--- a/project2/common/dataSource.h
+++ b/project2/common/dataSource.h
@@ -3,12 +3,13 @@
#include <boost/intrusive_ptr.hpp>
#include "sourceObject.h"
+#include <visibility.h>
class DataSource;
typedef boost::intrusive_ptr<DataSource> DataSourcePtr;
/// Base class for data sources providing transaction support
-class DataSource : public SourceObject {
+class DLL_PUBLIC DataSource : public SourceObject {
public:
DataSource(ScriptNodePtr p);
virtual ~DataSource() = default;
@@ -17,7 +18,7 @@ class DataSource : public SourceObject {
virtual void commit() { };
virtual void rollback() { };
};
-typedef AdHoc::Factory<DataSource, ScriptNodePtr> DataSourceFactory;
+typedef AdHoc::Factory<DataSource, const ScriptNode *> DataSourceFactory;
#endif
diff --git a/project2/common/definedColumns.h b/project2/common/definedColumns.h
index 2f53669..2459872 100644
--- a/project2/common/definedColumns.h
+++ b/project2/common/definedColumns.h
@@ -4,15 +4,16 @@
#include "variables.h"
#include "rowSet.h"
#include "columns.h"
+#include <visibility.h>
-class DefinedColumns {
+class DLL_PUBLIC DefinedColumns {
public:
typedef boost::function2<Column *, unsigned int, ScriptNodePtr> ColCreator;
DefinedColumns(ScriptNodePtr p, const Glib::ustring & colPath, const ColCreator & func);
Columns columns;
};
-class ColumnValues : public RowState {
+class DLL_PUBLIC ColumnValues : public RowState {
public:
ColumnValues(const DefinedColumns *);
virtual ~ColumnValues();
diff --git a/project2/common/exceptions.h b/project2/common/exceptions.h
index 1051220..1642e1a 100644
--- a/project2/common/exceptions.h
+++ b/project2/common/exceptions.h
@@ -3,8 +3,9 @@
#include <stdexcept>
#include <boost/optional.hpp>
+#include <visibility.h>
-class MsgBufferedException : public std::exception {
+class DLL_PUBLIC MsgBufferedException : public std::exception {
public:
inline ~MsgBufferedException() throw() { }
const char * what() const throw();
@@ -14,7 +15,7 @@ class MsgBufferedException : public std::exception {
mutable boost::optional<std::string> buf;
};
-class numeric_error : public MsgBufferedException {
+class DLL_PUBLIC numeric_error : public MsgBufferedException {
public:
numeric_error(int);
protected:
@@ -23,7 +24,7 @@ class numeric_error : public MsgBufferedException {
int err;
};
-class syscall_error : public MsgBufferedException {
+class DLL_PUBLIC syscall_error : public MsgBufferedException {
public:
syscall_error(int);
protected:
@@ -32,7 +33,7 @@ class syscall_error : public MsgBufferedException {
int err;
};
-class two_part_error : public MsgBufferedException {
+class DLL_PUBLIC two_part_error : public MsgBufferedException {
public:
two_part_error(const std::string & what1, const std::string & what2);
~two_part_error() throw();
diff --git a/project2/common/execContext.h b/project2/common/execContext.h
index 86438bd..4fcf36c 100644
--- a/project2/common/execContext.h
+++ b/project2/common/execContext.h
@@ -6,12 +6,13 @@
#include <list>
#include "variableType.h"
#include "session.h"
+#include <visibility.h>
class MultiRowSetPresenter;
class RowState;
class IHaveParameters;
-class ExecContext {
+class DLL_PUBLIC ExecContext {
public:
class Message : public IntrusivePtrBase {
public:
diff --git a/project2/common/fileStrmVarWriter.h b/project2/common/fileStrmVarWriter.h
index dd43473..dd125c4 100644
--- a/project2/common/fileStrmVarWriter.h
+++ b/project2/common/fileStrmVarWriter.h
@@ -2,8 +2,9 @@
#define FILESTREAMVARWRITER_H
#include "variables.h"
+#include <visibility.h>
-class FileStreamVariableWriter : public boost::static_visitor<> {
+class DLL_PUBLIC FileStreamVariableWriter : public boost::static_visitor<> {
public:
FileStreamVariableWriter(FILE *, bool quoting);
~FileStreamVariableWriter();
diff --git a/project2/common/iHaveParameters.h b/project2/common/iHaveParameters.h
index bab4592..e8d7519 100644
--- a/project2/common/iHaveParameters.h
+++ b/project2/common/iHaveParameters.h
@@ -5,9 +5,10 @@
#include <vector>
#include "variables.h"
#include "intrusivePtrBase.h"
+#include <visibility.h>
/// Mix-in base class to store parameters for component execution
-class IHaveParameters {
+class DLL_PUBLIC IHaveParameters {
public:
typedef std::map<Glib::ustring, Variable> Parameters;
diff --git a/project2/common/iHaveSubTasks.h b/project2/common/iHaveSubTasks.h
index 1fd5041..433899d 100644
--- a/project2/common/iHaveSubTasks.h
+++ b/project2/common/iHaveSubTasks.h
@@ -3,9 +3,10 @@
#include "task.h"
#include "scriptStorage.h"
+#include <visibility.h>
/// Base class for Project2 compoments that perform actions, but product no output
-class IHaveSubTasks : public Task {
+class DLL_PUBLIC IHaveSubTasks : public Task {
public:
typedef ANONORDEREDSTORAGEOF(Task) Tasks;
diff --git a/project2/common/lifeCycle.h b/project2/common/lifeCycle.h
index 2a6b5b2..0e24581 100644
--- a/project2/common/lifeCycle.h
+++ b/project2/common/lifeCycle.h
@@ -3,9 +3,10 @@
#include <plugins.h>
#include <boost/function/function_fwd.hpp>
+#include <visibility.h>
/// Helper for loading and maintaining Project2 components
-class LifeCycle : public virtual AdHoc::AbstractPluginImplementation {
+class DLL_PUBLIC LifeCycle : public virtual AdHoc::AbstractPluginImplementation {
public:
virtual ~LifeCycle() = 0;
diff --git a/project2/common/logger.h b/project2/common/logger.h
index 8d8b6de..c6c1be0 100644
--- a/project2/common/logger.h
+++ b/project2/common/logger.h
@@ -8,11 +8,12 @@
#include <boost/format/format_fwd.hpp>
#include "intrusivePtrBase.h"
#include <buffer.h>
+#include <visibility.h>
#include "lifeCycle.h"
class LogDriverBase;
class LogDriverFactory;
-class Log {
+class DLL_PUBLIC Log {
public:
typedef boost::intrusive_ptr<LogDriverBase> LogDriverBasePtr;
typedef std::map<LogDriverFactory *, LogDriverBasePtr> LogDrivers;
@@ -47,7 +48,7 @@ class Log {
int nextId;
};
-class Logger {
+class DLL_PUBLIC Logger {
public:
Log * operator->() const;
private:
diff --git a/project2/common/loggerFactory.h b/project2/common/loggerFactory.h
index e620e0c..1c6033b 100644
--- a/project2/common/loggerFactory.h
+++ b/project2/common/loggerFactory.h
@@ -5,9 +5,10 @@
#include "lifeCycle.h"
#include "intrusivePtrBase.h"
#include "logger.h"
+#include <visibility.h>
/// Base class for classes providing a logging facility
-class LogDriverBase : public virtual IntrusivePtrBase {
+class DLL_PUBLIC LogDriverBase : public virtual IntrusivePtrBase {
public:
LogDriverBase();
virtual ~LogDriverBase();
@@ -15,7 +16,7 @@ class LogDriverBase : public virtual IntrusivePtrBase {
virtual void message(int priority, const char * msg) const = 0;
};
-class LogDriverFactory : public AdHoc::Factory<LogDriverBase> {
+class DLL_PUBLIC LogDriverFactory : public AdHoc::Factory<LogDriverBase> {
public:
virtual int loggerLevel() const = 0;
};
diff --git a/project2/common/options.h b/project2/common/options.h
index 6e734bb..4c52649 100644
--- a/project2/common/options.h
+++ b/project2/common/options.h
@@ -10,8 +10,9 @@
#include <boost/utility/enable_if.hpp>
#include "variableType.h"
#include <plugins.h>
+#include <visibility.h>
-class Options : public AdHoc::AbstractPluginImplementation {
+class DLL_PUBLIC Options : public AdHoc::AbstractPluginImplementation {
public:
class Target;
diff --git a/project2/common/optionsSource.h b/project2/common/optionsSource.h
index a6b50e9..35905aa 100644
--- a/project2/common/optionsSource.h
+++ b/project2/common/optionsSource.h
@@ -5,6 +5,7 @@
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <glibmm/ustring.h>
#include <intrusivePtrBase.h>
+#include <visibility.h>
#include "scriptLoader.h"
#include "options.h"
@@ -18,7 +19,7 @@ class OptionsSource;
typedef boost::shared_ptr<OptionsSource> OptionsSourcePtr;
/// Base class of things that load options
-class OptionsSource : public AdHoc::AbstractPluginImplementation {
+class DLL_PUBLIC OptionsSource : public AdHoc::AbstractPluginImplementation {
public:
virtual ~OptionsSource() = default;
diff --git a/project2/common/presenter.cpp b/project2/common/presenter.cpp
index a28f00c..b4b7379 100644
--- a/project2/common/presenter.cpp
+++ b/project2/common/presenter.cpp
@@ -1,6 +1,7 @@
#include <pch.hpp>
+#include "scripts.h"
+#include "execContext.h"
#include "presenter.h"
-#include "dataSource.h"
#include <factory.impl.h>
NameValuePairPresenter::NameValuePairPresenter()
@@ -120,5 +121,5 @@ MultiRowSetPresenter::finalizeContent() const
{
}
-INSTANTIATEFACTORY(MultiRowSetPresenter, ScriptNodePtr, ObjectSource, ExecContext *);
+INSTANTIATEFACTORY(MultiRowSetPresenter, const ScriptNode *, const ObjectSource &, ExecContext *);
diff --git a/project2/common/presenter.h b/project2/common/presenter.h
index 037e7bf..6efb6e4 100644
--- a/project2/common/presenter.h
+++ b/project2/common/presenter.h
@@ -7,8 +7,9 @@
#include <glibmm/ustring.h>
#include "view.h"
#include "scriptLoader.h"
+#include <visibility.h>
-class NameValuePairPresenter : public virtual IntrusivePtrBase {
+class DLL_PUBLIC NameValuePairPresenter : public virtual IntrusivePtrBase {
public:
NameValuePairPresenter();
virtual ~NameValuePairPresenter();
@@ -17,7 +18,7 @@ class NameValuePairPresenter : public virtual IntrusivePtrBase {
virtual void addAttribute(const Glib::ustring & name, const VariableType & value) const;
};
-class RowSetPresenter : public NameValuePairPresenter {
+class DLL_PUBLIC RowSetPresenter : public NameValuePairPresenter {
public:
RowSetPresenter();
virtual ~RowSetPresenter() = 0;
@@ -26,7 +27,7 @@ class RowSetPresenter : public NameValuePairPresenter {
virtual void finishRow() const = 0;
};
-class MultiRowSetPresenter : public RowSetPresenter {
+class DLL_PUBLIC MultiRowSetPresenter : public RowSetPresenter {
public:
MultiRowSetPresenter(ObjectSource);
virtual ~MultiRowSetPresenter() = 0;
@@ -43,7 +44,7 @@ class MultiRowSetPresenter : public RowSetPresenter {
virtual void finalizeContent() const;
};
-class Presenter : public MultiRowSetPresenter {
+class DLL_PUBLIC Presenter : public MultiRowSetPresenter {
public:
Presenter(ObjectSource);
virtual ~Presenter() = 0;
@@ -65,7 +66,7 @@ class Presenter : public MultiRowSetPresenter {
void finishRowSet() const;
};
-class ContentPresenter {
+class DLL_PUBLIC ContentPresenter {
public:
ContentPresenter(const Glib::ustring & contentType);
const Glib::ustring contentType;
@@ -77,7 +78,7 @@ typedef boost::intrusive_ptr<RowSetPresenter> RowSetPresenterPtr;
typedef boost::intrusive_ptr<MultiRowSetPresenter> MultiRowSetPresenterPtr;
typedef boost::intrusive_ptr<NameValuePairPresenter> NameValuePairPresenterPtr;
-typedef AdHoc::Factory<MultiRowSetPresenter, ScriptNodePtr, ObjectSource, ExecContext *> PresenterFactory;
+typedef AdHoc::Factory<MultiRowSetPresenter, const ScriptNode *, const ObjectSource &, ExecContext *> PresenterFactory;
#endif
diff --git a/project2/common/presenterCache.cpp b/project2/common/presenterCache.cpp
index 429f93e..db597d9 100644
--- a/project2/common/presenterCache.cpp
+++ b/project2/common/presenterCache.cpp
@@ -13,7 +13,7 @@ PresenterCache::flushCache()
{
}
-INSTANTIATEFACTORY(PresenterCache, ScriptNodePtr);
+INSTANTIATEFACTORY(PresenterCache, const ScriptNode *);
class WriteToCache : public TransformImpl<WritableContent, PresenterCache> {
public:
diff --git a/project2/common/presenterCache.h b/project2/common/presenterCache.h
index c90c077..48967d6 100644
--- a/project2/common/presenterCache.h
+++ b/project2/common/presenterCache.h
@@ -4,8 +4,9 @@
#include "transform.h"
#include "scripts.h"
#include "iHaveParameters.h"
+#include <visibility.h>
-class PresenterCache : public SourceObject, public virtual TransformSource, public StaticContent, public SourceOf<StaticContent>, public IHaveParameters {
+class DLL_PUBLIC PresenterCache : public SourceObject, public virtual TransformSource, public StaticContent, public SourceOf<StaticContent>, public IHaveParameters {
public:
PresenterCache(ScriptNodePtr);
virtual bool check(time_t scriptMtime, ExecContext *) const = 0;
@@ -15,6 +16,6 @@ class PresenterCache : public SourceObject, public virtual TransformSource, publ
const std::string encoding;
};
typedef boost::intrusive_ptr<PresenterCache> PresenterCachePtr;
-typedef AdHoc::Factory<PresenterCache, ScriptNodePtr> PresenterCacheFactory;
+typedef AdHoc::Factory<PresenterCache, const ScriptNode *> PresenterCacheFactory;
#endif
diff --git a/project2/common/rowProcessor.h b/project2/common/rowProcessor.h
index ca36b32..66f99ec 100644
--- a/project2/common/rowProcessor.h
+++ b/project2/common/rowProcessor.h
@@ -8,12 +8,13 @@
#include "rowSetCache.h"
#include "test.h"
#include "scriptStorage.h"
+#include <visibility.h>
class Presenter;
class ExecContext;
/// Base class for Project2 components that work with row sets
-class RowProcessor : public IHaveParameters {
+class DLL_PUBLIC RowProcessor : public IHaveParameters {
public:
enum EventIDs { Complete };
RowProcessor(ScriptNodePtr);
diff --git a/project2/common/rowSet.cpp b/project2/common/rowSet.cpp
index 1299818..cd0b097 100644
--- a/project2/common/rowSet.cpp
+++ b/project2/common/rowSet.cpp
@@ -88,5 +88,5 @@ RowState::foreachAttr(const AttrAction &) const
// rowNum is magic, so it doesn't count :)
}
-INSTANTIATEFACTORY(RowSet, ScriptNodePtr);
+INSTANTIATEFACTORY(RowSet, const ScriptNode *);
diff --git a/project2/common/rowSet.h b/project2/common/rowSet.h
index 8745c87..30a8c37 100644
--- a/project2/common/rowSet.h
+++ b/project2/common/rowSet.h
@@ -7,6 +7,7 @@
#include "exceptions.h"
#include "columns.h"
#include <boost/function.hpp>
+#include <visibility.h>
class RowSet;
class VariableType;
@@ -17,7 +18,7 @@ typedef boost::intrusive_ptr<const RowSet> ConstRowSetPtr;
typedef boost::function<void(const RowState *)> RowProcessorCallback;
/// Base class for Project2 components that provide a row set representation of data
-class RowSet : public virtual SourceObject {
+class DLL_PUBLIC RowSet : public virtual SourceObject {
public:
SimpleNumericException(ParentOutOfRange);
SimpleMessageException(FieldDoesNotExist);
@@ -29,7 +30,7 @@ class RowSet : public virtual SourceObject {
virtual void execute(const Glib::ustring &, const RowProcessorCallback &, ExecContext *) const = 0;
};
-class RowState {
+class DLL_PUBLIC RowState {
public:
RowState();
virtual ~RowState() = default;
@@ -55,7 +56,7 @@ class RowState {
private:
unsigned int rowNum;
};
-typedef AdHoc::Factory<RowSet, ScriptNodePtr> RowSetFactory;
+typedef AdHoc::Factory<RowSet, const ScriptNode *> RowSetFactory;
#endif
diff --git a/project2/common/rowSetCache.cpp b/project2/common/rowSetCache.cpp
index b8c0ef6..0380a5d 100644
--- a/project2/common/rowSetCache.cpp
+++ b/project2/common/rowSetCache.cpp
@@ -48,5 +48,5 @@ RowSetCache::applyKeys(ExecContext * ec, const KeyApplier & f, const IHaveParame
}
}
-INSTANTIATEFACTORY(RowSetCache, ScriptNodePtr);
+INSTANTIATEFACTORY(RowSetCache, const ScriptNode *);
diff --git a/project2/common/rowSetCache.h b/project2/common/rowSetCache.h
index 9418463..c8501c9 100644
--- a/project2/common/rowSetCache.h
+++ b/project2/common/rowSetCache.h
@@ -5,12 +5,13 @@
#include "presenter.h"
#include "iHaveParameters.h"
#include "rowSet.h"
+#include <visibility.h>
class RowSet;
class RowState;
typedef boost::intrusive_ptr<const RowSet> RowSetCPtr;
-class RowSetCache : public IHaveParameters, public virtual SourceObject {
+class DLL_PUBLIC RowSetCache : public IHaveParameters, public virtual SourceObject {
public:
RowSetCache(ScriptNodePtr p);
@@ -26,7 +27,7 @@ class RowSetCache : public IHaveParameters, public virtual SourceObject {
const bool inherit;
};
typedef boost::intrusive_ptr<RowSetCache> RowSetCachePtr;
-typedef AdHoc::Factory<RowSetCache, ScriptNodePtr> RowSetCacheFactory;
+typedef AdHoc::Factory<RowSetCache, const ScriptNode *> RowSetCacheFactory;
#endif
diff --git a/project2/common/scriptLoader.cpp b/project2/common/scriptLoader.cpp
index e3abd86..1d2bc53 100644
--- a/project2/common/scriptLoader.cpp
+++ b/project2/common/scriptLoader.cpp
@@ -62,7 +62,7 @@ LoaderBase::collectAll(ScriptNodePtr node, LoadedObjects & loadedObjects, bool c
if (!node->obj) {
for (const StorerPtr & s : sts) {
try {
- node->obj = s->create(node);
+ node->obj = s->create(node.get());
break;
}
catch (const AdHoc::NoSuchPluginException &) {
@@ -76,9 +76,9 @@ LoaderBase::collectAll(ScriptNodePtr node, LoadedObjects & loadedObjects, bool c
loadedObjects.insert(p.get());
}
for (const StorerPtr & s : sts) {
- if (s->save(node->obj, node)) {
+ if (s->save(node->obj, node.get())) {
stored += 1;
- if (!s->cacheable(node)) {
+ if (!s->cacheable(node.get())) {
node->obj.reset();
}
break;
diff --git a/project2/common/scriptLoader.h b/project2/common/scriptLoader.h
index fed7cef..c5cf853 100644
--- a/project2/common/scriptLoader.h
+++ b/project2/common/scriptLoader.h
@@ -11,6 +11,7 @@
#include <glibmm/ustring.h>
#include <map>
#include <vector>
+#include <visibility.h>
class CommonObjects;
class Storer;
@@ -18,7 +19,7 @@ class ScriptReader;
class SourceObject;
typedef boost::intrusive_ptr<SourceObject> SourceObjectPtr;
-class LoaderBase {
+class DLL_PUBLIC LoaderBase {
public:
typedef boost::intrusive_ptr<Storer> StorerPtr;
typedef std::vector<StorerPtr> StorerPtrs;
diff --git a/project2/common/scriptStorage.h b/project2/common/scriptStorage.h
index c4155f2..4d7cbf4 100644
--- a/project2/common/scriptStorage.h
+++ b/project2/common/scriptStorage.h
@@ -37,30 +37,30 @@ class Storer : public virtual IntrusivePtrBase {
template <class L, class X, typename... C>
static boost::intrusive_ptr<StorerBase<X, L> > into(ANONORDEREDSTORAGEOF(X) * list, const C & ... c);
- virtual boost::intrusive_ptr<IntrusivePtrBase> create(ScriptNodePtr) const = 0;
- virtual bool save(boost::intrusive_ptr<IntrusivePtrBase>, ScriptNodePtr) = 0;
- virtual bool cacheable(ScriptNodePtr) const { return true; }
+ virtual boost::intrusive_ptr<IntrusivePtrBase> create(const ScriptNode *) const = 0;
+ virtual bool save(boost::intrusive_ptr<IntrusivePtrBase>, const ScriptNode *) = 0;
+ virtual bool cacheable(const ScriptNode *) const { return true; }
};
template <class X, class L>
class StorerBase : public Storer {
public:
- typedef boost::function2<boost::intrusive_ptr<IntrusivePtrBase>, const L *, ScriptNodePtr> Creator;
+ typedef boost::function2<boost::intrusive_ptr<IntrusivePtrBase>, const L *, const ScriptNode *> Creator;
StorerBase(const Creator & c) :
creator(c)
{
}
- boost::intrusive_ptr<IntrusivePtrBase> create(ScriptNodePtr p) const {
+ boost::intrusive_ptr<IntrusivePtrBase> create(const ScriptNode * p) const {
return creator(L::get(p->get_name()), p);
}
- bool cacheable(ScriptNodePtr p) const {
+ bool cacheable(const ScriptNode * p) const {
auto f = AdHoc::PluginManager::getDefault()->get<L>(p->get_name());
if (auto c = dynamic_cast<const LifeCycle *>(f->implementation())) {
return c->cacheable();
}
return true;
}
- bool save(boost::intrusive_ptr<IntrusivePtrBase> o, ScriptNodePtr name) {
+ bool save(boost::intrusive_ptr<IntrusivePtrBase> o, const ScriptNode * name) {
boost::intrusive_ptr<X> O = boost::dynamic_pointer_cast<X>(o);
if (O) {
if (!insert(O)) {
diff --git a/project2/common/scripts.h b/project2/common/scripts.h
index 2442558..d72e567 100644
--- a/project2/common/scripts.h
+++ b/project2/common/scripts.h
@@ -12,6 +12,7 @@
#include "variableType.h"
#include "options.h"
#include <vector>
+#include <visibility.h>
SimpleMessageException(ValueNotFound);
SimpleMessage2Exception(ScriptNotFound);
@@ -20,14 +21,14 @@ SimpleMessage2Exception(DependencyNotFound);
class VariableImpl;
class ExecContext;
-class Scripts {
+class DLL_PUBLIC Scripts {
public:
INITOPTIONS;
static std::string scriptNamespace;
static std::string scriptNamespacePrefix;
};
-class ScriptNode : public IntrusivePtrBase {
+class DLL_PUBLIC ScriptNode : public IntrusivePtrBase {
public:
ScriptNode(ScriptReaderPtr);
virtual ~ScriptNode() { }
@@ -62,7 +63,7 @@ class ScriptNode : public IntrusivePtrBase {
mutable boost::intrusive_ptr<IntrusivePtrBase> obj;
};
-class ScriptReader : public virtual IntrusivePtrBase {
+class DLL_PUBLIC ScriptReader : public virtual IntrusivePtrBase {
public:
typedef boost::tuple<const std::string, const std::string> ScriptKey;
diff --git a/project2/common/scripts_fwd.h b/project2/common/scripts_fwd.h
index 7d5ed00..30ed674 100644
--- a/project2/common/scripts_fwd.h
+++ b/project2/common/scripts_fwd.h
@@ -2,9 +2,10 @@
#define SCRIPTS_FWD_H
#include <boost/intrusive_ptr.hpp>
+#include <visibility.h>
-class ScriptNode;
-class ScriptReader;
+class DLL_PUBLIC ScriptNode;
+class DLL_PUBLIC ScriptReader;
typedef boost::intrusive_ptr<const ScriptNode> ScriptNodePtr;
typedef boost::intrusive_ptr<const ScriptReader> ScriptReaderPtr;
diff --git a/project2/common/session.h b/project2/common/session.h
index 24b021e..1a77a88 100644
--- a/project2/common/session.h
+++ b/project2/common/session.h
@@ -9,9 +9,10 @@
#include "intrusivePtrBase.h"
#include "variables.h"
#include "exceptions.h"
+#include <visibility.h>
/// Base class for classes implementing session variable storage
-class Session : public virtual IntrusivePtrBase {
+class DLL_PUBLIC Session : public virtual IntrusivePtrBase {
public:
SimpleMessageException(VariableNotFound);
typedef std::map<Glib::ustring, VariableType> Values;
diff --git a/project2/common/sessionContainer.h b/project2/common/sessionContainer.h
index 4f62e96..9d9e173 100644
--- a/project2/common/sessionContainer.h
+++ b/project2/common/sessionContainer.h
@@ -6,8 +6,9 @@
#include "session.h"
#include "options.h"
#include <factory.h>
+#include <visibility.h>
-class SessionContainer : public IntrusivePtrBase {
+class DLL_PUBLIC SessionContainer : public IntrusivePtrBase {
public:
SessionContainer();
virtual ~SessionContainer() = 0;
diff --git a/project2/common/sourceObject.h b/project2/common/sourceObject.h
index 1af9ceb..5e3499c 100644
--- a/project2/common/sourceObject.h
+++ b/project2/common/sourceObject.h
@@ -5,17 +5,18 @@
#include <boost/function.hpp>
#include <string>
#include <map>
-#include "intrusivePtrBase.h"
+#include <visibility.h>
+#include <intrusivePtrBase.h>
#include "scriptLoader.h"
#include "scripts_fwd.h"
-enum ObjectSource {
+enum DLL_PUBLIC ObjectSource {
Default,
Scripted
};
class CommonObjects;
/// Base class for all Project2 components that can be placed in a Project2 script
-class SourceObject : public virtual IntrusivePtrBase {
+class DLL_PUBLIC SourceObject : public virtual IntrusivePtrBase {
public:
typedef int EventID;
typedef boost::function<void()> Event;
diff --git a/project2/common/stream.cpp b/project2/common/stream.cpp
index d97d1ab..98180d8 100644
--- a/project2/common/stream.cpp
+++ b/project2/common/stream.cpp
@@ -21,5 +21,5 @@ Stream::writeTo(std::ostream & os, const std::string &, ExecContext * ec) const
runStream(boost::bind(&Stream::write, &os, _1, _2), ec);
}
-INSTANTIATEFACTORY(Stream, ScriptNodePtr);
+INSTANTIATEFACTORY(Stream, const ScriptNode *);
diff --git a/project2/common/stream.h b/project2/common/stream.h
index 4fe47f0..bffee9b 100644
--- a/project2/common/stream.h
+++ b/project2/common/stream.h
@@ -4,10 +4,11 @@
#include "sourceObject.h"
#include <boost/function.hpp>
#include "transform.h"
+#include <visibility.h>
class ExecContext;
-class Stream : public SourceObject, public WritableContent {
+class DLL_PUBLIC Stream : public SourceObject, public WritableContent {
public:
template<typename... X> Stream(const X &... x) : SourceObject(x...) { }
@@ -21,7 +22,7 @@ class Stream : public SourceObject, public WritableContent {
static size_t write(std::ostream * os, const char * data, size_t len);
};
typedef boost::intrusive_ptr<Stream> StreamPtr;
-typedef AdHoc::Factory<Stream, ScriptNodePtr> StreamFactory;
+typedef AdHoc::Factory<Stream, const ScriptNode *> StreamFactory;
#endif
diff --git a/project2/common/task.cpp b/project2/common/task.cpp
index f77d518..54291f2 100644
--- a/project2/common/task.cpp
+++ b/project2/common/task.cpp
@@ -16,5 +16,5 @@ Task::~Task()
{
}
-INSTANTIATEFACTORY(Task, ScriptNodePtr);
+INSTANTIATEFACTORY(Task, const ScriptNode *);
diff --git a/project2/common/task.h b/project2/common/task.h
index 9a9548f..4b31809 100644
--- a/project2/common/task.h
+++ b/project2/common/task.h
@@ -3,16 +3,17 @@
#include "sourceObject.h"
#include "execContext.h"
+#include <visibility.h>
/// Base class for Project2 components that perform some specific task
-class Task : public virtual SourceObject {
+class DLL_PUBLIC Task : public virtual SourceObject {
public:
Task(ScriptNodePtr p);
Task(const std::string & name);
virtual ~Task();
virtual void execute(ExecContext *) const = 0;
};
-typedef AdHoc::Factory<Task, ScriptNodePtr> TaskFactory;
+typedef AdHoc::Factory<Task, const ScriptNode *> TaskFactory;
#endif
diff --git a/project2/common/taskHost.h b/project2/common/taskHost.h
index 84c04c9..ed9bc1b 100644
--- a/project2/common/taskHost.h
+++ b/project2/common/taskHost.h
@@ -5,8 +5,9 @@
#include "checkHost.h"
#include "iHaveSubTasks.h"
#include "commonObjects.h"
+#include <visibility.h>
-class TaskHost : public IHaveSubTasks, virtual public CheckHost, virtual public CommonObjects {
+class DLL_PUBLIC TaskHost : public IHaveSubTasks, virtual public CheckHost, virtual public CommonObjects {
protected:
TaskHost(ScriptNodePtr script);
virtual ~TaskHost();
diff --git a/project2/common/test.cpp b/project2/common/test.cpp
index db7514d..e0e731e 100644
--- a/project2/common/test.cpp
+++ b/project2/common/test.cpp
@@ -2,7 +2,7 @@
#include <factory.impl.h>
Test::Test(ScriptNodePtr s) :
- SourceObject(s)
+ SourceObject(s.get())
{
}
@@ -11,5 +11,5 @@ Test::reset() const
{
}
-INSTANTIATEFACTORY(Test, ScriptNodePtr);
+INSTANTIATEFACTORY(Test, const ScriptNode *);
diff --git a/project2/common/test.h b/project2/common/test.h
index b821844..edeb22f 100644
--- a/project2/common/test.h
+++ b/project2/common/test.h
@@ -3,16 +3,17 @@
#include "sourceObject.h"
#include "scripts.h"
+#include <visibility.h>
class ExecContext;
-class Test : public virtual SourceObject {
+class DLL_PUBLIC Test : public virtual SourceObject {
public:
Test(ScriptNodePtr);
virtual bool passes(ExecContext *) const = 0;
virtual void reset() const;
};
typedef boost::intrusive_ptr<const Test> TestPtr;
-typedef AdHoc::Factory<Test, ScriptNodePtr> TestFactory;
+typedef AdHoc::Factory<Test, const ScriptNode *> TestFactory;
#endif
diff --git a/project2/common/transform.cpp b/project2/common/transform.cpp
index 6b44da0..7be475f 100644
--- a/project2/common/transform.cpp
+++ b/project2/common/transform.cpp
@@ -11,11 +11,11 @@ class TransformTargetStorer : public Storer {
transformSource(ts)
{
}
- boost::intrusive_ptr<IntrusivePtrBase> create(ScriptNodePtr p) const
+ boost::intrusive_ptr<IntrusivePtrBase> create(const ScriptNode * p) const
{
return TransformTargetFactory::createNew(p->get_name(), p, Scripted);
}
- bool save(boost::intrusive_ptr<IntrusivePtrBase> o, ScriptNodePtr s)
+ bool save(boost::intrusive_ptr<IntrusivePtrBase> o, const ScriptNode * s)
{
TransformChainLinkPtr O = boost::dynamic_pointer_cast<TransformChainLink>(o);
if (O) {
@@ -107,5 +107,5 @@ class TransformStaticContentToStdStream : public TransformImpl<StaticContent, os
DECLARE_TRANSFORM(TransformStaticContentToStdStream);
INSTANTIATEVOIDFACTORY(Transform);
-INSTANTIATEFACTORY(TransformChainLink, ScriptNodePtr, ObjectSource);
+INSTANTIATEFACTORY(TransformChainLink, const ScriptNode *, ObjectSource);
diff --git a/project2/common/transform.h b/project2/common/transform.h
index d450d8d..ea9d2f4 100644
--- a/project2/common/transform.h
+++ b/project2/common/transform.h
@@ -7,10 +7,11 @@
#include <map>
#include <factory.h>
#include "range.h"
+#include <visibility.h>
class ExecContext;
-class TransformChainLink : public virtual IntrusivePtrBase {
+class DLL_PUBLIC TransformChainLink : public virtual IntrusivePtrBase {
public:
virtual ~TransformChainLink() = 0;
};
@@ -20,7 +21,7 @@ class Transform;
typedef boost::intrusive_ptr<Transform> TransformPtr;
typedef std::map<TransformChainLinkPtr, TransformPtr> Targets;
-class TransformSource : public TransformChainLink {
+class DLL_PUBLIC TransformSource : public TransformChainLink {
public:
TransformSource();
TransformSource(ScriptNodePtr, ObjectSource);
@@ -43,7 +44,7 @@ class SourceOf : public virtual TransformSource {
virtual operator const X * () const = 0;
};
-class Transform : public virtual IntrusivePtrBase {
+class DLL_PUBLIC Transform : public virtual IntrusivePtrBase {
public:
virtual void transform(const TransformSource * src, TransformChainLink * dest, ExecContext *) const = 0;
virtual bool canTransform(const TransformSource * src, TransformChainLink * dest) const = 0;
@@ -53,7 +54,7 @@ class Transform : public virtual IntrusivePtrBase {
typedef AdHoc::Factory<Transform> TransformFactory;
#define DECLARE_TRANSFORM(T) NAMEDFACTORY(#T, T, TransformFactory)
-typedef AdHoc::Factory<TransformChainLink, ScriptNodePtr, ObjectSource> TransformTargetFactory;
+typedef AdHoc::Factory<TransformChainLink, const ScriptNode *, ObjectSource> TransformTargetFactory;
#define DECLARE_TRANSFORMTARGET(N, T) NAMEDFACTORY(N, T, TransformTargetFactory)
template <class Source, class Destination>
@@ -70,7 +71,7 @@ class TransformImpl : public Transform {
}
};
-class WritableContent {
+class DLL_PUBLIC WritableContent {
public:
enum Class {
ClassPlain = 1,
@@ -86,7 +87,7 @@ class WritableContent {
virtual void writeTo(std::ostream &, const std::string & encoding, ExecContext *) const = 0;
};
-class StaticContent {
+class DLL_PUBLIC StaticContent {
public:
virtual Glib::ustring getContentType() const = 0;
virtual Glib::ustring getEncoding() const = 0;
diff --git a/project2/common/variableType.h b/project2/common/variableType.h
index f2a6890..b395a41 100644
--- a/project2/common/variableType.h
+++ b/project2/common/variableType.h
@@ -7,6 +7,7 @@
#include <glibmm/ustring.h>
#include <boost/variant.hpp>
#include <boost/optional.hpp>
+#include <visibility.h>
enum VT_typeID {
DefaultType,
@@ -29,10 +30,10 @@ class Null {
bool operator==(const Null &) const { return true; }
};
-std::basic_ostream<char> & operator<<(std::basic_ostream<char> &, const Null &);
-std::basic_ostream<unsigned char> & operator<<(std::basic_ostream<unsigned char> &, const Null &);
+DLL_PUBLIC std::basic_ostream<char> & operator<<(std::basic_ostream<char> &, const Null &);
+DLL_PUBLIC std::basic_ostream<unsigned char> & operator<<(std::basic_ostream<unsigned char> &, const Null &);
-class Boolean {
+class DLL_PUBLIC Boolean {
public:
Boolean(bool v);
bool operator<(const Boolean &) const;
@@ -40,8 +41,8 @@ class Boolean {
bool value;
};
-std::basic_ostream<char> & operator<<(std::basic_ostream<char> &, const Boolean &);
-std::basic_ostream<unsigned char> & operator<<(std::basic_ostream<unsigned char> &, const Boolean &);
+DLL_PUBLIC std::basic_ostream<char> & operator<<(std::basic_ostream<char> &, const Boolean &);
+DLL_PUBLIC std::basic_ostream<unsigned char> & operator<<(std::basic_ostream<unsigned char> &, const Boolean &);
typedef boost::variant<
// Other
@@ -57,7 +58,7 @@ typedef boost::variant<
boost::posix_time::ptime
> _VT;
-class VariableType : public _VT {
+class DLL_PUBLIC VariableType : public _VT {
public:
VariableType(const unsigned char * const & t);
VariableType(const char * const & t);
diff --git a/project2/common/variables.cpp b/project2/common/variables.cpp
index 526f90c..a71ca85 100644
--- a/project2/common/variables.cpp
+++ b/project2/common/variables.cpp
@@ -116,5 +116,5 @@ Variable::fromScriptNode(ScriptNodePtr p)
return p->variable();
}
-INSTANTIATEFACTORY(VariableImpl, ScriptNodePtr);
+INSTANTIATEFACTORY(VariableImpl, const ScriptNode *);
diff --git a/project2/common/variables.h b/project2/common/variables.h
index 89aeeaf..c17269a 100644
--- a/project2/common/variables.h
+++ b/project2/common/variables.h
@@ -9,11 +9,12 @@
#include "scripts.h"
#include "variableType.h"
#include <boost/shared_ptr.hpp>
+#include <visibility.h>
class ExecContext;
/// Base class for Project2 variable accessors
-class VariableImpl : public IntrusivePtrBase {
+class DLL_PUBLIC VariableImpl : public IntrusivePtrBase {
public:
virtual VariableType value(ExecContext *) const = 0;
@@ -21,7 +22,7 @@ class VariableImpl : public IntrusivePtrBase {
virtual ~VariableImpl() = default;
};
-class Variable {
+class DLL_PUBLIC Variable {
public:
typedef boost::intrusive_ptr<VariableImpl> VariableImplPtr;
@@ -43,7 +44,7 @@ class Variable {
};
/// Base class for variables whose content is dynamic
-class VariableImplDyn : public VariableImpl {
+class DLL_PUBLIC VariableImplDyn : public VariableImpl {
public:
VariableImplDyn(ScriptNodePtr e);
virtual VariableType value(ExecContext *) const = 0;
@@ -53,7 +54,7 @@ class VariableImplDyn : public VariableImpl {
};
/// Base class to create variables
-typedef AdHoc::Factory<VariableImpl, ScriptNodePtr> VariableFactory;
+typedef AdHoc::Factory<VariableImpl, const ScriptNode *> VariableFactory;
#endif
diff --git a/project2/common/variables/literal.h b/project2/common/variables/literal.h
index 8c120b6..0f743e8 100644
--- a/project2/common/variables/literal.h
+++ b/project2/common/variables/literal.h
@@ -3,8 +3,9 @@
#include "../variables.h"
#include <list>
+#include <visibility.h>
-class VariableLiteral : public VariableImpl {
+class DLL_PUBLIC VariableLiteral : public VariableImpl {
public:
VariableLiteral(const Glib::ustring & src, const VT_typeID format = DefaultType);
VariableLiteral(ScriptNodePtr);
diff --git a/project2/common/view.cpp b/project2/common/view.cpp
index 5ab8f0a..d5bd00f 100644
--- a/project2/common/view.cpp
+++ b/project2/common/view.cpp
@@ -3,7 +3,7 @@
#include <factory.impl.h>
View::View(ScriptNodePtr p) :
- SourceObject(p)
+ SourceObject(p.get())
{
}
@@ -11,5 +11,5 @@ View::~View()
{
}
-INSTANTIATEFACTORY(View, ScriptNodePtr);
+INSTANTIATEFACTORY(View, const ScriptNode *);
diff --git a/project2/common/view.h b/project2/common/view.h
index fa0f37b..1225f11 100644
--- a/project2/common/view.h
+++ b/project2/common/view.h
@@ -3,20 +3,21 @@
#include "sourceObject.h"
#include "scriptStorage.h"
+#include <visibility.h>
class MultiRowSetPresenter;
class ExecContext;
SimpleMessageException(EmptyRequiredRows);
/// Base class for Project2 components that output data
-class View : public virtual SourceObject {
+class DLL_PUBLIC View : public virtual SourceObject {
public:
View(ScriptNodePtr);
virtual ~View();
virtual void execute(const MultiRowSetPresenter *, ExecContext *) const = 0;
};
-typedef AdHoc::Factory<View, ScriptNodePtr> ViewFactory;
+typedef AdHoc::Factory<View, const ScriptNode *> ViewFactory;
#endif
diff --git a/project2/common/viewHost.h b/project2/common/viewHost.h
index 09196f3..4405a1a 100644
--- a/project2/common/viewHost.h
+++ b/project2/common/viewHost.h
@@ -5,9 +5,10 @@
#include "presenter.h"
#include "checkHost.h"
#include <set>
+#include <visibility.h>
#include "commonObjects.h"
-class ViewHost : virtual public CheckHost, virtual public CommonObjects {
+class DLL_PUBLIC ViewHost : virtual public CheckHost, virtual public CommonObjects {
public:
ViewHost(ScriptNodePtr script);
~ViewHost();
diff --git a/project2/daemon/lib/daemon.h b/project2/daemon/lib/daemon.h
index 261d2f0..fb850b7 100644
--- a/project2/daemon/lib/daemon.h
+++ b/project2/daemon/lib/daemon.h
@@ -4,8 +4,9 @@
#include <glibmm/ustring.h>
#include <factory.h>
#include <intrusivePtrBase.h>
+#include <visibility.h>
-class Daemon : public IntrusivePtrBase {
+class DLL_PUBLIC Daemon : public IntrusivePtrBase {
public:
Daemon();
virtual ~Daemon();
diff --git a/project2/files/fsRows.cpp b/project2/files/fsRows.cpp
index b0a2279..445f073 100644
--- a/project2/files/fsRows.cpp
+++ b/project2/files/fsRows.cpp
@@ -238,6 +238,6 @@ FsRows::SearchState::fileType() const
throw NotSupported(__PRETTY_FUNCTION__);
}
-INSTANTIATEFACTORY(FsRows::SpecBase, ScriptNodePtr);
+INSTANTIATEFACTORY(FsRows::SpecBase, const ScriptNode *);
INSTANTIATEFACTORY(FsRows::SpecBase, const Glib::ustring &);
diff --git a/project2/files/fsRows.h b/project2/files/fsRows.h
index 897f274..53df49e 100644
--- a/project2/files/fsRows.h
+++ b/project2/files/fsRows.h
@@ -26,7 +26,7 @@ class FsRows : public RowSet {
const struct stat & curStat(const SearchState * fs) const;
};
typedef boost::intrusive_ptr<SpecBase> SpecBasePtr;
- typedef AdHoc::Factory<SpecBase, ScriptNodePtr> SpecBaseFactory;
+ typedef AdHoc::Factory<SpecBase, const ScriptNode *> SpecBaseFactory;
typedef AdHoc::Factory<SpecBase, const Glib::ustring &> SpecBaseStringFactory;
typedef ANONSTORAGEOF(SpecBase) SpecBases;
typedef std::list<Glib::ustring> SpecSpec;
diff --git a/project2/files/optionsSource.h b/project2/files/optionsSource.h
index a6d1cd1..14bab77 100644
--- a/project2/files/optionsSource.h
+++ b/project2/files/optionsSource.h
@@ -4,15 +4,16 @@
#include "../common/optionsSource.h"
#include "../common/options.h"
#include <boost/filesystem/path.hpp>
+#include <visibility.h>
class FileOptions;
typedef boost::shared_ptr<FileOptions> FileOptionsPtr;
-class FileOptions : public OptionsSource {
+class DLL_PUBLIC FileOptions : public OptionsSource {
public:
FileOptions(const boost::filesystem::path & file);
- void loadInto(const ConfigConsumer & consume, const Options::CurrentPlatform & platform) const;
+ void loadInto(const ConfigConsumer & consume, const Options::CurrentPlatform & platform) const override;
boost::posix_time::ptime modifiedTime() const override;
INITOPTIONS;
diff --git a/project2/files/presenterCache.cpp b/project2/files/presenterCache.cpp
index 9651c20..ec79a0f 100644
--- a/project2/files/presenterCache.cpp
+++ b/project2/files/presenterCache.cpp
@@ -87,7 +87,7 @@ class FilePresenterCache : public PresenterCache {
FilePresenterCache(ScriptNodePtr s) :
PresenterCache(s),
- idProvider(VariableFactory::createNew(Provider, s)) {
+ idProvider(VariableFactory::createNew(Provider, s.get())) {
}
~FilePresenterCache()
{
diff --git a/project2/ice/buildComms.cpp b/project2/ice/buildComms.cpp
index 5bf80e7..49e58c8 100644
--- a/project2/ice/buildComms.cpp
+++ b/project2/ice/buildComms.cpp
@@ -33,7 +33,7 @@ BuildComms::Count(const boost::filesystem::path & in) const
unsigned int
BuildComms::Build(const boost::filesystem::path & in, const boost::filesystem::path & out) const
{
- const auto slicecmd = stringbf("%s --output-dir %s %s", slice2cpp, out.parent_path(), in);
+ const auto slicecmd = stringbf("%s --output-dir %s --dll-export JAM_DLL_PUBLIC %s", slice2cpp, out.parent_path(), in);
Logger()->messagebf(LOG_DEBUG, "%s: slice command: %s", __PRETTY_FUNCTION__, slicecmd);
if (system(slicecmd.c_str())) {
throw std::runtime_error("slice2cpp failed");
diff --git a/project2/ice/iceBase.h b/project2/ice/iceBase.h
index 0a59416..5547342 100644
--- a/project2/ice/iceBase.h
+++ b/project2/ice/iceBase.h
@@ -5,8 +5,9 @@
#include <thread>
#include "iceCompile.h"
#include <variableType.h>
+#include <visibility.h>
-class IceBase {
+class DLL_PUBLIC IceBase {
public:
typedef boost::tuple<IceCompile::Ptr, std::thread *> LibCompile;
typedef boost::variant<LibCompile, IceCompile::LibHandles> LibPromise;
diff --git a/project2/ice/iceClient.h b/project2/ice/iceClient.h
index 1d198f1..7d1d5e1 100644
--- a/project2/ice/iceClient.h
+++ b/project2/ice/iceClient.h
@@ -4,8 +4,9 @@
#include <variables.h>
#include <commonObjects.h>
#include "iceDataSource.h"
+#include <visibility.h>
-class IceClientBase {
+class DLL_PUBLIC IceClientBase {
public:
IceClientBase(ScriptNodePtr p);
diff --git a/project2/ice/iceCompile.cpp b/project2/ice/iceCompile.cpp
index 9eb5cf5..3701c8f 100644
--- a/project2/ice/iceCompile.cpp
+++ b/project2/ice/iceCompile.cpp
@@ -102,7 +102,7 @@ IceCompile::Compile(const fs::path & in, const fs::path & out)
if (components == 0) return;
const auto compile = stringbf(
- "%s %s -o %s -x c++ -c -I %s -I %s -I /usr/include/adhocutil -I %s -I %s -I %s `pkg-config --cflags glibmm-2.4` %s",
+ "%s %s -o %s -x c++ -c -fvisibility=hidden -I %s -I %s -I /usr/include/adhocutil -I %s -I %s -I %s `pkg-config --cflags glibmm-2.4` %s",
cxx, cxxopts, out, tmpdir,
slicerheaderdir,
headerdir / "common",
diff --git a/project2/ice/iceConvert.h b/project2/ice/iceConvert.h
index 93e531c..38b07d9 100644
--- a/project2/ice/iceConvert.h
+++ b/project2/ice/iceConvert.h
@@ -4,16 +4,17 @@
#include <variableType.h>
#include <IceUtil/Exception.h>
#include <IceUtil/Optional.h>
+#include <visibility.h>
template <typename IceType>
-class IceConvert {
+class DLL_PUBLIC IceConvert {
public:
static IceType FromVariable(const VariableType &);
static VariableType ToVariable(const IceType &);
};
template <typename IceOptionalType>
-class IceConvert<IceUtil::Optional<IceOptionalType>> {
+class DLL_PUBLIC IceConvert<IceUtil::Optional<IceOptionalType>> {
public:
static IceUtil::Optional<IceOptionalType> FromVariable(const VariableType & v)
{
diff --git a/project2/ice/iceDaemon.h b/project2/ice/iceDaemon.h
index 41343ec..e61a2b7 100644
--- a/project2/ice/iceDaemon.h
+++ b/project2/ice/iceDaemon.h
@@ -4,8 +4,9 @@
#include <daemon.h>
#include "iceModule.h"
#include "iceBase.h"
+#include <visibility.h>
-class IceDaemon : public Daemon, IceBase {
+class DLL_PUBLIC IceDaemon : public Daemon, IceBase {
public:
IceDaemon(int & argc, char ** argv);
virtual ~IceDaemon();
diff --git a/project2/ice/iceDataSource.h b/project2/ice/iceDataSource.h
index 715f27b..a18efc6 100644
--- a/project2/ice/iceDataSource.h
+++ b/project2/ice/iceDataSource.h
@@ -6,8 +6,9 @@
#include <variables.h>
#include <Ice/Communicator.h>
#include "iceBase.h"
+#include <visibility.h>
-class IceDataSource : public DataSource, IceBase {
+class DLL_PUBLIC IceDataSource : public DataSource, IceBase {
public:
INITOPTIONS;
diff --git a/project2/ice/iceModule.h b/project2/ice/iceModule.h
index 49aa63b..6e55e8a 100644
--- a/project2/ice/iceModule.h
+++ b/project2/ice/iceModule.h
@@ -10,11 +10,12 @@
#include <slicer/modelParts.h>
#include "iceConvert.h"
#include <factory.h>
+#include <visibility.h>
typedef std::map<std::string, VariableType> ParamMap;
class IceDaemon;
-class IceDaemonModule : virtual public ::Ice::Object {
+class DLL_PUBLIC IceDaemonModule : virtual public ::Ice::Object {
public:
void add(Ice::ObjectAdapterPtr, Ice::CommunicatorPtr);
void remove(Ice::ObjectAdapterPtr, Ice::CommunicatorPtr);
diff --git a/project2/ice/iceRows.h b/project2/ice/iceRows.h
index 3ac2019..dded0db 100644
--- a/project2/ice/iceRows.h
+++ b/project2/ice/iceRows.h
@@ -6,10 +6,11 @@
#include "iceClient.h"
#include <slicer/modelParts.h>
#include <slicer/serializer.h>
+#include <visibility.h>
class IceRowState;
-class RowProcSerializer : public Slicer::Serializer {
+class DLL_PUBLIC RowProcSerializer : public Slicer::Serializer {
public:
RowProcSerializer(ExecContext *, const RowProcessorCallback &);
diff --git a/project2/ice/iceboxDaemon.cpp b/project2/ice/iceboxDaemon.cpp
index 8aa3582..0e27303 100644
--- a/project2/ice/iceboxDaemon.cpp
+++ b/project2/ice/iceboxDaemon.cpp
@@ -66,6 +66,7 @@ DECLARE_OPTIONS(IceBoxDaemon, "Project2 IceBox options")
END_OPTIONS(IceBoxDaemon);
extern "C" {
+ DLL_PUBLIC
IceBox::Service *
createProject2Daemon(Ice::CommunicatorPtr ic)
{
diff --git a/project2/ice/slice2Common.h b/project2/ice/slice2Common.h
index 8ea21d0..ec1b35c 100644
--- a/project2/ice/slice2Common.h
+++ b/project2/ice/slice2Common.h
@@ -2,8 +2,9 @@
#define SLICE2COMMON_H
#include <Slice/Parser.h>
+#include <visibility.h>
-class Slice2Common : public Slice::ParserVisitor {
+class DLL_PUBLIC Slice2Common : public Slice::ParserVisitor {
public:
Slice2Common(FILE * c);
diff --git a/project2/ice/sliceCompile.h b/project2/ice/sliceCompile.h
index d8e8e32..db4127b 100644
--- a/project2/ice/sliceCompile.h
+++ b/project2/ice/sliceCompile.h
@@ -5,8 +5,9 @@
#include <string>
#include <Slice/Parser.h>
#include <Slice/Preprocessor.h>
+#include <visibility.h>
-class SliceCompile : public IceCompile {
+class DLL_PUBLIC SliceCompile : public IceCompile {
public:
SliceCompile(const boost::filesystem::path & slice, const IceCompile::Deps & dep);
diff --git a/project2/ice/unittests/conversions.cpp b/project2/ice/unittests/conversions.cpp
index e6be3f8..546e922 100644
--- a/project2/ice/unittests/conversions.cpp
+++ b/project2/ice/unittests/conversions.cpp
@@ -3,6 +3,7 @@
#include <logger.h>
namespace Slicer {
+ DLL_PUBLIC
boost::posix_time::ptime
dateTimeToPTime(const UnitTestComplex::DatePtr & dt)
{
@@ -12,6 +13,7 @@ namespace Slicer {
boost::posix_time::time_duration(dt->hours, dt->minutes, dt->seconds));
}
+ DLL_PUBLIC
UnitTestComplex::DatePtr
ptimeToDateTime(const boost::posix_time::ptime & pt)
{
@@ -27,6 +29,7 @@ namespace Slicer {
}
template<>
+DLL_PUBLIC
::UnitTestComplex::DatePtr
IceConvert< ::UnitTestComplex::DatePtr >::FromVariable(const VariableType & vt)
{
@@ -35,6 +38,7 @@ IceConvert< ::UnitTestComplex::DatePtr >::FromVariable(const VariableType & vt)
}
template<>
+DLL_PUBLIC
VariableType
IceConvert< ::UnitTestComplex::DatePtr >::ToVariable(const ::UnitTestComplex::DatePtr & d)
{
diff --git a/project2/url/curlHelper.h b/project2/url/curlHelper.h
index d56173c..ff1947b 100644
--- a/project2/url/curlHelper.h
+++ b/project2/url/curlHelper.h
@@ -3,9 +3,10 @@
#include "variables.h"
#include <curlHandle.h>
+#include <visibility.h>
/// Project2 helper component to provide common access to remote resources via libcurl
-class CurlHelper {
+class DLL_PUBLIC CurlHelper {
public:
CurlHelper();
virtual ~CurlHelper();
@@ -18,7 +19,7 @@ class CurlHelper {
};
/// Project2 helper component to configure CurlHelper from variables
-class VariableCurlHelper : public CurlHelper {
+class DLL_PUBLIC VariableCurlHelper : public CurlHelper {
public:
VariableCurlHelper(ScriptNodePtr p);
~VariableCurlHelper();
diff --git a/project2/ut/testAppInstance.h b/project2/ut/testAppInstance.h
index aa52227..1c82a90 100644
--- a/project2/ut/testAppInstance.h
+++ b/project2/ut/testAppInstance.h
@@ -3,8 +3,9 @@
#include <appInstance.h>
#include <execContext.h>
+#include <visibility.h>
-class TestAppInstance : public AppInstance, public ExecContext {
+class DLL_PUBLIC TestAppInstance : public AppInstance, public ExecContext {
public:
VariableType getParameter(const VariableType & key) const override;
SessionPtr getSession() const override;
diff --git a/project2/ut/testOptionsSource.h b/project2/ut/testOptionsSource.h
index 3d0e046..c293a4b 100644
--- a/project2/ut/testOptionsSource.h
+++ b/project2/ut/testOptionsSource.h
@@ -2,8 +2,9 @@
#define P2_TEST_OPTIONSSOURCE_H
#include <optionsSource.h>
+#include <visibility.h>
-class TestOptionsSource : public OptionsSource {
+class DLL_PUBLIC TestOptionsSource : public OptionsSource {
public:
typedef std::list<std::pair<std::string, std::string>> Opts;
diff --git a/project2/ut/testPresenter.h b/project2/ut/testPresenter.h
index 74e5e0d..ac36bfa 100644
--- a/project2/ut/testPresenter.h
+++ b/project2/ut/testPresenter.h
@@ -5,10 +5,11 @@
#include <vector>
#include <boost/filesystem/path.hpp>
#include <presenter.h>
+#include <visibility.h>
typedef std::vector<std::string> PresenterData;
-class TestPresenter : public Presenter {
+class DLL_PUBLIC TestPresenter : public Presenter {
public:
TestPresenter();
@@ -32,9 +33,9 @@ class TestPresenter : public Presenter {
};
namespace std {
- bool operator==(const PresenterData &, const boost::filesystem::path &);
- std::ostream & operator<<(std::ostream & s, const PresenterData & v);
- std::istream & operator>>(std::istream & s, PresenterData & v);
+ DLL_PUBLIC bool operator==(const PresenterData &, const boost::filesystem::path &);
+ DLL_PUBLIC std::ostream & operator<<(std::ostream & s, const PresenterData & v);
+ DLL_PUBLIC std::istream & operator>>(std::istream & s, PresenterData & v);
}
#endif
diff --git a/project2/ut/testScriptHost.h b/project2/ut/testScriptHost.h
index c838f9c..816d54c 100644
--- a/project2/ut/testScriptHost.h
+++ b/project2/ut/testScriptHost.h
@@ -4,8 +4,9 @@
#include <taskHost.h>
#include <viewHost.h>
#include "testPresenter.h"
+#include <visibility.h>
-class TestScriptHost : public TaskHost, public ViewHost {
+class DLL_PUBLIC TestScriptHost : public TaskHost, public ViewHost {
public:
TestScriptHost(ScriptReaderPtr script);
~TestScriptHost();
diff --git a/project2/ut/testScriptNode.h b/project2/ut/testScriptNode.h
index d85f6db..bfa8bb2 100644
--- a/project2/ut/testScriptNode.h
+++ b/project2/ut/testScriptNode.h
@@ -2,8 +2,9 @@
#define TESTSCRIPTNODE_H
#include <scripts.h>
+#include <visibility.h>
-class TestScriptNode : public ScriptNode {
+class DLL_PUBLIC TestScriptNode : public ScriptNode {
public:
typedef std::map<std::string, VariableType> Vars;
diff --git a/project2/xml/transformHtml.h b/project2/xml/transformHtml.h
index b8fa82e..0cb3b93 100644
--- a/project2/xml/transformHtml.h
+++ b/project2/xml/transformHtml.h
@@ -3,8 +3,9 @@
#include "transform.h"
#include <libxml/HTMLtree.h>
+#include <visibility.h>
-class HtmlDocument : public SourceOf<HtmlDocument>, public WritableContent, public SourceOf<WritableContent> {
+class DLL_PUBLIC HtmlDocument : public SourceOf<HtmlDocument>, public WritableContent, public SourceOf<WritableContent> {
public:
HtmlDocument(ScriptNodePtr, ObjectSource);
~HtmlDocument();
diff --git a/project2/xml/transformText.h b/project2/xml/transformText.h
index 57e19f9..bba45f0 100644
--- a/project2/xml/transformText.h
+++ b/project2/xml/transformText.h
@@ -4,8 +4,9 @@
#include "transform.h"
#include <glibmm/ustring.h>
#include <variables.h>
+#include <visibility.h>
-class TextDocument : public SourceOf<TextDocument>, public WritableContent, public SourceOf<WritableContent> {
+class DLL_PUBLIC TextDocument : public SourceOf<TextDocument>, public WritableContent, public SourceOf<WritableContent> {
public:
TextDocument(ScriptNodePtr, ObjectSource);
Glib::ustring doc;
diff --git a/project2/xml/xmlCache.cpp b/project2/xml/xmlCache.cpp
index 5e3c66c..343d5e6 100644
--- a/project2/xml/xmlCache.cpp
+++ b/project2/xml/xmlCache.cpp
@@ -85,7 +85,7 @@ boost::filesystem::path XmlCache::Store;
std::string XmlCache::FileName;
time_t XmlCache::CacheLife;
-class CustomXmlCacheFactory : public AdHoc::Factory<RowSetCache, ScriptNodePtr>::For<XmlCache>, public LifeCycle {
+class CustomXmlCacheFactory : public AdHoc::Factory<RowSetCache, const ScriptNode *>::For<XmlCache>, public LifeCycle {
public:
void onIdle() override
{
diff --git a/project2/xml/xmlPresenter.cpp b/project2/xml/xmlPresenter.cpp
index ec3d2f3..88b5108 100644
--- a/project2/xml/xmlPresenter.cpp
+++ b/project2/xml/xmlPresenter.cpp
@@ -275,5 +275,5 @@ XmlDocMutator::XmlDocMutator(ScriptNodePtr)
{
}
-INSTANTIATEFACTORY(XmlDocMutator, ScriptNodePtr);
+INSTANTIATEFACTORY(XmlDocMutator, const ScriptNode *);
diff --git a/project2/xml/xmlPresenter.h b/project2/xml/xmlPresenter.h
index 996ce9b..1410a34 100644
--- a/project2/xml/xmlPresenter.h
+++ b/project2/xml/xmlPresenter.h
@@ -6,6 +6,7 @@
#include "options.h"
#include "variables.h"
#include <libxml/tree.h>
+#include <visibility.h>
namespace xmlpp {
class Document;
@@ -18,9 +19,9 @@ class XmlDocMutator : public IntrusivePtrBase {
virtual void mutateElement(xmlpp::Element *) const = 0;
};
typedef boost::intrusive_ptr<XmlDocMutator> XmlDocMutatorPtr;
-typedef AdHoc::Factory<XmlDocMutator, ScriptNodePtr> XmlDocMutatorFactory;
+typedef AdHoc::Factory<XmlDocMutator, const ScriptNode *> XmlDocMutatorFactory;
-class XmlPresenter : public Presenter, public ContentPresenter, public SourceOf<xmlpp::Document>, public SourceOf<xmlDoc>, public SourceOf<boost::shared_ptr<xmlpp::Document> >, public WritableContent, public SourceOf<WritableContent> {
+class DLL_PUBLIC XmlPresenter : public Presenter, public ContentPresenter, public SourceOf<xmlpp::Document>, public SourceOf<xmlDoc>, public SourceOf<boost::shared_ptr<xmlpp::Document> >, public WritableContent, public SourceOf<WritableContent> {
public:
typedef boost::shared_ptr<xmlpp::Document> XmlDocumentPtr;
XmlPresenter(const Glib::ustring & responseRootNodeName, const Glib::ustring & responseStyle, const Glib::ustring & contentType);
diff --git a/project2/xml/xmlScriptParser.h b/project2/xml/xmlScriptParser.h
index f596c8d..ae5f3af 100644
--- a/project2/xml/xmlScriptParser.h
+++ b/project2/xml/xmlScriptParser.h
@@ -10,6 +10,7 @@
#include <libxml++/document.h>
#include <libxml++/nodes/element.h>
#include <libxml++/parsers/domparser.h>
+#include <visibility.h>
class XmlScriptNode : public ScriptNode {
public:
@@ -32,7 +33,7 @@ class XmlScriptNode : public ScriptNode {
mutable boost::shared_ptr<ScriptNodes> childrenCache;
};
-class XmlScriptParser : public xmlpp::DomParser, public ScriptReader {
+class DLL_PUBLIC XmlScriptParser : public xmlpp::DomParser, public ScriptReader {
public:
SimpleMessageException(ParseError);
SimpleMessageExceptionBase(NotReadable, ParseError);