[asterisk-scf-commits] asterisk-scf/release/ice.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Sat Mar 12 17:08:41 CST 2011
branch "master" has been updated
via 536a226b54716758851d1a8c4c3853f7259f2f55 (commit)
via 343af66104b810d74877b5b0abfab1fdbd9ae184 (commit)
via 3b174bfbd704c40a80510203e633b3169b56c2e7 (commit)
via f376ea3d1d8d1805b0297c0d8146c4888c12386b (commit)
via c88b2f91fb28cc43cae1d49b98159a1aef4f9486 (commit)
via 2942fcd1c8f1ef81687bbb7b3b629fb1a79695f7 (commit)
from d596f705272abdee5d6c8135fccefe1f69cbec10 (commit)
Summary of changes:
cpp/include/IceUtil/DynamicLibrary.h | 2 +-
cpp/include/IceUtil/DynamicLibraryF.h | 6 +-
cpp/include/Slice/Plugin.h | 4 +-
cpp/src/Ice/CommunicatorI.cpp | 2 +-
cpp/src/Ice/CommunicatorI.h | 2 +-
cpp/src/Ice/Instance.cpp | 4 +-
cpp/src/Ice/Instance.h | 4 +-
cpp/src/Ice/PluginManagerI.cpp | 6 +-
cpp/src/Ice/PluginManagerI.h | 4 +-
cpp/src/IceBox/ServiceManagerI.cpp | 4 +-
cpp/src/IceBox/ServiceManagerI.h | 2 +-
cpp/src/IceUtil/DynamicLibrary.cpp | 22 ++++----
cpp/src/Slice/.depend | 5 +-
cpp/src/Slice/.depend.mak | 5 +-
cpp/src/Slice/Makefile | 3 +-
cpp/src/Slice/Makefile.mak | 3 +-
cpp/src/Slice/Plugin.cpp | 93 +++++++++++++++++++++++++++++++++
cpp/src/Slice/PythonUtil.cpp | 27 +---------
cpp/src/Slice/RubyUtil.cpp | 27 +---------
cpp/src/slice2cpp/.depend | 2 +-
cpp/src/slice2cpp/.depend.mak | 2 +-
cpp/src/slice2cpp/Gen.cpp | 27 +---------
cpp/src/slice2cs/.depend | 2 +-
cpp/src/slice2cs/.depend.mak | 2 +-
cpp/src/slice2cs/Gen.cpp | 27 +---------
cpp/src/slice2freeze/.depend | 2 +-
cpp/src/slice2freeze/.depend.mak | 2 +-
cpp/src/slice2freeze/Main.cpp | 27 +---------
cpp/src/slice2freezej/.depend | 2 +-
cpp/src/slice2freezej/.depend.mak | 2 +-
cpp/src/slice2freezej/Main.cpp | 27 +---------
cpp/src/slice2java/.depend | 2 +-
cpp/src/slice2java/.depend.mak | 2 +-
cpp/src/slice2java/Gen.cpp | 28 +----------
cpp/src/slice2php/.depend | 2 +-
cpp/src/slice2php/.depend.mak | 2 +-
cpp/src/slice2php/Main.cpp | 27 +---------
37 files changed, 155 insertions(+), 257 deletions(-)
create mode 100644 cpp/src/Slice/Plugin.cpp
- Log -----------------------------------------------------------------
commit 536a226b54716758851d1a8c4c3853f7259f2f55
Merge: d596f70 343af66
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Sat Mar 12 17:08:22 2011 -0600
Merge branch 'slice-plugins'
Conflicts:
cpp/src/slice2java/.depend
cpp/src/slice2java/.depend.mak
cpp/src/slice2java/Gen.cpp
diff --cc cpp/src/IceUtil/DynamicLibrary.cpp
index a40820e,b60ca99..da851fc
mode 100755,100644..100755
--- a/cpp/src/IceUtil/DynamicLibrary.cpp
+++ b/cpp/src/IceUtil/DynamicLibrary.cpp
@@@ -44,17 -44,13 +44,17 @@@ IceUtilInternal::DynamicLibrary::~Dynam
*/
}
- IceUtil::DynamicLibrary::symbol_type
- IceUtil::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIceVersion)
+ IceUtilInternal::DynamicLibrary::symbol_type
+ IceUtilInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIceVersion)
{
+ // entryPoint format: [libPath@]libName[,version]:funcName
string::size_type colon = entryPoint.rfind(':');
string::size_type comma = entryPoint.find(',');
+ string::size_type at = entryPoint.find('@');
if(colon == string::npos || colon == entryPoint.size() - 1 ||
- (comma != string::npos && (comma > colon || comma == colon - 1)))
+ (comma != string::npos && (comma > colon || comma == colon - 1)) ||
+ (at != string::npos && (at >= colon - 1 ||
+ (comma != string::npos && at >= comma - 1))))
{
_err = "invalid entry point format `" + entryPoint + "'";
return 0;
diff --cc cpp/src/Slice/RubyUtil.cpp
index 99aa8f3,b93d046..d81d5a5
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@@ -1662,34 -1633,9 +1661,10 @@@ voi
Slice::Ruby::generate(const UnitPtr& un, bool all, bool checksum,
const vector<string>& includePaths,
Output& out,
+ bool suppress,
const vector<string>& plugins)
{
- for(vector<string>::const_iterator plugin = plugins.begin(); plugin != plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageRuby);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- un->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(plugins, Plugin::LanguageRuby, un);
out << nl << "require 'Ice'";
diff --cc cpp/src/slice2cpp/Gen.cpp
index a8567d0,6e9c577..1b396d3
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@@ -178,38 -174,8 +177,14 @@@ Slice::Gen::generate(const UnitPtr& p
{
string file = p->topLevelFile();
- for(vector<string>::const_iterator plugin = _plugins.begin(); plugin != _plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageCPlusPlus);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- p->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(_plugins, Plugin::LanguageCPlusPlus, p);
+ if(_suppress)
+ {
+ p->setScopeGeneratorPolicy(createSuppressorGenerator());
+ }
+
+
//
// Give precedence to header-ext global metadata.
//
diff --cc cpp/src/slice2cs/Gen.cpp
index e010ab3,228f540..828a08a
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@@ -2086,37 -1959,9 +2085,13 @@@ Slice::Gen::~Gen(
void
Slice::Gen::generate(const UnitPtr& p)
{
+ if(_suppress)
+ {
+ p->setScopeGeneratorPolicy(createSuppressorGenerator());
+ }
CsGenerator::validateMetaData(p);
- for(vector<string>::const_iterator plugin = _plugins.begin(); plugin != _plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageCs);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- p->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(_plugins, Plugin::LanguageCs, p);
UnitVisitor unitVisitor(_out);
p->visit(&unitVisitor, false);
diff --cc cpp/src/slice2java/.depend
index 7efcb89,0852473..5d3f6f9
--- a/cpp/src/slice2java/.depend
+++ b/cpp/src/slice2java/.depend
@@@ -1,2 -1,2 +1,2 @@@
- Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Slice/JavaUtil.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/Slice/FileTracker.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/StringUtil.h
-Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Slice/JavaUtil.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/StringUtil.h
++Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Slice/JavaUtil.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/StringUtil.h
Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Parser.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/OutputUtil.h Gen.h $(includedir)/Slice/JavaUtil.h $(includedir)/Slice/Checksum.h
diff --cc cpp/src/slice2java/.depend.mak
index 022a6e7,7769854..8075a27
--- a/cpp/src/slice2java/.depend.mak
+++ b/cpp/src/slice2java/.depend.mak
@@@ -1,2 -1,2 +1,2 @@@
- Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" Gen.h "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/IceUtil/StringUtil.h"
-Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" Gen.h "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/IceUtil/StringUtil.h"
++Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" Gen.h "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/IceUtil/StringUtil.h"
Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/OutputUtil.h" Gen.h "$(includedir)/Slice/JavaUtil.h" "$(includedir)/Slice/Checksum.h"
diff --cc cpp/src/slice2java/Gen.cpp
index c35ac08,9e5622f..88073eb
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@@ -1988,36 -1758,7 +1987,11 @@@ Slice::Gen::~Gen(
void
Slice::Gen::generate(const UnitPtr& p, bool stream)
{
+ if(_suppress)
+ {
+ p->setScopeGeneratorPolicy(createSuppressorGenerator());
+ }
-
- for(vector<string>::const_iterator plugin = _plugins.begin(); plugin != _plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageJava);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- p->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(_plugins, Plugin::LanguageJava, p);
JavaGenerator::validateMetaData(p);
commit 343af66104b810d74877b5b0abfab1fdbd9ae184
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Sat Mar 12 17:01:52 2011 -0600
Update to work with IceUtilInternal::DynamicLibrary instead of
IceUtil::DynamicLibrary.
diff --git a/cpp/src/Slice/Plugin.cpp b/cpp/src/Slice/Plugin.cpp
index 632629e..444d228 100644
--- a/cpp/src/Slice/Plugin.cpp
+++ b/cpp/src/Slice/Plugin.cpp
@@ -23,8 +23,8 @@ Plugin::applyPluginsToUnit(const std::vector<std::string>& plugins, Language lan
{
StringList args;
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym;
+ IceUtilInternal::DynamicLibraryPtr library = new IceUtilInternal::DynamicLibrary();
+ IceUtilInternal::DynamicLibrary::symbol_type sym;
string::size_type firstColon = plugin->find(':');
string::size_type argStart = plugin->rfind(':');
commit 3b174bfbd704c40a80510203e633b3169b56c2e7
Merge: c88b2f9 f376ea3
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Sat Mar 12 17:00:02 2011 -0600
Merge branch 'move-dynamiclibrary-to-iceutil' into slice-plugins
commit f376ea3d1d8d1805b0297c0d8146c4888c12386b
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Sat Mar 12 16:58:51 2011 -0600
DynamicLibrary should have been moved to the IceUtilInternal namespace,
not IceUtil.
diff --git a/cpp/include/IceUtil/DynamicLibrary.h b/cpp/include/IceUtil/DynamicLibrary.h
index 6b05415..32aac97 100644
--- a/cpp/include/IceUtil/DynamicLibrary.h
+++ b/cpp/include/IceUtil/DynamicLibrary.h
@@ -13,7 +13,7 @@
#include <IceUtil/DynamicLibraryF.h>
#include <IceUtil/Shared.h>
-namespace IceUtil
+namespace IceUtilInternal
{
class ICE_UTIL_API DynamicLibrary : public ::IceUtil::Shared
diff --git a/cpp/include/IceUtil/DynamicLibraryF.h b/cpp/include/IceUtil/DynamicLibraryF.h
index 1cd4b46..fd9fac4 100644
--- a/cpp/include/IceUtil/DynamicLibraryF.h
+++ b/cpp/include/IceUtil/DynamicLibraryF.h
@@ -14,16 +14,16 @@
#include <Ice/Handle.h>
-namespace IceUtil
+namespace IceUtilInternal
{
class DynamicLibrary;
ICE_UTIL_API IceUtil::Shared* upCast(DynamicLibrary*);
-typedef Handle<DynamicLibrary> DynamicLibraryPtr;
+typedef IceUtil::Handle<DynamicLibrary> DynamicLibraryPtr;
class DynamicLibraryList;
ICE_UTIL_API IceUtil::Shared* upCast(DynamicLibraryList*);
-typedef Handle<DynamicLibraryList> DynamicLibraryListPtr;
+typedef IceUtil::Handle<DynamicLibraryList> DynamicLibraryListPtr;
}
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index 872b488..4348b48 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -386,7 +386,7 @@ Ice::CommunicatorI::CommunicatorI(const InitializationData& initData)
// the libraries are not unloaded until this Communicator's
// destructor is invoked.
//
- const_cast<IceUtil::DynamicLibraryListPtr&>(_dynamicLibraryList) = _instance->dynamicLibraryList();
+ const_cast<IceUtilInternal::DynamicLibraryListPtr&>(_dynamicLibraryList) = _instance->dynamicLibraryList();
//
// If this is the first communicator that is created, use that communicator's
diff --git a/cpp/src/Ice/CommunicatorI.h b/cpp/src/Ice/CommunicatorI.h
index bc3d65c..96758bc 100644
--- a/cpp/src/Ice/CommunicatorI.h
+++ b/cpp/src/Ice/CommunicatorI.h
@@ -94,7 +94,7 @@ private:
// We don't want the dynamic libraries to be unloaded until the
// Communicator's destructor is invoked.
//
- const ::IceUtil::DynamicLibraryListPtr _dynamicLibraryList;
+ const ::IceUtilInternal::DynamicLibraryListPtr _dynamicLibraryList;
};
}
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 300019c..ad0f8fa 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -335,7 +335,7 @@ IceInternal::Instance::endpointFactoryManager() const
return _endpointFactoryManager;
}
-IceUtil::DynamicLibraryListPtr
+IceUtilInternal::DynamicLibraryListPtr
IceInternal::Instance::dynamicLibraryList() const
{
IceUtil::RecMutex::Lock sync(*this);
@@ -978,7 +978,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
EndpointFactoryPtr udpEndpointFactory = new UdpEndpointFactory(this);
_endpointFactoryManager->add(udpEndpointFactory);
- _dynamicLibraryList = new IceUtil::DynamicLibraryList;
+ _dynamicLibraryList = new IceUtilInternal::DynamicLibraryList;
_pluginManager = new PluginManagerI(communicator, _dynamicLibraryList);
diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h
index 1e1c1f3..d22c0cd 100644
--- a/cpp/src/Ice/Instance.h
+++ b/cpp/src/Ice/Instance.h
@@ -73,7 +73,7 @@ public:
RetryQueuePtr retryQueue();
IceUtil::TimerPtr timer();
EndpointFactoryManagerPtr endpointFactoryManager() const;
- IceUtil::DynamicLibraryListPtr dynamicLibraryList() const;
+ IceUtilInternal::DynamicLibraryListPtr dynamicLibraryList() const;
Ice::PluginManagerPtr pluginManager() const;
size_t messageSizeMax() const { return _messageSizeMax; }
Ice::Int clientACM() const;
@@ -134,7 +134,7 @@ private:
RetryQueuePtr _retryQueue;
IceUtil::TimerPtr _timer;
EndpointFactoryManagerPtr _endpointFactoryManager;
- IceUtil::DynamicLibraryListPtr _dynamicLibraryList;
+ IceUtilInternal::DynamicLibraryListPtr _dynamicLibraryList;
Ice::PluginManagerPtr _pluginManager;
const Ice::ImplicitContextIPtr _implicitContext;
Ice::ObjectAdapterPtr _adminAdapter;
diff --git a/cpp/src/Ice/PluginManagerI.cpp b/cpp/src/Ice/PluginManagerI.cpp
index db1522d..2cfb6cc 100644
--- a/cpp/src/Ice/PluginManagerI.cpp
+++ b/cpp/src/Ice/PluginManagerI.cpp
@@ -172,7 +172,7 @@ Ice::PluginManagerI::destroy()
_libraries = 0;
}
-Ice::PluginManagerI::PluginManagerI(const CommunicatorPtr& communicator, const IceUtil::DynamicLibraryListPtr& libraries) :
+Ice::PluginManagerI::PluginManagerI(const CommunicatorPtr& communicator, const IceUtilInternal::DynamicLibraryListPtr& libraries) :
_communicator(communicator),
_libraries(libraries),
_initialized(false)
@@ -343,8 +343,8 @@ Ice::PluginManagerI::loadPlugin(const string& name, const string& pluginSpec, St
// Load the entry point symbol.
//
PluginPtr plugin;
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(entryPoint);
+ IceUtilInternal::DynamicLibraryPtr library = new IceUtilInternal::DynamicLibrary();
+ IceUtilInternal::DynamicLibrary::symbol_type sym = library->loadEntryPoint(entryPoint);
if(sym == 0)
{
ostringstream out;
diff --git a/cpp/src/Ice/PluginManagerI.h b/cpp/src/Ice/PluginManagerI.h
index 01f5c1a..7507be9 100644
--- a/cpp/src/Ice/PluginManagerI.h
+++ b/cpp/src/Ice/PluginManagerI.h
@@ -40,7 +40,7 @@ public:
private:
- PluginManagerI(const CommunicatorPtr&, const IceUtil::DynamicLibraryListPtr&);
+ PluginManagerI(const CommunicatorPtr&, const IceUtilInternal::DynamicLibraryListPtr&);
friend class IceInternal::Instance;
friend void IceInternal::loadPlugin(const Ice::CommunicatorPtr&, const std::string&, const std::string&,
Ice::StringSeq&);
@@ -49,7 +49,7 @@ private:
void loadPlugin(const std::string&, const std::string&, StringSeq&);
CommunicatorPtr _communicator;
- IceUtil::DynamicLibraryListPtr _libraries;
+ IceUtilInternal::DynamicLibraryListPtr _libraries;
std::map<std::string, PluginPtr> _plugins;
std::vector<PluginPtr> _initOrder;
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 515467f..6a636c6 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -577,8 +577,8 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
//
// Load the entry point.
//
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(entryPoint, false);
+ IceUtilInternal::DynamicLibraryPtr library = new IceUtilInternal::DynamicLibrary();
+ IceUtilInternal::DynamicLibrary::symbol_type sym = library->loadEntryPoint(entryPoint, false);
if(sym == 0)
{
string msg = library->getErrorMessage();
diff --git a/cpp/src/IceBox/ServiceManagerI.h b/cpp/src/IceBox/ServiceManagerI.h
index a8bd060..2813680 100644
--- a/cpp/src/IceBox/ServiceManagerI.h
+++ b/cpp/src/IceBox/ServiceManagerI.h
@@ -56,7 +56,7 @@ private:
{
::std::string name;
ServicePtr service;
- ::IceUtil::DynamicLibraryPtr library;
+ ::IceUtilInternal::DynamicLibraryPtr library;
::Ice::CommunicatorPtr communicator;
::std::string envName;
ServiceStatus status;
diff --git a/cpp/src/IceUtil/DynamicLibrary.cpp b/cpp/src/IceUtil/DynamicLibrary.cpp
index c22beea..b60ca99 100644
--- a/cpp/src/IceUtil/DynamicLibrary.cpp
+++ b/cpp/src/IceUtil/DynamicLibrary.cpp
@@ -17,15 +17,15 @@
using namespace Ice;
using namespace std;
-IceUtil::Shared* IceUtil::upCast(DynamicLibrary* p) { return p; }
-IceUtil::Shared* IceUtil::upCast(DynamicLibraryList* p) { return p; }
+IceUtil::Shared* IceUtilInternal::upCast(DynamicLibrary* p) { return p; }
+IceUtil::Shared* IceUtilInternal::upCast(DynamicLibraryList* p) { return p; }
-IceUtil::DynamicLibrary::DynamicLibrary()
+IceUtilInternal::DynamicLibrary::DynamicLibrary()
: _hnd(0)
{
}
-IceUtil::DynamicLibrary::~DynamicLibrary()
+IceUtilInternal::DynamicLibrary::~DynamicLibrary()
{
/*
* Closing the library here can cause a crash at program exit if
@@ -44,8 +44,8 @@ IceUtil::DynamicLibrary::~DynamicLibrary()
*/
}
-IceUtil::DynamicLibrary::symbol_type
-IceUtil::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIceVersion)
+IceUtilInternal::DynamicLibrary::symbol_type
+IceUtilInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIceVersion)
{
string::size_type colon = entryPoint.rfind(':');
string::size_type comma = entryPoint.find(',');
@@ -151,7 +151,7 @@ IceUtil::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIceVer
}
bool
-IceUtil::DynamicLibrary::load(const string& lib)
+IceUtilInternal::DynamicLibrary::load(const string& lib)
{
#ifdef _WIN32
_hnd = LoadLibrary(lib.c_str());
@@ -179,8 +179,8 @@ IceUtil::DynamicLibrary::load(const string& lib)
return _hnd != 0;
}
-IceUtil::DynamicLibrary::symbol_type
-IceUtil::DynamicLibrary::getSymbol(const string& name)
+IceUtilInternal::DynamicLibrary::symbol_type
+IceUtilInternal::DynamicLibrary::getSymbol(const string& name)
{
assert(_hnd != 0);
#ifdef _WIN32
@@ -208,13 +208,13 @@ IceUtil::DynamicLibrary::getSymbol(const string& name)
}
const string&
-IceUtil::DynamicLibrary::getErrorMessage() const
+IceUtilInternal::DynamicLibrary::getErrorMessage() const
{
return _err;
}
void
-IceUtil::DynamicLibraryList::add(const DynamicLibraryPtr& library)
+IceUtilInternal::DynamicLibraryList::add(const DynamicLibraryPtr& library)
{
_libraries.push_back(library);
}
commit c88b2f91fb28cc43cae1d49b98159a1aef4f9486
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Mar 10 12:22:22 2011 -0600
Add support for arguments specified to plugins.
diff --git a/cpp/include/Slice/Plugin.h b/cpp/include/Slice/Plugin.h
index b47ba3a..7d6363a 100644
--- a/cpp/include/Slice/Plugin.h
+++ b/cpp/include/Slice/Plugin.h
@@ -21,7 +21,7 @@ namespace Plugin
typedef std::list<ParserVisitor *> VisitorList;
- typedef VisitorList* (*FACTORY)(Language);
+ typedef VisitorList* (*FACTORY)(Language, const StringList*);
void applyPluginsToUnit(const std::vector<std::string>&, Language, const UnitPtr&);
diff --git a/cpp/src/Slice/Plugin.cpp b/cpp/src/Slice/Plugin.cpp
index 8e8cb12..632629e 100644
--- a/cpp/src/Slice/Plugin.cpp
+++ b/cpp/src/Slice/Plugin.cpp
@@ -21,8 +21,51 @@ Plugin::applyPluginsToUnit(const std::vector<std::string>& plugins, Language lan
{
for(vector<string>::const_iterator plugin = plugins.begin(); plugin != plugins.end(); plugin++)
{
+ StringList args;
+
IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
+ IceUtil::DynamicLibrary::symbol_type sym;
+
+ string::size_type firstColon = plugin->find(':');
+ string::size_type argStart = plugin->rfind(':');
+
+ // if there is more than one colon, then there could be arguments for the
+ // plugin
+ if(firstColon != string::npos && firstColon != argStart)
+ {
+ string pluginName = plugin->substr(0, argStart);
+ string::size_type argEnd;
+ string arg;
+
+ sym = library->loadEntryPoint(pluginName, false);
+
+ if(sym != 0)
+ {
+ do
+ {
+ argStart++;
+ argEnd = plugin->find(',', argStart);
+ if(argEnd == string::npos)
+ {
+ arg = plugin->substr(argStart);
+ }
+ else
+ {
+ arg = plugin->substr(argStart, argEnd - argStart);
+ }
+ if(arg.size() != 0)
+ {
+ args.push_back(arg);
+ }
+ argStart = argEnd;
+ } while (argEnd != string::npos);
+ }
+ }
+ else
+ {
+ sym = library->loadEntryPoint(*plugin, false);
+ }
+
if(sym == 0)
{
string msg = library->getErrorMessage();
@@ -32,7 +75,8 @@ Plugin::applyPluginsToUnit(const std::vector<std::string>& plugins, Language lan
Plugin::VisitorList* pluginVisitors;
Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(lang);
+ pluginVisitors = factory(lang, &args);
+ args.clear();
if(pluginVisitors)
{
commit 2942fcd1c8f1ef81687bbb7b3b629fb1a79695f7
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Thu Mar 10 08:07:37 2011 -0600
Move common plugin visitor application code to the Slice library.
diff --git a/cpp/include/Slice/Plugin.h b/cpp/include/Slice/Plugin.h
index 7649d90..b47ba3a 100644
--- a/cpp/include/Slice/Plugin.h
+++ b/cpp/include/Slice/Plugin.h
@@ -21,7 +21,9 @@ namespace Plugin
typedef std::list<ParserVisitor *> VisitorList;
- typedef VisitorList* (*FACTORY)(Plugin::Language);
+ typedef VisitorList* (*FACTORY)(Language);
+
+ void applyPluginsToUnit(const std::vector<std::string>&, Language, const UnitPtr&);
}
diff --git a/cpp/src/Slice/.depend b/cpp/src/Slice/.depend
index 0b7c1e9..f0190af 100644
--- a/cpp/src/Slice/.depend
+++ b/cpp/src/Slice/.depend
@@ -6,11 +6,12 @@ CsUtil$(OBJEXT): CsUtil.cpp $(includedir)/Slice/CsUtil.h $(includedir)/Slice/Par
JavaUtil$(OBJEXT): JavaUtil.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/Slice/JavaUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/Functional.h
Preprocessor$(OBJEXT): Preprocessor.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/Slice/Preprocessor.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Slice/Util.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/IceUtil/StringUtil.h $(includedir)/IceUtil/FileUtil.h $(includedir)/IceUtil/UUID.h $(includedir)/IceUtil/Unicode.h
Checksum$(OBJEXT): Checksum.cpp $(includedir)/Slice/Checksum.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h ../Slice/MD5.h
-PythonUtil$(OBJEXT): PythonUtil.cpp $(includedir)/Slice/PythonUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/IceUtil.h $(includedir)/IceUtil/AbstractMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Cache.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/CountDownLatch.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/IceUtil/RWRecMutex.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/UUID.h $(includedir)/IceUtil/Unicode.h $(includedir)/IceUtil/StringUtil.h $(includedir)/IceUtil/InputUtil.h
+PythonUtil$(OBJEXT): PythonUtil.cpp $(includedir)/Slice/PythonUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h $(includedir)/IceUtil/IceUtil.h $(includedir)/IceUtil/AbstractMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Cache.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/CountDownLatch.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/IceUtil/RWRecMutex.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/UUID.h $(includedir)/IceUtil/Unicode.h $(includedir)/IceUtil/StringUtil.h $(includedir)/IceUtil/InputUtil.h
DotNetNames$(OBJEXT): DotNetNames.cpp $(includedir)/Slice/DotNetNames.h
-RubyUtil$(OBJEXT): RubyUtil.cpp $(includedir)/Slice/RubyUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/InputUtil.h
+RubyUtil$(OBJEXT): RubyUtil.cpp $(includedir)/Slice/RubyUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/InputUtil.h
PHPUtil$(OBJEXT): PHPUtil.cpp $(includedir)/Slice/PHPUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h
Util$(OBJEXT): Util.cpp $(includedir)/Slice/Util.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/IceUtil/Unicode.h $(includedir)/IceUtil/FileUtil.h $(includedir)/IceUtil/StringUtil.h
FileTracker$(OBJEXT): FileTracker.cpp $(includedir)/Slice/FileTracker.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h
MD5$(OBJEXT): MD5.cpp ../Slice/MD5.h $(includedir)/IceUtil/Config.h ../Slice/MD5I.h
MD5I$(OBJEXT): MD5I.cpp ../Slice/MD5I.h
+Plugin$(OBJEXT): Plugin.cpp $(includedir)/Slice/Plugin.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/DynamicLibrary.h $(includedir)/IceUtil/DynamicLibraryF.h $(includedir)/Ice/Handle.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h
diff --git a/cpp/src/Slice/.depend.mak b/cpp/src/Slice/.depend.mak
index f0ca13e..8332928 100644
--- a/cpp/src/Slice/.depend.mak
+++ b/cpp/src/Slice/.depend.mak
@@ -6,11 +6,12 @@ CsUtil$(OBJEXT): CsUtil.cpp "$(includedir)/Slice/CsUtil.h" "$(includedir)/Slice/
JavaUtil$(OBJEXT): JavaUtil.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/Functional.h"
Preprocessor$(OBJEXT): Preprocessor.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/IceUtil/StringUtil.h" "$(includedir)/IceUtil/FileUtil.h" "$(includedir)/IceUtil/UUID.h" "$(includedir)/IceUtil/Unicode.h"
Checksum$(OBJEXT): Checksum.cpp "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" ../Slice/MD5.h
-PythonUtil$(OBJEXT): PythonUtil.cpp "$(includedir)/Slice/PythonUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/IceUtil.h" "$(includedir)/IceUtil/AbstractMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/Cache.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/CountDownLatch.h" "$(includedir)/IceUtil/Cond.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Monitor.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/IceUtil/RWRecMutex.h" "$(includedir)/IceUtil/Thread.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/StaticMutex.h" "$(includedir)/IceUtil/Timer.h" "$(includedir)/IceUtil/UUID.h" "$(includedir)/IceUtil/Unicode.h" "$(includedir)/IceUtil/StringUtil.h" "$(includedir)/IceUtil/InputUtil.h"
+PythonUtil$(OBJEXT): PythonUtil.cpp "$(includedir)/Slice/PythonUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h" "$(includedir)/IceUtil/IceUtil.h" "$(includedir)/IceUtil/AbstractMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/Cache.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/CountDownLatch.h" "$(includedir)/IceUtil/Cond.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Monitor.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/IceUtil/RWRecMutex.h" "$(includedir)/IceUtil/Thread.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/StaticMutex.h" "$(includedir)/IceUtil/Timer.h" "$(includedir)/IceUtil/UUID.h" "$(includedir)/IceUtil/Unicode.h" "$(includedir)/IceUtil/StringUtil.h" "$(includedir)/IceUtil/InputUtil.h"
DotNetNames$(OBJEXT): DotNetNames.cpp "$(includedir)/Slice/DotNetNames.h"
-RubyUtil$(OBJEXT): RubyUtil.cpp "$(includedir)/Slice/RubyUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/InputUtil.h"
+RubyUtil$(OBJEXT): RubyUtil.cpp "$(includedir)/Slice/RubyUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/InputUtil.h"
PHPUtil$(OBJEXT): PHPUtil.cpp "$(includedir)/Slice/PHPUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h"
Util$(OBJEXT): Util.cpp "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/IceUtil/Unicode.h" "$(includedir)/IceUtil/FileUtil.h" "$(includedir)/IceUtil/StringUtil.h"
FileTracker$(OBJEXT): FileTracker.cpp "$(includedir)/Slice/FileTracker.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h"
MD5$(OBJEXT): MD5.cpp ../Slice/MD5.h "$(includedir)/IceUtil/Config.h" ../Slice/MD5I.h
MD5I$(OBJEXT): MD5I.cpp ../Slice/MD5I.h
+Plugin$(OBJEXT): Plugin.cpp "$(includedir)/Slice/Plugin.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/DynamicLibrary.h" "$(includedir)/IceUtil/DynamicLibraryF.h" "$(includedir)/Ice/Handle.h" "$(includedir)/Ice/Config.h" "$(includedir)/Ice/ProxyHandle.h"
diff --git a/cpp/src/Slice/Makefile b/cpp/src/Slice/Makefile
index d6a010c..5d92678 100644
--- a/cpp/src/Slice/Makefile
+++ b/cpp/src/Slice/Makefile
@@ -30,7 +30,8 @@ OBJS = Scanner.o \
Util.o \
FileTracker.o \
MD5.o \
- MD5I.o
+ MD5I.o \
+ Plugin.o
SRCS = $(OBJS:.o=.cpp)
diff --git a/cpp/src/Slice/Makefile.mak b/cpp/src/Slice/Makefile.mak
index b370fb1..011ded1 100644
--- a/cpp/src/Slice/Makefile.mak
+++ b/cpp/src/Slice/Makefile.mak
@@ -29,7 +29,8 @@ OBJS = Scanner.obj \
Util.obj \
FileTracker.obj \
MD5.obj \
- MD5I.obj
+ MD5I.obj \
+ Plugin.obj
SRCS = $(OBJS:.obj=.cpp)
diff --git a/cpp/src/Slice/Plugin.cpp b/cpp/src/Slice/Plugin.cpp
new file mode 100644
index 0000000..8e8cb12
--- /dev/null
+++ b/cpp/src/Slice/Plugin.cpp
@@ -0,0 +1,49 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Slice/Plugin.h>
+#include <IceUtil/DynamicLibrary.h>
+
+using namespace std;
+using namespace Slice;
+
+namespace Slice
+{
+
+void
+Plugin::applyPluginsToUnit(const std::vector<std::string>& plugins, Language lang, const UnitPtr& unit)
+{
+ for(vector<string>::const_iterator plugin = plugins.begin(); plugin != plugins.end(); plugin++)
+ {
+ IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
+ IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
+ if(sym == 0)
+ {
+ string msg = library->getErrorMessage();
+ cerr << "Unable to find " << *plugin << " = " << msg << endl;
+ continue;
+ }
+
+ Plugin::VisitorList* pluginVisitors;
+ Plugin::FACTORY factory = (Plugin::FACTORY) sym;
+ pluginVisitors = factory(lang);
+
+ if(pluginVisitors)
+ {
+ for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
+ {
+ unit->visit(*it, true);
+ delete *it;
+ }
+ delete pluginVisitors;
+ }
+ }
+}
+
+}
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index b45a20e..5bbab00 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -14,7 +14,6 @@
#include <IceUtil/IceUtil.h>
#include <IceUtil/StringUtil.h>
#include <IceUtil/InputUtil.h>
-#include <IceUtil/DynamicLibrary.h>
#include <climits>
#include <iterator>
@@ -2246,31 +2245,7 @@ Slice::Python::generate(const UnitPtr& un, bool all, bool checksum, const vector
Slice::Python::MetaDataVisitor visitor;
un->visit(&visitor, false);
- for(vector<string>::const_iterator plugin = plugins.begin(); plugin != plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguagePython);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- un->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(plugins, Plugin::LanguagePython, un);
out << nl << "import Ice, IcePy, __builtin__";
diff --git a/cpp/src/Slice/RubyUtil.cpp b/cpp/src/Slice/RubyUtil.cpp
index 5f97cfb..b93d046 100644
--- a/cpp/src/Slice/RubyUtil.cpp
+++ b/cpp/src/Slice/RubyUtil.cpp
@@ -13,7 +13,6 @@
#include <Slice/Plugin.h>
#include <IceUtil/Functional.h>
#include <IceUtil/InputUtil.h>
-#include <IceUtil/DynamicLibrary.h>
#include <iterator>
using namespace std;
@@ -1636,31 +1635,7 @@ Slice::Ruby::generate(const UnitPtr& un, bool all, bool checksum,
Output& out,
const vector<string>& plugins)
{
- for(vector<string>::const_iterator plugin = plugins.begin(); plugin != plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageRuby);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- un->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(plugins, Plugin::LanguageRuby, un);
out << nl << "require 'Ice'";
diff --git a/cpp/src/slice2cpp/.depend b/cpp/src/slice2cpp/.depend
index 9ac6f06..e657c15 100644
--- a/cpp/src/slice2cpp/.depend
+++ b/cpp/src/slice2cpp/.depend
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Util.h $(includedir)/Slice/CPlusPlusUtil.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Iterator.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/FileTracker.h
+Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Util.h $(includedir)/Slice/CPlusPlusUtil.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Iterator.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Plugin.h
Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Parser.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/OutputUtil.h Gen.h
diff --git a/cpp/src/slice2cpp/.depend.mak b/cpp/src/slice2cpp/.depend.mak
index 595c481..ba80226 100644
--- a/cpp/src/slice2cpp/.depend.mak
+++ b/cpp/src/slice2cpp/.depend.mak
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" Gen.h "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/CPlusPlusUtil.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/FileTracker.h"
+Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" Gen.h "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/CPlusPlusUtil.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Plugin.h"
Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/OutputUtil.h" Gen.h
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 14b6cf1..6e9c577 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -8,7 +8,6 @@
// **********************************************************************
#include <IceUtil/DisableWarnings.h>
-#include <IceUtil/DynamicLibrary.h>
#include <Gen.h>
#include <Slice/Util.h>
#include <Slice/CPlusPlusUtil.h>
@@ -175,31 +174,7 @@ Slice::Gen::generate(const UnitPtr& p)
{
string file = p->topLevelFile();
- for(vector<string>::const_iterator plugin = _plugins.begin(); plugin != _plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageCPlusPlus);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- p->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(_plugins, Plugin::LanguageCPlusPlus, p);
//
// Give precedence to header-ext global metadata.
diff --git a/cpp/src/slice2cs/.depend b/cpp/src/slice2cs/.depend
index dd91d15..0008a96 100644
--- a/cpp/src/slice2cs/.depend
+++ b/cpp/src/slice2cs/.depend
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/StringUtil.h Gen.h $(includedir)/Slice/CsUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/UUID.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/DotNetNames.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Util.h
+Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/StringUtil.h Gen.h $(includedir)/Slice/CsUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/UUID.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/DotNetNames.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h
Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Parser.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/OutputUtil.h Gen.h $(includedir)/Slice/CsUtil.h
diff --git a/cpp/src/slice2cs/.depend.mak b/cpp/src/slice2cs/.depend.mak
index fe1111b..dcba7a6 100644
--- a/cpp/src/slice2cs/.depend.mak
+++ b/cpp/src/slice2cs/.depend.mak
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/StringUtil.h" Gen.h "$(includedir)/Slice/CsUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/IceUtil/UUID.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/DotNetNames.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Util.h"
+Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/StringUtil.h" Gen.h "$(includedir)/Slice/CsUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/IceUtil/UUID.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/DotNetNames.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h"
Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/OutputUtil.h" Gen.h "$(includedir)/Slice/CsUtil.h"
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 8b32da4..228f540 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -10,7 +10,6 @@
#include <IceUtil/DisableWarnings.h>
#include <IceUtil/Functional.h>
#include <IceUtil/StringUtil.h>
-#include <IceUtil/DynamicLibrary.h>
#include <Gen.h>
#include <limits>
#include <sys/stat.h>
@@ -1962,31 +1961,7 @@ Slice::Gen::generate(const UnitPtr& p)
{
CsGenerator::validateMetaData(p);
- for(vector<string>::const_iterator plugin = _plugins.begin(); plugin != _plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageCs);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- p->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(_plugins, Plugin::LanguageCs, p);
UnitVisitor unitVisitor(_out);
p->visit(&unitVisitor, false);
diff --git a/cpp/src/slice2freeze/.depend b/cpp/src/slice2freeze/.depend
index 44cc355..597ca65 100644
--- a/cpp/src/slice2freeze/.depend
+++ b/cpp/src/slice2freeze/.depend
@@ -1 +1 @@
-Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/CPlusPlusUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/StringUtil.h
+Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/CPlusPlusUtil.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h $(includedir)/IceUtil/StringUtil.h
diff --git a/cpp/src/slice2freeze/.depend.mak b/cpp/src/slice2freeze/.depend.mak
index f2aa1fe..f5614fb 100644
--- a/cpp/src/slice2freeze/.depend.mak
+++ b/cpp/src/slice2freeze/.depend.mak
@@ -1 +1 @@
-Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/CPlusPlusUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/StringUtil.h"
+Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/CPlusPlusUtil.h" "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h" "$(includedir)/IceUtil/StringUtil.h"
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index d17ff08..c42c791 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -12,7 +12,6 @@
#include <IceUtil/CtrlCHandler.h>
#include <IceUtil/Mutex.h>
#include <IceUtil/MutexPtrLock.h>
-#include <IceUtil/DynamicLibrary.h>
#include <Slice/Preprocessor.h>
#include <Slice/CPlusPlusUtil.h>
#include <Slice/FileTracker.h>
@@ -1388,31 +1387,7 @@ gen(const string& name, const UnitPtr& u, const vector<string>& includePaths, co
fileC = output + '/' + fileC;
}
- for(vector<string>::const_iterator plugin = plugins.begin(); plugin != plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageCPlusPlus);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- u->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(plugins, Plugin::LanguageCPlusPlus, u);
u->mergeModules();
u->sort();
diff --git a/cpp/src/slice2freezej/.depend b/cpp/src/slice2freezej/.depend
index 12cff0d..3c5ad97 100644
--- a/cpp/src/slice2freezej/.depend
+++ b/cpp/src/slice2freezej/.depend
@@ -1 +1 @@
-Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/StringUtil.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Parser.h $(includedir)/Slice/JavaUtil.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Util.h
+Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/StringUtil.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Parser.h $(includedir)/Slice/JavaUtil.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h
diff --git a/cpp/src/slice2freezej/.depend.mak b/cpp/src/slice2freezej/.depend.mak
index bd1eb4f..b152882 100644
--- a/cpp/src/slice2freezej/.depend.mak
+++ b/cpp/src/slice2freezej/.depend.mak
@@ -1 +1 @@
-Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/StringUtil.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Util.h"
+Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/StringUtil.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h"
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index 4b84db7..e1e986e 100644
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -12,7 +12,6 @@
#include <IceUtil/CtrlCHandler.h>
#include <IceUtil/Mutex.h>
#include <IceUtil/MutexPtrLock.h>
-#include <IceUtil/DynamicLibrary.h>
#include <Slice/Preprocessor.h>
#include <Slice/FileTracker.h>
#include <Slice/JavaUtil.h>
@@ -265,31 +264,7 @@ FreezeGenerator::objectToVar(const TypePtr& type, const string& param)
void
FreezeGenerator::generate(UnitPtr& u, const Dict& dict)
{
- for(vector<string>::const_iterator plugin = _plugins.begin(); plugin != _plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageJava);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- u->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(_plugins, Plugin::LanguageJava, u);
//
// The dictionary name may include a package.
diff --git a/cpp/src/slice2java/.depend b/cpp/src/slice2java/.depend
index 5d3f6f9..0852473 100644
--- a/cpp/src/slice2java/.depend
+++ b/cpp/src/slice2java/.depend
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Slice/JavaUtil.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/StringUtil.h
+Gen$(OBJEXT): Gen.cpp $(includedir)/IceUtil/DisableWarnings.h Gen.h $(includedir)/Slice/Parser.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Slice/JavaUtil.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Iterator.h $(includedir)/IceUtil/StringUtil.h
Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/Parser.h $(includedir)/Slice/Util.h $(includedir)/IceUtil/OutputUtil.h Gen.h $(includedir)/Slice/JavaUtil.h $(includedir)/Slice/Checksum.h
diff --git a/cpp/src/slice2java/.depend.mak b/cpp/src/slice2java/.depend.mak
index 8075a27..7769854 100644
--- a/cpp/src/slice2java/.depend.mak
+++ b/cpp/src/slice2java/.depend.mak
@@ -1,2 +1,2 @@
-Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" Gen.h "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/IceUtil/StringUtil.h"
+Gen$(OBJEXT): Gen.cpp "$(includedir)/IceUtil/DisableWarnings.h" Gen.h "$(includedir)/Slice/Parser.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Slice/JavaUtil.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Iterator.h" "$(includedir)/IceUtil/StringUtil.h"
Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/Util.h" "$(includedir)/IceUtil/OutputUtil.h" Gen.h "$(includedir)/Slice/JavaUtil.h" "$(includedir)/Slice/Checksum.h"
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 7a086de..9e5622f 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -15,7 +15,6 @@
#include <IceUtil/Functional.h>
#include <IceUtil/Iterator.h>
#include <IceUtil/StringUtil.h>
-#include <IceUtil/DynamicLibrary.h>
#include <cstring>
#include <limits>
@@ -1759,31 +1758,7 @@ Slice::Gen::~Gen()
void
Slice::Gen::generate(const UnitPtr& p, bool stream)
{
- for(vector<string>::const_iterator plugin = _plugins.begin(); plugin != _plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguageJava);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- p->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(_plugins, Plugin::LanguageJava, p);
JavaGenerator::validateMetaData(p);
diff --git a/cpp/src/slice2php/.depend b/cpp/src/slice2php/.depend
index 73ef4e4..0f44e9c 100644
--- a/cpp/src/slice2php/.depend
+++ b/cpp/src/slice2php/.depend
@@ -1 +1 @@
-Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/IceUtil.h $(includedir)/IceUtil/AbstractMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Cache.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/CountDownLatch.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/IceUtil/RWRecMutex.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/UUID.h $(includedir)/IceUtil/Unicode.h $(includedir)/IceUtil/InputUtil.h $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/IceUtil/StringUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Parser.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/PHPUtil.h $(includedir)/Slice/Util.h
+Main$(OBJEXT): Main.cpp $(includedir)/IceUtil/DisableWarnings.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/Config.h $(includedir)/IceUtil/Exception.h $(includedir)/IceUtil/IceUtil.h $(includedir)/IceUtil/AbstractMutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/Cache.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/IceUtil/CountDownLatch.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Functional.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/IceUtil/RWRecMutex.h $(includedir)/IceUtil/Thread.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/UUID.h $(includedir)/IceUtil/Unicode.h $(includedir)/IceUtil/InputUtil.h $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/OutputUtil.h $(includedir)/IceUtil/StringUtil.h $(includedir)/Slice/Checksum.h $(includedir)/Slice/Parser.h $(includedir)/Slice/Preprocessor.h $(includedir)/Slice/FileTracker.h $(includedir)/Slice/PHPUtil.h $(includedir)/Slice/Util.h $(includedir)/Slice/Plugin.h
diff --git a/cpp/src/slice2php/.depend.mak b/cpp/src/slice2php/.depend.mak
index 3f8a55f..ef1ea53 100644
--- a/cpp/src/slice2php/.depend.mak
+++ b/cpp/src/slice2php/.depend.mak
@@ -1 +1 @@
-Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/IceUtil.h" "$(includedir)/IceUtil/AbstractMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/Cache.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/CountDownLatch.h" "$(includedir)/IceUtil/Cond.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Monitor.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/IceUtil/RWRecMutex.h" "$(includedir)/IceUtil/Thread.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/StaticMutex.h" "$(includedir)/IceUtil/Timer.h" "$(includedir)/IceUtil/UUID.h" "$(includedir)/IceUtil/Unicode.h" "$(includedir)/IceUtil/InputUtil.h" "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/IceUtil/StringUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/PHPUtil.h" "$(includedir)/Slice/Util.h"
+Main$(OBJEXT): Main.cpp "$(includedir)/IceUtil/DisableWarnings.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/IceUtil/IceUtil.h" "$(includedir)/IceUtil/AbstractMutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/Cache.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/IceUtil/CountDownLatch.h" "$(includedir)/IceUtil/Cond.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/IceUtil/Monitor.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/IceUtil/RWRecMutex.h" "$(includedir)/IceUtil/Thread.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/StaticMutex.h" "$(includedir)/IceUtil/Timer.h" "$(includedir)/IceUtil/UUID.h" "$(includedir)/IceUtil/Unicode.h" "$(includedir)/IceUtil/InputUtil.h" "$(includedir)/IceUtil/Options.h" "$(includedir)/IceUtil/OutputUtil.h" "$(includedir)/IceUtil/StringUtil.h" "$(includedir)/Slice/Checksum.h" "$(includedir)/Slice/Parser.h" "$(includedir)/Slice/Preprocessor.h" "$(includedir)/Slice/FileTracker.h" "$(includedir)/Slice/PHPUtil.h" "$(includedir)/Slice/Util.h" "$(includedir)/Slice/Plugin.h"
diff --git a/cpp/src/slice2php/Main.cpp b/cpp/src/slice2php/Main.cpp
index ae828c1..134a61f 100644
--- a/cpp/src/slice2php/Main.cpp
+++ b/cpp/src/slice2php/Main.cpp
@@ -16,7 +16,6 @@
#include <IceUtil/StringUtil.h>
#include <IceUtil/Mutex.h>
#include <IceUtil/MutexPtrLock.h>
-#include <IceUtil/DynamicLibrary.h>
#include <Slice/Checksum.h>
#include <Slice/Preprocessor.h>
#include <Slice/FileTracker.h>
@@ -1398,31 +1397,7 @@ generate(const UnitPtr& un, bool all, bool checksum, bool ns,
Output& out,
const vector<string>& plugins)
{
- for(vector<string>::const_iterator plugin = plugins.begin(); plugin != plugins.end(); plugin++)
- {
- IceUtil::DynamicLibraryPtr library = new IceUtil::DynamicLibrary();
- IceUtil::DynamicLibrary::symbol_type sym = library->loadEntryPoint(*plugin, false);
- if(sym == 0)
- {
- string msg = library->getErrorMessage();
- cerr << "Unable to find " << *plugin << " = " << msg << endl;
- continue;
- }
-
- Plugin::VisitorList* pluginVisitors;
- Plugin::FACTORY factory = (Plugin::FACTORY) sym;
- pluginVisitors = factory(Plugin::LanguagePHP);
-
- if(pluginVisitors)
- {
- for(Plugin::VisitorList::const_iterator it = pluginVisitors->begin(); it != pluginVisitors->end(); it++)
- {
- un->visit(*it, true);
- delete *it;
- }
- delete pluginVisitors;
- }
- }
+ Plugin::applyPluginsToUnit(plugins, Plugin::LanguagePHP, un);
if(!all)
{
-----------------------------------------------------------------------
--
asterisk-scf/release/ice.git
More information about the asterisk-scf-commits
mailing list