diff options
author | Marc Laukien <marc@zeroc.com> | 2001-08-17 10:48:40 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-08-17 10:48:40 +0000 |
commit | 7c2da94d4a0fe61628d9335534b661db28106dc0 (patch) | |
tree | c13e87943f2e1df80d19ed52e9762a6cd12f8f6c /cpp/src | |
parent | fix (diff) | |
download | ice-7c2da94d4a0fe61628d9335534b661db28106dc0.tar.bz2 ice-7c2da94d4a0fe61628d9335534b661db28106dc0.tar.xz ice-7c2da94d4a0fe61628d9335534b661db28106dc0.zip |
restructuring
Diffstat (limited to 'cpp/src')
23 files changed, 700 insertions, 1430 deletions
diff --git a/cpp/src/IcePack/.depend b/cpp/src/IcePack/.depend index be209f9bb99..e69de29bb2d 100644 --- a/cpp/src/IcePack/.depend +++ b/cpp/src/IcePack/.depend @@ -1,5 +0,0 @@ -Admin.o: Admin.cpp ../../include/IcePack/Admin.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Native.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Shared.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/Ice/Stream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Incoming.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/LocalObject.h ../../include/Ice/LocalException.h -Client.o: Client.cpp ../../include/Ice/Ice.h ../../include/Ice/Communicator.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Native.h ../../include/Ice/LocalObject.h ../../include/Ice/Shared.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/PicklerF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ValueFactoryF.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/ValueFactory.h ../../include/Ice/Pickler.h ../../include/Ice/Initialize.h AdminI.h ../../include/IcePack/Admin.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/Ice/Stream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Incoming.h Forward.h -Server.o: Server.cpp ../../include/Ice/Ice.h ../../include/Ice/Communicator.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Native.h ../../include/Ice/LocalObject.h ../../include/Ice/Shared.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/PicklerF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ValueFactoryF.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/ValueFactory.h ../../include/Ice/Pickler.h ../../include/Ice/Initialize.h AdminI.h ../../include/IcePack/Admin.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/Ice/Stream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Incoming.h Forward.h -Forward.o: Forward.cpp ../../include/Ice/Ice.h ../../include/Ice/Communicator.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Native.h ../../include/Ice/LocalObject.h ../../include/Ice/Shared.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/PicklerF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ValueFactoryF.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/ValueFactory.h ../../include/Ice/Pickler.h ../../include/Ice/Initialize.h Forward.h ../../include/IcePack/Admin.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/Ice/Stream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Incoming.h -AdminI.o: AdminI.cpp ../../include/Ice/Ice.h ../../include/Ice/Communicator.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Native.h ../../include/Ice/LocalObject.h ../../include/Ice/Shared.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/PicklerF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ValueFactoryF.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/ValueFactory.h ../../include/Ice/Pickler.h ../../include/Ice/Initialize.h AdminI.h ../../include/IcePack/Admin.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/Ice/Stream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Incoming.h diff --git a/cpp/src/IcePack/Admin.cpp b/cpp/src/IcePack/Admin.cpp index 4b794db3392..01f83491138 100644 --- a/cpp/src/IcePack/Admin.cpp +++ b/cpp/src/IcePack/Admin.cpp @@ -1,616 +1,616 @@ -// **********************************************************************
-//
-// Copyright (c) 2001
-// MutableRealms, Inc.
-// Huntsville, AL, USA
-//
-// All Rights Reserved
-//
-// **********************************************************************
-
-// Generated from file `Admin.ice'
-// Ice version 0.0.1
-
-#include <IcePack/Admin.h>
-
-#ifndef ICE_IGNORE_VERSION
-# if ICE_INT_VERSION != 0x1
-# error Ice version mismatch!
-# endif
-#endif
-
-void IceInternal::incRef(::IcePack::ServerDescription* p) { p->__incRef(); }
-void IceInternal::decRef(::IcePack::ServerDescription* p) { p->__decRef(); }
-
-void IceInternal::incRef(::IceProxy::IcePack::ServerDescription* p) { p->__incRef(); }
-void IceInternal::decRef(::IceProxy::IcePack::ServerDescription* p) { p->__decRef(); }
-
-void IceInternal::checkedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::ServerDescription*& d)
-{
- d = dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(b);
- if (!d && b->_isA("::IcePack::ServerDescription"))
- {
- d = new ::IceProxy::IcePack::ServerDescription;
- b->__copyTo(d);
- }
-}
-
-void IceInternal::uncheckedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::ServerDescription*& d)
-{
- d = dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(b);
- if (!d)
- {
- d = new ::IceProxy::IcePack::ServerDescription;
- b->__copyTo(d);
- }
-}
-
-void IceInternal::incRef(::IcePack::Admin* p) { p->__incRef(); }
-void IceInternal::decRef(::IcePack::Admin* p) { p->__decRef(); }
-
-void IceInternal::incRef(::IceProxy::IcePack::Admin* p) { p->__incRef(); }
-void IceInternal::decRef(::IceProxy::IcePack::Admin* p) { p->__decRef(); }
-
-void IceInternal::checkedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::Admin*& d)
-{
- d = dynamic_cast< ::IceProxy::IcePack::Admin*>(b);
- if (!d && b->_isA("::IcePack::Admin"))
- {
- d = new ::IceProxy::IcePack::Admin;
- b->__copyTo(d);
- }
-}
-
-void IceInternal::uncheckedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::Admin*& d)
-{
- d = dynamic_cast< ::IceProxy::IcePack::Admin*>(b);
- if (!d)
- {
- d = new ::IceProxy::IcePack::Admin;
- b->__copyTo(d);
- }
-}
-
-void
-IcePack::__write(::IceInternal::Stream* __os, const ::IcePack::ServerDescriptionPrx& v)
-{
- __os->write(::Ice::ObjectPrx(v));
-}
-
-void
-IcePack::__read(::IceInternal::Stream* __is, ::IcePack::ServerDescriptionPrx& v)
-{
- ::Ice::ObjectPrx proxy;
- __is->read(proxy);
- if (!proxy)
- {
- v = 0;
- }
- else
- {
- v = new ::IceProxy::IcePack::ServerDescription;
- proxy->__copyTo(v.get());
- }
-}
-
-void
-IcePack::__write(::IceInternal::Stream* __os, const ::IcePack::AdminPrx& v)
-{
- __os->write(::Ice::ObjectPrx(v));
-}
-
-void
-IcePack::__read(::IceInternal::Stream* __is, ::IcePack::AdminPrx& v)
-{
- ::Ice::ObjectPrx proxy;
- __is->read(proxy);
- if (!proxy)
- {
- v = 0;
- }
- else
- {
- v = new ::IceProxy::IcePack::Admin;
- proxy->__copyTo(v.get());
- }
-}
-
-void
-IceProxy::IcePack::ServerDescription::_throw()
-{
- throw ::IcePack::ServerDescriptionPrxE(this);
-}
-
-::IceInternal::Handle< ::IceDelegateM::Ice::Object>
-IceProxy::IcePack::ServerDescription::__createDelegateM()
-{
- return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::IcePack::ServerDescription);
-}
-
-void
-IceProxy::IcePack::Admin::_throw()
-{
- throw ::IcePack::AdminPrxE(this);
-}
-
-void
-IceProxy::IcePack::Admin::add(const ::IcePack::ServerDescriptionPtr& description)
-{
- int __cnt = 0;
- while (true)
- {
- ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();
- ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get());
- try
- {
- __del->add(description);
- return;
- }
- catch (const ::Ice::LocationForward& __ex)
- {
- __locationForward(__ex);
- }
- catch (const ::IceInternal::NonRepeatable& __ex)
- {
- __ex.raise();
- }
- catch (const ::Ice::LocalException& __ex)
- {
- __handleException(__ex, __cnt);
- }
- }
-}
-
-void
-IceProxy::IcePack::Admin::remove(const ::Ice::ObjectPrx& object)
-{
- int __cnt = 0;
- while (true)
- {
- ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();
- ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get());
- try
- {
- __del->remove(object);
- return;
- }
- catch (const ::Ice::LocationForward& __ex)
- {
- __locationForward(__ex);
- }
- catch (const ::IceInternal::NonRepeatable& __ex)
- {
- __ex.raise();
- }
- catch (const ::Ice::LocalException& __ex)
- {
- __handleException(__ex, __cnt);
- }
- }
-}
-
-::IcePack::ServerDescriptionPtr
-IceProxy::IcePack::Admin::find(const ::Ice::ObjectPrx& object)
-{
- int __cnt = 0;
- while (true)
- {
- ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();
- ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get());
- try
- {
- return __del->find(object);
- }
- catch (const ::Ice::LocationForward& __ex)
- {
- __locationForward(__ex);
- }
- catch (const ::IceInternal::NonRepeatable& __ex)
- {
- __ex.raise();
- }
- catch (const ::Ice::LocalException& __ex)
- {
- __handleException(__ex, __cnt);
- }
- }
-}
-
-void
-IceProxy::IcePack::Admin::shutdown()
-{
- int __cnt = 0;
- while (true)
- {
- ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate();
- ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get());
- try
- {
- __del->shutdown();
- return;
- }
- catch (const ::Ice::LocationForward& __ex)
- {
- __locationForward(__ex);
- }
- catch (const ::IceInternal::NonRepeatable& __ex)
- {
- __ex.raise();
- }
- catch (const ::Ice::LocalException& __ex)
- {
- __handleException(__ex, __cnt);
- }
- }
-}
-
-::IceInternal::Handle< ::IceDelegateM::Ice::Object>
-IceProxy::IcePack::Admin::__createDelegateM()
-{
- return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::IcePack::Admin);
-}
-
-void
-IceDelegateM::IcePack::Admin::add(const ::IcePack::ServerDescriptionPtr& description)
-{
- ::IceInternal::Outgoing __out(__emitter(), __reference());
- ::IceInternal::Stream* __os = __out.os();
- __os->write("add");
- {
- ::Ice::ObjectPtr __obj = description;
- __os->write(__obj);
- }
- if (!__out.invoke())
- {
- throw ::Ice::UnknownUserException(__FILE__, __LINE__);
- }
-}
-
-void
-IceDelegateM::IcePack::Admin::remove(const ::Ice::ObjectPrx& object)
-{
- ::IceInternal::Outgoing __out(__emitter(), __reference());
- ::IceInternal::Stream* __os = __out.os();
- __os->write("remove");
- __os->write(object);
- if (!__out.invoke())
- {
- throw ::Ice::UnknownUserException(__FILE__, __LINE__);
- }
-}
-
-::IcePack::ServerDescriptionPtr
-IceDelegateM::IcePack::Admin::find(const ::Ice::ObjectPrx& object)
-{
- ::IceInternal::Outgoing __out(__emitter(), __reference());
- ::IceInternal::Stream* __is = __out.is();
- ::IceInternal::Stream* __os = __out.os();
- __os->write("find");
- __os->write(object);
- if (!__out.invoke())
- {
- throw ::Ice::UnknownUserException(__FILE__, __LINE__);
- }
- ::IcePack::ServerDescriptionPtr __ret;
- {
- ::Ice::ObjectPtr __obj;
- __is->read(__obj, ::IcePack::ServerDescription::__classIds[0]);
- if (!__obj)
- {
- __obj = new ::IcePack::ServerDescription;
- __obj->__read(__is);
- }
- __ret = ::IcePack::ServerDescriptionPtr::dynamicCast(__obj);
- if (!__ret)
- {
- throw ::Ice::ValueUnmarshalException(__FILE__, __LINE__);
- }
- }
- return __ret;
-}
-
-void
-IceDelegateM::IcePack::Admin::shutdown()
-{
- ::IceInternal::Outgoing __out(__emitter(), __reference());
- ::IceInternal::Stream* __os = __out.os();
- __os->write("shutdown");
- if (!__out.invoke())
- {
- throw ::Ice::UnknownUserException(__FILE__, __LINE__);
- }
-}
-
-IcePack::ServerDescriptionPtrE::ServerDescriptionPtrE(const ServerDescriptionPtrE& p)
-{
- _ptr = p._ptr;
-}
-
-IcePack::ServerDescriptionPtrE::ServerDescriptionPtrE(const ::IcePack::ServerDescriptionPtr& p)
-{
- _ptr = p;
-}
-
-IcePack::ServerDescriptionPtrE::operator ::IcePack::ServerDescriptionPtr() const
-{
- return ::IcePack::ServerDescriptionPtr(dynamic_cast< ::IcePack::ServerDescription*>(_ptr.get()));
-}
-
-::IcePack::ServerDescription*
-IcePack::ServerDescriptionPtrE::operator->() const
-{
- return dynamic_cast< ::IcePack::ServerDescription*>(_ptr.get());
-}
-
-IcePack::ServerDescriptionPrxE::ServerDescriptionPrxE(const ServerDescriptionPrxE& p)
-{
- _prx = p._prx;
-}
-
-IcePack::ServerDescriptionPrxE::ServerDescriptionPrxE(const ::IcePack::ServerDescriptionPrx& p)
-{
- _prx = p;
-}
-
-IcePack::ServerDescriptionPrxE::operator ::IcePack::ServerDescriptionPrx() const
-{
- return ::IcePack::ServerDescriptionPrx(dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(_prx.get()));
-}
-
-::IceProxy::IcePack::ServerDescription*
-IcePack::ServerDescriptionPrxE::operator->() const
-{
- return dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(_prx.get());
-}
-
-void
-IcePack::ServerDescription::_throw()
-{
- throw ::IcePack::ServerDescriptionPtrE(this);
-}
-
-std::string IcePack::ServerDescription::__ids[2] =
-{
- "::Ice::Object",
- "::IcePack::ServerDescription"
-};
-
-std::string IcePack::ServerDescription::__classIds[2] =
-{
- "::IcePack::ServerDescription",
- "::Ice::Object"
-};
-
-bool
-IcePack::ServerDescription::_isA(const std::string& s)
-{
- std::string* b = __ids;
- std::string* e = __ids + 2;
- std::pair<std::string*, std::string*> r = std::equal_range(b, e, s);
- return r.first != r.second;
-}
-
-const std::string*
-IcePack::ServerDescription::_classIds()
-{
- return __classIds;
-}
-
-void
-IcePack::ServerDescription::__write(::IceInternal::Stream* __os)
-{
- __os->startWriteEncaps();
- __os->write(object);
- __os->write(regex);
- __os->write(host);
- __os->write(path);
- __os->endWriteEncaps();
-}
-
-void
-IcePack::ServerDescription::__read(::IceInternal::Stream* __is)
-{
- __is->startReadEncaps();
- __is->read(object);
- __is->read(regex);
- __is->read(host);
- __is->read(path);
- __is->endReadEncaps();
-}
-
-IcePack::AdminPtrE::AdminPtrE(const AdminPtrE& p)
-{
- _ptr = p._ptr;
-}
-
-IcePack::AdminPtrE::AdminPtrE(const ::IcePack::AdminPtr& p)
-{
- _ptr = p;
-}
-
-IcePack::AdminPtrE::operator ::IcePack::AdminPtr() const
-{
- return ::IcePack::AdminPtr(dynamic_cast< ::IcePack::Admin*>(_ptr.get()));
-}
-
-::IcePack::Admin*
-IcePack::AdminPtrE::operator->() const
-{
- return dynamic_cast< ::IcePack::Admin*>(_ptr.get());
-}
-
-IcePack::AdminPrxE::AdminPrxE(const AdminPrxE& p)
-{
- _prx = p._prx;
-}
-
-IcePack::AdminPrxE::AdminPrxE(const ::IcePack::AdminPrx& p)
-{
- _prx = p;
-}
-
-IcePack::AdminPrxE::operator ::IcePack::AdminPrx() const
-{
- return ::IcePack::AdminPrx(dynamic_cast< ::IceProxy::IcePack::Admin*>(_prx.get()));
-}
-
-::IceProxy::IcePack::Admin*
-IcePack::AdminPrxE::operator->() const
-{
- return dynamic_cast< ::IceProxy::IcePack::Admin*>(_prx.get());
-}
-
-void
-IcePack::Admin::_throw()
-{
- throw ::IcePack::AdminPtrE(this);
-}
-
-std::string IcePack::Admin::__ids[2] =
-{
- "::Ice::Object",
- "::IcePack::Admin"
-};
-
-std::string IcePack::Admin::__classIds[2] =
-{
- "::IcePack::Admin",
- "::Ice::Object"
-};
-
-bool
-IcePack::Admin::_isA(const std::string& s)
-{
- std::string* b = __ids;
- std::string* e = __ids + 2;
- std::pair<std::string*, std::string*> r = std::equal_range(b, e, s);
- return r.first != r.second;
-}
-
-const std::string*
-IcePack::Admin::_classIds()
-{
- return __classIds;
-}
-
-::IceInternal::DispatchStatus
-IcePack::Admin::___add(::IceInternal::Incoming& __in)
-{
- ::IceInternal::Stream* __is = __in.is();
- ::IcePack::ServerDescriptionPtr description;
- {
- ::Ice::ObjectPtr __obj;
- __is->read(__obj, ::IcePack::ServerDescription::__classIds[0]);
- if (!__obj)
- {
- __obj = new ::IcePack::ServerDescription;
- __obj->__read(__is);
- }
- description = ::IcePack::ServerDescriptionPtr::dynamicCast(__obj);
- if (!description)
- {
- throw ::Ice::ValueUnmarshalException(__FILE__, __LINE__);
- }
- }
- add(description);
- return ::IceInternal::DispatchOK;
-}
-
-::IceInternal::DispatchStatus
-IcePack::Admin::___remove(::IceInternal::Incoming& __in)
-{
- ::IceInternal::Stream* __is = __in.is();
- ::Ice::ObjectPrx object;
- __is->read(object);
- remove(object);
- return ::IceInternal::DispatchOK;
-}
-
-::IceInternal::DispatchStatus
-IcePack::Admin::___find(::IceInternal::Incoming& __in)
-{
- ::IceInternal::Stream* __is = __in.is();
- ::IceInternal::Stream* __os = __in.os();
- ::Ice::ObjectPrx object;
- __is->read(object);
- ::IcePack::ServerDescriptionPtr __ret = find(object);
- {
- ::Ice::ObjectPtr __obj = __ret;
- __os->write(__obj);
- }
- return ::IceInternal::DispatchOK;
-}
-
-::IceInternal::DispatchStatus
-IcePack::Admin::___shutdown(::IceInternal::Incoming& __in)
-{
- shutdown();
- return ::IceInternal::DispatchOK;
-}
-
-std::string IcePack::Admin::__names[6] =
-{
- "_isA",
- "_ping",
- "add",
- "find",
- "remove",
- "shutdown"
-};
-
-::IceInternal::DispatchStatus
-IcePack::Admin::__dispatch(::IceInternal::Incoming& in, const std::string& s)
-{
- std::string* b = __names;
- std::string* e = __names + 6;
- std::pair<std::string*, std::string*> r = std::equal_range(b, e, s);
- if (r.first == r.second)
- {
- return ::IceInternal::DispatchOperationNotExist;
- }
-
- switch (r.first - __names)
- {
- case 0:
- {
- return ____isA(in);
- }
- case 1:
- {
- return ____ping(in);
- }
- case 2:
- {
- return ___add(in);
- }
- case 3:
- {
- return ___find(in);
- }
- case 4:
- {
- return ___remove(in);
- }
- case 5:
- {
- return ___shutdown(in);
- }
- }
-
- assert(false);
- return ::IceInternal::DispatchOperationNotExist;
-}
-
-void
-IcePack::Admin::__write(::IceInternal::Stream* __os)
-{
- __os->startWriteEncaps();
- __os->endWriteEncaps();
-}
-
-void
-IcePack::Admin::__read(::IceInternal::Stream* __is)
-{
- __is->startReadEncaps();
- __is->endReadEncaps();
-}
+// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +// Generated from file `Admin.ice' +// Ice version 0.0.1 + +#include <IcePack/Admin.h> + +#ifndef ICE_IGNORE_VERSION +# if ICE_INT_VERSION != 0x1 +# error Ice version mismatch! +# endif +#endif + +void IceInternal::incRef(::IcePack::ServerDescription* p) { p->__incRef(); } +void IceInternal::decRef(::IcePack::ServerDescription* p) { p->__decRef(); } + +void IceInternal::incRef(::IceProxy::IcePack::ServerDescription* p) { p->__incRef(); } +void IceInternal::decRef(::IceProxy::IcePack::ServerDescription* p) { p->__decRef(); } + +void IceInternal::checkedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::ServerDescription*& d) +{ + d = dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(b); + if (!d && b->_isA("::IcePack::ServerDescription")) + { + d = new ::IceProxy::IcePack::ServerDescription; + b->__copyTo(d); + } +} + +void IceInternal::uncheckedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::ServerDescription*& d) +{ + d = dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(b); + if (!d) + { + d = new ::IceProxy::IcePack::ServerDescription; + b->__copyTo(d); + } +} + +void IceInternal::incRef(::IcePack::Admin* p) { p->__incRef(); } +void IceInternal::decRef(::IcePack::Admin* p) { p->__decRef(); } + +void IceInternal::incRef(::IceProxy::IcePack::Admin* p) { p->__incRef(); } +void IceInternal::decRef(::IceProxy::IcePack::Admin* p) { p->__decRef(); } + +void IceInternal::checkedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::Admin*& d) +{ + d = dynamic_cast< ::IceProxy::IcePack::Admin*>(b); + if (!d && b->_isA("::IcePack::Admin")) + { + d = new ::IceProxy::IcePack::Admin; + b->__copyTo(d); + } +} + +void IceInternal::uncheckedCast(::IceProxy::Ice::Object* b, ::IceProxy::IcePack::Admin*& d) +{ + d = dynamic_cast< ::IceProxy::IcePack::Admin*>(b); + if (!d) + { + d = new ::IceProxy::IcePack::Admin; + b->__copyTo(d); + } +} + +void +IcePack::__write(::IceInternal::Stream* __os, const ::IcePack::ServerDescriptionPrx& v) +{ + __os->write(::Ice::ObjectPrx(v)); +} + +void +IcePack::__read(::IceInternal::Stream* __is, ::IcePack::ServerDescriptionPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if (!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::IcePack::ServerDescription; + proxy->__copyTo(v.get()); + } +} + +void +IcePack::__write(::IceInternal::Stream* __os, const ::IcePack::AdminPrx& v) +{ + __os->write(::Ice::ObjectPrx(v)); +} + +void +IcePack::__read(::IceInternal::Stream* __is, ::IcePack::AdminPrx& v) +{ + ::Ice::ObjectPrx proxy; + __is->read(proxy); + if (!proxy) + { + v = 0; + } + else + { + v = new ::IceProxy::IcePack::Admin; + proxy->__copyTo(v.get()); + } +} + +void +IceProxy::IcePack::ServerDescription::_throw() +{ + throw ::IcePack::ServerDescriptionPrxE(this); +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::IcePack::ServerDescription::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::IcePack::ServerDescription); +} + +void +IceProxy::IcePack::Admin::_throw() +{ + throw ::IcePack::AdminPrxE(this); +} + +void +IceProxy::IcePack::Admin::add(const ::IcePack::ServerDescriptionPtr& description) +{ + int __cnt = 0; + while (true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate(); + ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get()); + try + { + __del->add(description); + return; + } + catch (const ::Ice::LocationForward& __ex) + { + __locationForward(__ex); + } + catch (const ::IceInternal::NonRepeatable& __ex) + { + __ex.raise(); + } + catch (const ::Ice::LocalException& __ex) + { + __handleException(__ex, __cnt); + } + } +} + +void +IceProxy::IcePack::Admin::remove(const ::Ice::ObjectPrx& object) +{ + int __cnt = 0; + while (true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate(); + ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get()); + try + { + __del->remove(object); + return; + } + catch (const ::Ice::LocationForward& __ex) + { + __locationForward(__ex); + } + catch (const ::IceInternal::NonRepeatable& __ex) + { + __ex.raise(); + } + catch (const ::Ice::LocalException& __ex) + { + __handleException(__ex, __cnt); + } + } +} + +::IcePack::ServerDescriptionPtr +IceProxy::IcePack::Admin::find(const ::Ice::ObjectPrx& object) +{ + int __cnt = 0; + while (true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate(); + ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get()); + try + { + return __del->find(object); + } + catch (const ::Ice::LocationForward& __ex) + { + __locationForward(__ex); + } + catch (const ::IceInternal::NonRepeatable& __ex) + { + __ex.raise(); + } + catch (const ::Ice::LocalException& __ex) + { + __handleException(__ex, __cnt); + } + } +} + +void +IceProxy::IcePack::Admin::shutdown() +{ + int __cnt = 0; + while (true) + { + ::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase = __getDelegate(); + ::IceDelegate::IcePack::Admin* __del = dynamic_cast< ::IceDelegate::IcePack::Admin*>(__delBase.get()); + try + { + __del->shutdown(); + return; + } + catch (const ::Ice::LocationForward& __ex) + { + __locationForward(__ex); + } + catch (const ::IceInternal::NonRepeatable& __ex) + { + __ex.raise(); + } + catch (const ::Ice::LocalException& __ex) + { + __handleException(__ex, __cnt); + } + } +} + +::IceInternal::Handle< ::IceDelegateM::Ice::Object> +IceProxy::IcePack::Admin::__createDelegateM() +{ + return ::IceInternal::Handle< ::IceDelegateM::Ice::Object>(new ::IceDelegateM::IcePack::Admin); +} + +void +IceDelegateM::IcePack::Admin::add(const ::IcePack::ServerDescriptionPtr& description) +{ + ::IceInternal::Outgoing __out(__emitter(), __reference()); + ::IceInternal::Stream* __os = __out.os(); + __os->write("add"); + { + ::Ice::ObjectPtr __obj = description; + __os->write(__obj); + } + if (!__out.invoke()) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } +} + +void +IceDelegateM::IcePack::Admin::remove(const ::Ice::ObjectPrx& object) +{ + ::IceInternal::Outgoing __out(__emitter(), __reference()); + ::IceInternal::Stream* __os = __out.os(); + __os->write("remove"); + __os->write(object); + if (!__out.invoke()) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } +} + +::IcePack::ServerDescriptionPtr +IceDelegateM::IcePack::Admin::find(const ::Ice::ObjectPrx& object) +{ + ::IceInternal::Outgoing __out(__emitter(), __reference()); + ::IceInternal::Stream* __is = __out.is(); + ::IceInternal::Stream* __os = __out.os(); + __os->write("find"); + __os->write(object); + if (!__out.invoke()) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } + ::IcePack::ServerDescriptionPtr __ret; + { + ::Ice::ObjectPtr __obj; + __is->read(__obj, ::IcePack::ServerDescription::__classIds[0]); + if (!__obj) + { + __obj = new ::IcePack::ServerDescription; + __obj->__read(__is); + } + __ret = ::IcePack::ServerDescriptionPtr::dynamicCast(__obj); + if (!__ret) + { + throw ::Ice::ValueUnmarshalException(__FILE__, __LINE__); + } + } + return __ret; +} + +void +IceDelegateM::IcePack::Admin::shutdown() +{ + ::IceInternal::Outgoing __out(__emitter(), __reference()); + ::IceInternal::Stream* __os = __out.os(); + __os->write("shutdown"); + if (!__out.invoke()) + { + throw ::Ice::UnknownUserException(__FILE__, __LINE__); + } +} + +IcePack::ServerDescriptionPtrE::ServerDescriptionPtrE(const ServerDescriptionPtrE& p) +{ + _ptr = p._ptr; +} + +IcePack::ServerDescriptionPtrE::ServerDescriptionPtrE(const ::IcePack::ServerDescriptionPtr& p) +{ + _ptr = p; +} + +IcePack::ServerDescriptionPtrE::operator ::IcePack::ServerDescriptionPtr() const +{ + return ::IcePack::ServerDescriptionPtr(dynamic_cast< ::IcePack::ServerDescription*>(_ptr.get())); +} + +::IcePack::ServerDescription* +IcePack::ServerDescriptionPtrE::operator->() const +{ + return dynamic_cast< ::IcePack::ServerDescription*>(_ptr.get()); +} + +IcePack::ServerDescriptionPrxE::ServerDescriptionPrxE(const ServerDescriptionPrxE& p) +{ + _prx = p._prx; +} + +IcePack::ServerDescriptionPrxE::ServerDescriptionPrxE(const ::IcePack::ServerDescriptionPrx& p) +{ + _prx = p; +} + +IcePack::ServerDescriptionPrxE::operator ::IcePack::ServerDescriptionPrx() const +{ + return ::IcePack::ServerDescriptionPrx(dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(_prx.get())); +} + +::IceProxy::IcePack::ServerDescription* +IcePack::ServerDescriptionPrxE::operator->() const +{ + return dynamic_cast< ::IceProxy::IcePack::ServerDescription*>(_prx.get()); +} + +void +IcePack::ServerDescription::_throw() +{ + throw ::IcePack::ServerDescriptionPtrE(this); +} + +std::string IcePack::ServerDescription::__ids[2] = +{ + "::Ice::Object", + "::IcePack::ServerDescription" +}; + +std::string IcePack::ServerDescription::__classIds[2] = +{ + "::IcePack::ServerDescription", + "::Ice::Object" +}; + +bool +IcePack::ServerDescription::_isA(const std::string& s) +{ + std::string* b = __ids; + std::string* e = __ids + 2; + std::pair<std::string*, std::string*> r = std::equal_range(b, e, s); + return r.first != r.second; +} + +const std::string* +IcePack::ServerDescription::_classIds() +{ + return __classIds; +} + +void +IcePack::ServerDescription::__write(::IceInternal::Stream* __os) +{ + __os->startWriteEncaps(); + __os->write(object); + __os->write(regex); + __os->write(host); + __os->write(path); + __os->endWriteEncaps(); +} + +void +IcePack::ServerDescription::__read(::IceInternal::Stream* __is) +{ + __is->startReadEncaps(); + __is->read(object); + __is->read(regex); + __is->read(host); + __is->read(path); + __is->endReadEncaps(); +} + +IcePack::AdminPtrE::AdminPtrE(const AdminPtrE& p) +{ + _ptr = p._ptr; +} + +IcePack::AdminPtrE::AdminPtrE(const ::IcePack::AdminPtr& p) +{ + _ptr = p; +} + +IcePack::AdminPtrE::operator ::IcePack::AdminPtr() const +{ + return ::IcePack::AdminPtr(dynamic_cast< ::IcePack::Admin*>(_ptr.get())); +} + +::IcePack::Admin* +IcePack::AdminPtrE::operator->() const +{ + return dynamic_cast< ::IcePack::Admin*>(_ptr.get()); +} + +IcePack::AdminPrxE::AdminPrxE(const AdminPrxE& p) +{ + _prx = p._prx; +} + +IcePack::AdminPrxE::AdminPrxE(const ::IcePack::AdminPrx& p) +{ + _prx = p; +} + +IcePack::AdminPrxE::operator ::IcePack::AdminPrx() const +{ + return ::IcePack::AdminPrx(dynamic_cast< ::IceProxy::IcePack::Admin*>(_prx.get())); +} + +::IceProxy::IcePack::Admin* +IcePack::AdminPrxE::operator->() const +{ + return dynamic_cast< ::IceProxy::IcePack::Admin*>(_prx.get()); +} + +void +IcePack::Admin::_throw() +{ + throw ::IcePack::AdminPtrE(this); +} + +std::string IcePack::Admin::__ids[2] = +{ + "::Ice::Object", + "::IcePack::Admin" +}; + +std::string IcePack::Admin::__classIds[2] = +{ + "::IcePack::Admin", + "::Ice::Object" +}; + +bool +IcePack::Admin::_isA(const std::string& s) +{ + std::string* b = __ids; + std::string* e = __ids + 2; + std::pair<std::string*, std::string*> r = std::equal_range(b, e, s); + return r.first != r.second; +} + +const std::string* +IcePack::Admin::_classIds() +{ + return __classIds; +} + +::IceInternal::DispatchStatus +IcePack::Admin::___add(::IceInternal::Incoming& __in) +{ + ::IceInternal::Stream* __is = __in.is(); + ::IcePack::ServerDescriptionPtr description; + { + ::Ice::ObjectPtr __obj; + __is->read(__obj, ::IcePack::ServerDescription::__classIds[0]); + if (!__obj) + { + __obj = new ::IcePack::ServerDescription; + __obj->__read(__is); + } + description = ::IcePack::ServerDescriptionPtr::dynamicCast(__obj); + if (!description) + { + throw ::Ice::ValueUnmarshalException(__FILE__, __LINE__); + } + } + add(description); + return ::IceInternal::DispatchOK; +} + +::IceInternal::DispatchStatus +IcePack::Admin::___remove(::IceInternal::Incoming& __in) +{ + ::IceInternal::Stream* __is = __in.is(); + ::Ice::ObjectPrx object; + __is->read(object); + remove(object); + return ::IceInternal::DispatchOK; +} + +::IceInternal::DispatchStatus +IcePack::Admin::___find(::IceInternal::Incoming& __in) +{ + ::IceInternal::Stream* __is = __in.is(); + ::IceInternal::Stream* __os = __in.os(); + ::Ice::ObjectPrx object; + __is->read(object); + ::IcePack::ServerDescriptionPtr __ret = find(object); + { + ::Ice::ObjectPtr __obj = __ret; + __os->write(__obj); + } + return ::IceInternal::DispatchOK; +} + +::IceInternal::DispatchStatus +IcePack::Admin::___shutdown(::IceInternal::Incoming& __in) +{ + shutdown(); + return ::IceInternal::DispatchOK; +} + +std::string IcePack::Admin::__names[6] = +{ + "_isA", + "_ping", + "add", + "find", + "remove", + "shutdown" +}; + +::IceInternal::DispatchStatus +IcePack::Admin::__dispatch(::IceInternal::Incoming& in, const std::string& s) +{ + std::string* b = __names; + std::string* e = __names + 6; + std::pair<std::string*, std::string*> r = std::equal_range(b, e, s); + if (r.first == r.second) + { + return ::IceInternal::DispatchOperationNotExist; + } + + switch (r.first - __names) + { + case 0: + { + return ____isA(in); + } + case 1: + { + return ____ping(in); + } + case 2: + { + return ___add(in); + } + case 3: + { + return ___find(in); + } + case 4: + { + return ___remove(in); + } + case 5: + { + return ___shutdown(in); + } + } + + assert(false); + return ::IceInternal::DispatchOperationNotExist; +} + +void +IcePack::Admin::__write(::IceInternal::Stream* __os) +{ + __os->startWriteEncaps(); + __os->endWriteEncaps(); +} + +void +IcePack::Admin::__read(::IceInternal::Stream* __is) +{ + __is->startReadEncaps(); + __is->endReadEncaps(); +} diff --git a/cpp/src/Makefile b/cpp/src/Makefile index 59a45a9d339..211ace85799 100644 --- a/cpp/src/Makefile +++ b/cpp/src/Makefile @@ -12,7 +12,9 @@ top_srcdir = .. include $(top_srcdir)/config/Make.rules -SUBDIRS = slice \ +SUBDIRS = Slice \ + slice2cpp \ + slice2docbook \ Ice \ IcePack diff --git a/cpp/src/Slice/.depend b/cpp/src/Slice/.depend new file mode 100644 index 00000000000..aca31c1aaaf --- /dev/null +++ b/cpp/src/Slice/.depend @@ -0,0 +1,6 @@ +Shared.o: Shared.cpp ../../include/Ice/Shared.h ../../include/Ice/Config.h +Scanner.o: Scanner.cpp ../Slice/GrammerUtil.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Ice/Config.h ../../include/Ice/Handle.h ../Slice/Grammer.h +Grammer.o: Grammer.cpp ../Slice/GrammerUtil.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Ice/Config.h ../../include/Ice/Handle.h +GrammerUtil.o: GrammerUtil.cpp ../Slice/GrammerUtil.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Ice/Config.h ../../include/Ice/Handle.h +Parser.o: Parser.cpp ../../include/Ice/Functional.h ../../include/Ice/Handle.h ../../include/Ice/Config.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h +OutputUtil.o: OutputUtil.cpp ../../include/Ice/Config.h ../../include/Slice/OutputUtil.h diff --git a/cpp/src/Slice/Grammer.y b/cpp/src/Slice/Grammer.y index 9ae5c2aea52..5befb4811f6 100644 --- a/cpp/src/Slice/Grammer.y +++ b/cpp/src/Slice/Grammer.y @@ -10,7 +10,7 @@ // // ********************************************************************** -#include <GrammerUtil.h> +#include <Slice/GrammerUtil.h> using namespace std; using namespace Slice; diff --git a/cpp/src/Slice/GrammerUtil.cpp b/cpp/src/Slice/GrammerUtil.cpp index 575b0bd06ea..a27c390f169 100644 --- a/cpp/src/Slice/GrammerUtil.cpp +++ b/cpp/src/Slice/GrammerUtil.cpp @@ -8,7 +8,7 @@ // // ********************************************************************** -#include <GrammerUtil.h> +#include <Slice/GrammerUtil.h> using namespace std; using namespace Slice; diff --git a/cpp/src/Slice/GrammerUtil.h b/cpp/src/Slice/GrammerUtil.h index 8ab1d42a131..d14a544b7ec 100644 --- a/cpp/src/Slice/GrammerUtil.h +++ b/cpp/src/Slice/GrammerUtil.h @@ -11,7 +11,7 @@ #ifndef GRAMMER_UTIL_H #define GRAMMER_UTIL_H -#include <Parser.h> +#include <Slice/Parser.h> namespace Slice { diff --git a/cpp/src/Slice/Makefile b/cpp/src/Slice/Makefile index 41a1a5c8601..596d1f28552 100644 --- a/cpp/src/Slice/Makefile +++ b/cpp/src/Slice/Makefile @@ -8,7 +8,7 @@ # # ********************************************************************** -top_srcdir = ../../.. +top_srcdir = ../.. BASE = libSlice.so VERSIONED_BASE = $(BASE).$(VERSION) @@ -29,7 +29,7 @@ SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I. $(CPPFLAGS) +CPPFLAGS := -I. -I.. $(CPPFLAGS) $(VERSIONED_NAME): $(OBJS) rm -f $@ @@ -52,9 +52,9 @@ clean:: -rm -f Grammer.cpp Grammer.h Grammer.output -rm -f Scanner.cpp lex.yy.c -Shared.cpp: ../../Ice/Shared.cpp +Shared.cpp: ../Ice/Shared.cpp rm -f $@ - ln -s ../../Ice/Shared.cpp $@ + ln -s ../Ice/Shared.cpp $@ clean:: -rm -f Shared.cpp diff --git a/cpp/src/Slice/OutputUtil.cpp b/cpp/src/Slice/OutputUtil.cpp index 63fe83d2c90..a6ec2bb683c 100644 --- a/cpp/src/Slice/OutputUtil.cpp +++ b/cpp/src/Slice/OutputUtil.cpp @@ -9,7 +9,7 @@ // ********************************************************************** #include <Ice/Config.h> -#include <OutputUtil.h> +#include <Slice/OutputUtil.h> using namespace std; using namespace Slice; diff --git a/cpp/src/Slice/OutputUtil.h b/cpp/src/Slice/OutputUtil.h deleted file mode 100644 index 866b50e3681..00000000000 --- a/cpp/src/Slice/OutputUtil.h +++ /dev/null @@ -1,104 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2001 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#ifndef OUTPUT_UTIL_H -#define OUTPUT_UTIL_H - -#include <fstream> -#include <sstream> -#include <stack> - -namespace Slice -{ - -class ICE_API NextLine { }; -class ICE_API StartBlock { }; -class ICE_API EndBlock { }; -class ICE_API Separator { }; - -extern ICE_API NextLine nl; -extern ICE_API StartBlock sb; -extern ICE_API EndBlock eb; -extern ICE_API Separator sp; - -// ---------------------------------------------------------------------- -// Indent -// ---------------------------------------------------------------------- - -class ICE_API Output : ::IceInternal::noncopyable -{ -public: - - Output(); - Output(const char*); - - void setBeginBlock(const char *); // what do we use at block starts? - void setEndBlock(const char *); // what do we use the block end? - void setIndent(int); // what is the indent level? - void setUseTab(bool); // should we output tabs? - - void open(const char*); // Open output stream - - void print(const char*); // Print a string - - void inc(); // Increment indentation level - void dec(); // Decrement indentation level - - void useCurrentPosAsIndent(); // Save the current position as indentation - void zeroIndent(); // Use zero identation - void restoreIndent(); // Restore indentation - - void nl(); // Print newline - void sb(); // Start a block - void eb(); // End a block - void sp(); // Print separator - - bool operator!() const; // Check whether the output state is ok - -private: - - std::ofstream _out; - int _pos; - int _indent; - std::stack<int> _indentSave; - bool _separator; - - std::string _blockStart; - std::string _blockEnd; - bool _useTab; - int _indentSize; -}; - -template<typename T> -Output& operator<<(Output& out, const T& val) -{ - std::ostringstream s; - s << val; - out.print(s.str().c_str()); - return out; -} - -inline -Output& operator<<(Output& out, std::ios_base& (*val)(std::ios_base&)) -{ - std::ostringstream s; - s << val; - out.print(s.str().c_str()); - return out; -} - -ICE_API Output& operator<<(Output&, const NextLine&); -ICE_API Output& operator<<(Output&, const StartBlock&); -ICE_API Output& operator<<(Output&, const EndBlock&); -ICE_API Output& operator<<(Output&, const Separator&); - -} - -#endif diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 97ce13547b2..63a7da6e124 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -9,7 +9,7 @@ // ********************************************************************** #include <Ice/Functional.h> -#include <Parser.h> +#include <Slice/Parser.h> using namespace std; using namespace Slice; diff --git a/cpp/src/Slice/Parser.h b/cpp/src/Slice/Parser.h deleted file mode 100644 index d3cc35b2a47..00000000000 --- a/cpp/src/Slice/Parser.h +++ /dev/null @@ -1,629 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2001 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#ifndef PARSER_H -#define PARSER_H - -#include <Ice/Shared.h> -#include <Ice/Handle.h> -#include <list> -#include <stack> -#include <map> - -extern int yynerrs; - -int yyparse(); -int yylex(); - -namespace Slice -{ - -class GrammerBase; -class SyntaxTreeBase; -class Type; -class Builtin; -class Contained; -class Container; -class Module; -class Constructed; -class ClassDecl; -class ClassDef; -class Proxy; -class Operation; -class DataMember; -class Vector; -class Enum; -class Enumerator; -class Native; -class Unit; - -} - -namespace IceInternal -{ - -void ICE_API incRef(::Slice::GrammerBase*); -void ICE_API decRef(::Slice::GrammerBase*); -void ICE_API incRef(::Slice::SyntaxTreeBase*); -void ICE_API decRef(::Slice::SyntaxTreeBase*); -void ICE_API incRef(::Slice::Type*); -void ICE_API decRef(::Slice::Type*); -void ICE_API incRef(::Slice::Builtin*); -void ICE_API decRef(::Slice::Builtin*); -void ICE_API incRef(::Slice::Contained*); -void ICE_API decRef(::Slice::Contained*); -void ICE_API incRef(::Slice::Container*); -void ICE_API decRef(::Slice::Container*); -void ICE_API incRef(::Slice::Module*); -void ICE_API decRef(::Slice::Module*); -void ICE_API incRef(::Slice::Constructed*); -void ICE_API decRef(::Slice::Constructed*); -void ICE_API incRef(::Slice::ClassDecl*); -void ICE_API decRef(::Slice::ClassDecl*); -void ICE_API incRef(::Slice::ClassDef*); -void ICE_API decRef(::Slice::ClassDef*); -void ICE_API incRef(::Slice::Proxy*); -void ICE_API decRef(::Slice::Proxy*); -void ICE_API incRef(::Slice::Operation*); -void ICE_API decRef(::Slice::Operation*); -void ICE_API incRef(::Slice::DataMember*); -void ICE_API decRef(::Slice::DataMember*); -void ICE_API incRef(::Slice::Vector*); -void ICE_API decRef(::Slice::Vector*); -void ICE_API incRef(::Slice::Enum*); -void ICE_API decRef(::Slice::Enum*); -void ICE_API incRef(::Slice::Enumerator*); -void ICE_API decRef(::Slice::Enumerator*); -void ICE_API incRef(::Slice::Native*); -void ICE_API decRef(::Slice::Native*); -void ICE_API incRef(::Slice::Unit*); -void ICE_API decRef(::Slice::Unit*); - -} - -namespace Slice -{ - -typedef ::IceInternal::Handle<GrammerBase> GrammerBasePtr; -typedef ::IceInternal::Handle<SyntaxTreeBase> SyntaxTreeBasePtr; -typedef ::IceInternal::Handle<Type> TypePtr; -typedef ::IceInternal::Handle<Builtin> BuiltinPtr; -typedef ::IceInternal::Handle<Contained> ContainedPtr; -typedef ::IceInternal::Handle<Container> ContainerPtr; -typedef ::IceInternal::Handle<Module> ModulePtr; -typedef ::IceInternal::Handle<Constructed> ConstructedPtr; -typedef ::IceInternal::Handle<ClassDecl> ClassDeclPtr; -typedef ::IceInternal::Handle<ClassDef> ClassDefPtr; -typedef ::IceInternal::Handle<Proxy> ProxyPtr; -typedef ::IceInternal::Handle<Operation> OperationPtr; -typedef ::IceInternal::Handle<DataMember> DataMemberPtr; -typedef ::IceInternal::Handle<Vector> VectorPtr; -typedef ::IceInternal::Handle<Enum> EnumPtr; -typedef ::IceInternal::Handle<Enumerator> EnumeratorPtr; -typedef ::IceInternal::Handle<Native> NativePtr; -typedef ::IceInternal::Handle<Unit> UnitPtr; - -} - -namespace Slice -{ - -typedef std::list<TypePtr> TypeList; -typedef std::list<std::string> StringList; -typedef std::pair<TypePtr, std::string> TypeString; -typedef std::list<TypeString> TypeStringList; -typedef std::list<ContainedPtr> ContainedList; -typedef std::list<ModulePtr> ModuleList; -typedef std::list<ClassDefPtr> ClassList; -typedef std::list<VectorPtr> VectorList; -typedef std::list<EnumPtr> EnumList; -typedef std::list<NativePtr> NativeList; -typedef std::list<OperationPtr> OperationList; -typedef std::list<DataMemberPtr> DataMemberList; - -// ---------------------------------------------------------------------- -// ParserVisitor -// ---------------------------------------------------------------------- - -class ICE_API ParserVisitor -{ -public: - - virtual ~ParserVisitor() { } - virtual void visitUnitStart(const UnitPtr&) { }; - virtual void visitUnitEnd(const UnitPtr&) { }; - virtual void visitModuleStart(const ModulePtr&) { }; - virtual void visitModuleEnd(const ModulePtr&) { }; - virtual void visitClassDecl(const ClassDeclPtr&) { }; - virtual void visitClassDefStart(const ClassDefPtr&) { }; - virtual void visitClassDefEnd(const ClassDefPtr&) { }; - virtual void visitOperation(const OperationPtr&) { }; - virtual void visitDataMember(const DataMemberPtr&) { }; - virtual void visitVector(const VectorPtr&) { }; - virtual void visitEnum(const EnumPtr&) { }; - virtual void visitNative(const NativePtr&) { }; -}; - -// ---------------------------------------------------------------------- -// GrammerBase -// ---------------------------------------------------------------------- - -class ICE_API GrammerBase : public ::IceInternal::SimpleShared -{ -}; - -#define YYSTYPE Slice::GrammerBasePtr - -// ---------------------------------------------------------------------- -// SyntaxTreeBase -// ---------------------------------------------------------------------- - -class ICE_API SyntaxTreeBase : public GrammerBase -{ -public: - - virtual void destroy(); - UnitPtr unit(); - virtual void visit(ParserVisitor*); - -protected: - - SyntaxTreeBase(const UnitPtr&); - - UnitPtr _unit; -}; - -// ---------------------------------------------------------------------- -// Type -// ---------------------------------------------------------------------- - -class ICE_API Type : virtual public SyntaxTreeBase -{ -public: - -protected: - - Type(const UnitPtr&); -}; - -// ---------------------------------------------------------------------- -// Builtin -// ---------------------------------------------------------------------- - -class ICE_API Builtin : virtual public Type -{ -public: - - enum Kind - { - KindByte, - KindBool, - KindShort, - KindInt, - KindLong, - KindFloat, - KindDouble, - KindString, - KindWString, - KindObject, - KindObjectProxy, - KindLocalObject - }; - Kind kind(); - -protected: - - Builtin(const UnitPtr&, Kind); - friend class ICE_API Unit; - - Kind _kind; -}; - -// ---------------------------------------------------------------------- -// Contained -// ---------------------------------------------------------------------- - -class ICE_API Contained : virtual public SyntaxTreeBase -{ -public: - - ContainerPtr container(); - std::string name(); - std::string scoped(); - std::string scope(); - std::string comment(); - - enum ContainedType - { - ContainedTypeVector, - ContainedTypeEnum, - ContainedTypeEnumerator, - ContainedTypeNative, - ContainedTypeModule, - ContainedTypeClass, - ContainedTypeOperation, - ContainedTypeDataMember - }; - virtual ContainedType containedType() = 0; - -protected: - - Contained(const ContainerPtr&, - const std::string&); - friend class ICE_API Container; - - ContainerPtr _container; - std::string _name; - std::string _scoped; - std::string _comment; -}; - -bool ICE_API operator<(Contained&, Contained&); -bool ICE_API operator==(Contained&, Contained&); - -// ---------------------------------------------------------------------- -// Container -// ---------------------------------------------------------------------- - -class ICE_API Container : virtual public SyntaxTreeBase -{ -public: - - virtual void destroy(); - ModulePtr createModule(const std::string&); - ClassDefPtr createClassDef(const std::string&, bool, bool, - const ClassList&); - ClassDeclPtr createClassDecl(const std::string&, bool, bool); - VectorPtr createVector(const std::string&, const TypePtr&); - EnumPtr createEnum(const std::string&, const StringList&); - EnumeratorPtr createEnumerator(const std::string&); - NativePtr createNative(const std::string&); - TypeList lookupType(const std::string&, bool = true); - TypeList lookupTypeNoBuiltin(const std::string&, bool = true); - ContainedList lookupContained(const std::string&, bool = true); - ModuleList modules(); - ClassList classes(); - VectorList vectors(); - EnumList enums(); - NativeList natives(); - int includeLevel(); - bool hasProxies(); - bool hasClassDecls(); - bool hasClassDefs(); - bool hasOtherConstructedTypes(); // Other than classes - std::string thisScope(); - void mergeModules(); - void sort(); - virtual void visit(ParserVisitor*); - -protected: - - Container(const UnitPtr&); - - bool checkInterfaceAndLocal(const std::string&, bool, - bool, bool, bool, bool); - - int _includeLevel; - ContainedList _contents; -}; - -// ---------------------------------------------------------------------- -// Module -// ---------------------------------------------------------------------- - -class ICE_API Module : virtual public Container, virtual public Contained -{ -public: - - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - Module(const ContainerPtr&, - const std::string&); - friend class ICE_API Container; -}; - -// ---------------------------------------------------------------------- -// Constructed -// ---------------------------------------------------------------------- - -class ICE_API Constructed : virtual public Type, virtual public Contained -{ -public: - -protected: - - Constructed(const ContainerPtr&, - const std::string&); -}; - -// ---------------------------------------------------------------------- -// ClassDecl -// ---------------------------------------------------------------------- - -class ICE_API ClassDecl : virtual public Constructed -{ -public: - - ClassDefPtr definition(); - bool isLocal(); - bool isInterface(); - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - ClassDecl(const ContainerPtr&, - const std::string&, - bool, - bool); - friend class ICE_API Container; - friend class ICE_API ClassDef; - - ClassDefPtr _definition; - bool _local; - bool _interface; -}; - -// ---------------------------------------------------------------------- -// ClassDef -// ---------------------------------------------------------------------- - -class ICE_API ClassDef : virtual public Container, virtual public Contained -{ -public: - - virtual void destroy(); - OperationPtr createOperation(const std::string&, const TypePtr&, const TypeStringList&, const TypeStringList&, - const TypeList&, bool); - DataMemberPtr createDataMember(const std::string&, const TypePtr&); - ClassList bases(); - ClassList allBases(); - OperationList operations(); - OperationList allOperations(); - DataMemberList dataMembers(); - bool isAbstract(); - bool isLocal(); - bool isInterface(); - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - ClassDef(const ContainerPtr&, - const std::string&, - bool, - bool, - const ClassList&); - friend class ICE_API Container; - - bool _local; - bool _interface; - ClassList _bases; -}; - -// ---------------------------------------------------------------------- -// Proxy -// ---------------------------------------------------------------------- - -class ICE_API Proxy : virtual public Type -{ -public: - - ClassDeclPtr _class(); - - Proxy(const ClassDeclPtr&); - -protected: - - ClassDeclPtr __class; -}; - -// ---------------------------------------------------------------------- -// Operation -// ---------------------------------------------------------------------- - -class ICE_API Operation : virtual public Contained -{ -public: - - TypePtr returnType(); - TypeStringList inputParameters(); - TypeStringList outputParameters(); - TypeList throws(); - bool nonmutating(); - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - Operation(const ContainerPtr&, - const std::string&, - const TypePtr&, - const TypeStringList&, - const TypeStringList&, - const TypeList&, - bool); - friend class ICE_API ClassDef; - - TypePtr _returnType; - TypeStringList _inParams; - TypeStringList _outParams; - TypeList _throws; - bool _nonmutating; -}; - -// ---------------------------------------------------------------------- -// DataMember -// ---------------------------------------------------------------------- - -class ICE_API DataMember : virtual public Contained -{ -public: - - TypePtr type(); - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - DataMember(const ContainerPtr&, - const std::string&, - const TypePtr&); - friend class ICE_API ClassDef; - - TypePtr _type; -}; - -// ---------------------------------------------------------------------- -// Vector -// ---------------------------------------------------------------------- - -class ICE_API Vector : virtual public Constructed -{ -public: - - TypePtr type(); - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - Vector(const ContainerPtr&, - const std::string&, - const TypePtr&); - friend class ICE_API Container; - - TypePtr _type; -}; - -// ---------------------------------------------------------------------- -// Enum -// ---------------------------------------------------------------------- - -class ICE_API Enum : virtual public Constructed -{ -public: - - StringList enumerators(); - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - Enum(const ContainerPtr&, - const std::string&, - const StringList&); - friend class ICE_API Container; - - StringList _enumerators; -}; - -// ---------------------------------------------------------------------- -// Enumerator -// ---------------------------------------------------------------------- - -class ICE_API Enumerator : virtual public Contained -{ -public: - - virtual ContainedType containedType(); - -protected: - - Enumerator(const ContainerPtr&, - const std::string&); - friend class ICE_API Container; -}; - -// ---------------------------------------------------------------------- -// Native -// ---------------------------------------------------------------------- - -class Native : virtual public Constructed -{ -public: - - virtual ContainedType containedType(); - virtual void visit(ParserVisitor*); - -protected: - - Native(const ContainerPtr&, - const std::string&); - friend class Container; -}; - -// ---------------------------------------------------------------------- -// Unit -// ---------------------------------------------------------------------- - -class ICE_API Unit : virtual public Container -{ -public: - - static UnitPtr createUnit(bool, bool); - - bool ignRedefs(); - - void setComment(const std::string&); - std::string currentComment(); - - void nextLine(); - void scanPosition(const char*); - int currentIncludeLevel(); - - void error(const char*); - void error(const std::string&); - - void warning(const char*); - void warning(const std::string&); - - ContainerPtr currentContainer(); - void pushContainer(const ContainerPtr&); - void popContainer(); - - void addContent(const ContainedPtr&); - void removeContent(const ContainedPtr&); - ContainedList findContents(const std::string&); - - StringList includeFiles(); - - int parse(FILE*, bool); - - virtual void destroy(); - virtual void visit(ParserVisitor*); - - BuiltinPtr builtin(Builtin::Kind); - -private: - - Unit(bool, bool); - - bool _ignRedefs; - bool _all; - std::string _currentComment; - int _currentLine; - int _currentIncludeLevel; - std::string _currentFile; - std::string _topLevelFile; - StringList _includeFiles; - std::stack<ContainerPtr> _containerStack; - std::map<Builtin::Kind, BuiltinPtr> _builtins; - std::map<std::string, ContainedList > _contentMap; -}; - -extern Unit* unit; // The current parser for bison/flex - -} - -#endif diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l index 2474a5d9260..3893ca99c6c 100644 --- a/cpp/src/Slice/Scanner.l +++ b/cpp/src/Slice/Scanner.l @@ -10,8 +10,8 @@ // // ********************************************************************** -#include <GrammerUtil.h> // Before Grammer.h, so that YYSTYPE is defined -#include <Grammer.h> +#include <Slice/GrammerUtil.h> // Before Grammer.h, so that YYSTYPE is defined +#include <Slice/Grammer.h> using namespace std; using namespace Slice; diff --git a/cpp/src/Slice/parser.dsp b/cpp/src/Slice/slice.dsp index 195f176a28e..6b51cac1c3e 100644 --- a/cpp/src/Slice/parser.dsp +++ b/cpp/src/Slice/slice.dsp @@ -1,24 +1,24 @@ -# Microsoft Developer Studio Project File - Name="parser" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="Slice" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-CFG=parser - Win32 Debug
+CFG=Slice - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
-!MESSAGE NMAKE /f "parser.mak".
+!MESSAGE NMAKE /f "Slice.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "parser.mak" CFG="parser - Win32 Debug"
+!MESSAGE NMAKE /f "Slice.mak" CFG="Slice - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "parser - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "parser - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Slice - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "Slice - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
@@ -29,7 +29,7 @@ CPP=cl.exe MTL=midl.exe
RSC=rc.exe
-!IF "$(CFG)" == "parser - Win32 Release"
+!IF "$(CFG)" == "Slice - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -43,7 +43,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PARSER_EXPORTS" /Yu"stdafx.h" /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "dummyinclude" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICE_API_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I ".." /I "../../include" /I "dummyinclude" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICE_API_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -57,10 +57,10 @@ LINK32=link.exe # SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
-PostBuild_Cmds=copy Release\slice001.* ..\..\..\lib
+PostBuild_Cmds=copy Release\slice001.* ..\..\lib
# End Special Build Tool
-!ELSEIF "$(CFG)" == "parser - Win32 Debug"
+!ELSEIF "$(CFG)" == "Slice - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -74,7 +74,7 @@ PostBuild_Cmds=copy Release\slice001.* ..\..\..\lib # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PARSER_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "dummyinclude" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICE_API_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I ".." /I "../../include" /I "dummyinclude" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICE_API_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
@@ -88,15 +88,15 @@ LINK32=link.exe # SUBTRACT LINK32 /pdb:none
# Begin Special Build Tool
SOURCE="$(InputPath)"
-PostBuild_Cmds=copy Debug\slice001d.* ..\..\..\lib
+PostBuild_Cmds=copy Debug\slice001d.* ..\..\lib
# End Special Build Tool
!ENDIF
# Begin Target
-# Name "parser - Win32 Release"
-# Name "parser - Win32 Debug"
+# Name "Slice - Win32 Release"
+# Name "Slice - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -122,7 +122,7 @@ SOURCE=.\Scanner.cpp # End Source File
# Begin Source File
-SOURCE=..\..\Ice\Shared.cpp
+SOURCE=..\Ice\Shared.cpp
# End Source File
# End Group
# Begin Group "Header Files"
@@ -138,11 +138,11 @@ SOURCE=.\GrammerUtil.h # End Source File
# Begin Source File
-SOURCE=.\OutputUtil.h
+SOURCE=..\..\incluce\Slice\OutputUtil.h
# End Source File
# Begin Source File
-SOURCE=.\Parser.h
+SOURCE=..\..\include\Slice\Parser.h
# End Source File
# End Group
# Begin Group "Resource Files"
@@ -153,7 +153,7 @@ SOURCE=.\Parser.h SOURCE=.\Grammer.y
-!IF "$(CFG)" == "parser - Win32 Release"
+!IF "$(CFG)" == "Slice - Win32 Release"
# Begin Custom Build
InputPath=.\Grammer.y
@@ -171,7 +171,7 @@ BuildCmds= \ $(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "parser - Win32 Debug"
+!ELSEIF "$(CFG)" == "Slice - Win32 Debug"
# Begin Custom Build
InputPath=.\Grammer.y
@@ -196,7 +196,7 @@ BuildCmds= \ SOURCE=.\Scanner.l
-!IF "$(CFG)" == "parser - Win32 Release"
+!IF "$(CFG)" == "Slice - Win32 Release"
# Begin Custom Build
InputPath=.\Scanner.l
@@ -207,7 +207,7 @@ InputPath=.\Scanner.l # End Custom Build
-!ELSEIF "$(CFG)" == "parser - Win32 Debug"
+!ELSEIF "$(CFG)" == "Slice - Win32 Debug"
# Begin Custom Build
InputPath=.\Scanner.l
diff --git a/cpp/src/slice2cpp/.depend b/cpp/src/slice2cpp/.depend index de3053fcdab..7681b5dbbc3 100644 --- a/cpp/src/slice2cpp/.depend +++ b/cpp/src/slice2cpp/.depend @@ -1,3 +1,3 @@ -Gen.o: Gen.cpp ../../../include/Ice/Functional.h ../../../include/Ice/Handle.h ../../../include/Ice/Config.h Gen.h ../parser/Parser.h ../../../include/Ice/Shared.h ../parser/OutputUtil.h GenUtil.h -GenUtil.o: GenUtil.cpp GenUtil.h ../parser/Parser.h ../../../include/Ice/Shared.h ../../../include/Ice/Config.h ../../../include/Ice/Handle.h ../parser/OutputUtil.h -Main.o: Main.cpp Gen.h ../parser/Parser.h ../../../include/Ice/Shared.h ../../../include/Ice/Config.h ../../../include/Ice/Handle.h ../parser/OutputUtil.h +Gen.o: Gen.cpp ../../include/Ice/Functional.h ../../include/Ice/Handle.h ../../include/Ice/Config.h Gen.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Slice/OutputUtil.h GenUtil.h +GenUtil.o: GenUtil.cpp GenUtil.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Ice/Config.h ../../include/Ice/Handle.h ../../include/Slice/OutputUtil.h +Main.o: Main.cpp Gen.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Ice/Config.h ../../include/Ice/Handle.h ../../include/Slice/OutputUtil.h diff --git a/cpp/src/slice2cpp/Gen.h b/cpp/src/slice2cpp/Gen.h index 2c07763f8fe..7019d69d868 100644 --- a/cpp/src/slice2cpp/Gen.h +++ b/cpp/src/slice2cpp/Gen.h @@ -11,8 +11,8 @@ #ifndef GEN_H #define GEN_H -#include <Parser.h> -#include <OutputUtil.h> +#include <Slice/Parser.h> +#include <Slice/OutputUtil.h> namespace Slice { diff --git a/cpp/src/slice2cpp/GenUtil.h b/cpp/src/slice2cpp/GenUtil.h index 48646d52b1a..0959c4eef80 100644 --- a/cpp/src/slice2cpp/GenUtil.h +++ b/cpp/src/slice2cpp/GenUtil.h @@ -11,8 +11,8 @@ #ifndef GEN_UTIL_H #define GEN_UTIL_H -#include <Parser.h> -#include <OutputUtil.h> +#include <Slice/Parser.h> +#include <Slice/OutputUtil.h> namespace Slice { diff --git a/cpp/src/slice2cpp/Makefile b/cpp/src/slice2cpp/Makefile index 4087295d345..b74e28f90b6 100644 --- a/cpp/src/slice2cpp/Makefile +++ b/cpp/src/slice2cpp/Makefile @@ -8,7 +8,7 @@ # # ********************************************************************** -top_srcdir = ../../.. +top_srcdir = ../.. NAME = $(top_srcdir)/bin/slice2cpp @@ -22,7 +22,7 @@ SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I. -I../parser $(CPPFLAGS) +CPPFLAGS := -I. $(CPPFLAGS) $(NAME): $(OBJS) rm -f $@ diff --git a/cpp/src/slice2cpp/cpp.dsp b/cpp/src/slice2cpp/slice2cpp.dsp index 917b55e6678..627a576c830 100644 --- a/cpp/src/slice2cpp/cpp.dsp +++ b/cpp/src/slice2cpp/slice2cpp.dsp @@ -1,24 +1,24 @@ -# Microsoft Developer Studio Project File - Name="cpp" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="slice2cpp" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=cpp - Win32 Debug
+CFG=slice2cpp - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
-!MESSAGE NMAKE /f "cpp.mak".
+!MESSAGE NMAKE /f "slice2cpp.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "cpp.mak" CFG="cpp - Win32 Debug"
+!MESSAGE NMAKE /f "slice2cpp.mak" CFG="slice2cpp - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "cpp - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "cpp - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "slice2cpp - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "slice2cpp - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=cpp - Win32 Debug CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "cpp - Win32 Release"
+!IF "$(CFG)" == "slice2cpp - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -42,7 +42,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../parser" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -50,9 +50,9 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../../../bin/slice2cpp.exe" /libpath:"../../../lib"
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../../bin/slice2cpp.exe" /libpath:"../../lib"
-!ELSEIF "$(CFG)" == "cpp - Win32 Debug"
+!ELSEIF "$(CFG)" == "slice2cpp - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -66,7 +66,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../parser" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -74,14 +74,14 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /out:"../../../bin/slice2cpp.exe" /pdbtype:sept /libpath:"../../../lib"
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/slice2cpp.exe" /pdbtype:sept /libpath:"../../lib"
!ENDIF
# Begin Target
-# Name "cpp - Win32 Release"
-# Name "cpp - Win32 Debug"
+# Name "slice2cpp - Win32 Release"
+# Name "slice2cpp - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
diff --git a/cpp/src/slice2docbook/.depend b/cpp/src/slice2docbook/.depend index 90c5be97e71..b0b535c9494 100644 --- a/cpp/src/slice2docbook/.depend +++ b/cpp/src/slice2docbook/.depend @@ -1,2 +1,2 @@ -Gen.o: Gen.cpp ../../../include/Ice/Functional.h ../../../include/Ice/Handle.h ../../../include/Ice/Config.h Gen.h ../parser/Parser.h ../../../include/Ice/Shared.h ../parser/OutputUtil.h -Main.o: Main.cpp Gen.h ../parser/Parser.h ../../../include/Ice/Shared.h ../../../include/Ice/Config.h ../../../include/Ice/Handle.h ../parser/OutputUtil.h +Gen.o: Gen.cpp ../../include/Ice/Functional.h ../../include/Ice/Handle.h ../../include/Ice/Config.h Gen.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Slice/OutputUtil.h +Main.o: Main.cpp Gen.h ../../include/Slice/Parser.h ../../include/Ice/Shared.h ../../include/Ice/Config.h ../../include/Ice/Handle.h ../../include/Slice/OutputUtil.h diff --git a/cpp/src/slice2docbook/Gen.h b/cpp/src/slice2docbook/Gen.h index 60b89ac6a90..bb2fa8c5b31 100644 --- a/cpp/src/slice2docbook/Gen.h +++ b/cpp/src/slice2docbook/Gen.h @@ -11,8 +11,8 @@ #ifndef GEN_H #define GEN_H -#include <Parser.h> -#include <OutputUtil.h> +#include <Slice/Parser.h> +#include <Slice/OutputUtil.h> #include <stack> namespace Slice diff --git a/cpp/src/slice2docbook/Makefile b/cpp/src/slice2docbook/Makefile index 4b3d02d1303..4398f705f45 100644 --- a/cpp/src/slice2docbook/Makefile +++ b/cpp/src/slice2docbook/Makefile @@ -8,7 +8,7 @@ # # ********************************************************************** -top_srcdir = ../../.. +top_srcdir = ../.. NAME = $(top_srcdir)/bin/slice2docbook @@ -21,7 +21,7 @@ SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules -CPPFLAGS := -I. -I../parser $(CPPFLAGS) +CPPFLAGS := -I. $(CPPFLAGS) $(NAME): $(OBJS) rm -f $@ diff --git a/cpp/src/slice2docbook/docbook.dsp b/cpp/src/slice2docbook/slice2docbook.dsp index 5dd23646936..c344e909452 100644 --- a/cpp/src/slice2docbook/docbook.dsp +++ b/cpp/src/slice2docbook/slice2docbook.dsp @@ -1,24 +1,24 @@ -# Microsoft Developer Studio Project File - Name="docbook" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="slice2docbook" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=docbook - Win32 Debug
+CFG=slice2docbook - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
-!MESSAGE NMAKE /f "docbook.mak".
+!MESSAGE NMAKE /f "slice2docbook.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "docbook.mak" CFG="docbook - Win32 Debug"
+!MESSAGE NMAKE /f "slice2docbook.mak" CFG="slice2docbook - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "docbook - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "docbook - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "slice2docbook - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "slice2docbook - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=docbook - Win32 Debug CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "docbook - Win32 Release"
+!IF "$(CFG)" == "slice2docbook - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -42,7 +42,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../parser" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../include" /I "../parser" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -50,9 +50,9 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../../../bin/slice2docbook.exe" /libpath:"../../../lib"
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../../bin/slice2docbook.exe" /libpath:"../../lib"
-!ELSEIF "$(CFG)" == "docbook - Win32 Debug"
+!ELSEIF "$(CFG)" == "slice2docbook - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -66,7 +66,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../parser" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../include" /I "../parser" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -74,14 +74,14 @@ BSC32=bscmake.exe # ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /out:"../../../bin/slice2docbook.exe" /pdbtype:sept /libpath:"../../../lib"
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/slice2docbook.exe" /pdbtype:sept /libpath:"../../lib"
!ENDIF
# Begin Target
-# Name "docbook - Win32 Release"
-# Name "docbook - Win32 Debug"
+# Name "slice2docbook - Win32 Release"
+# Name "slice2docbook - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|