Browse Source

2nd clean up

0.1
Pedro Berrocal 5 years ago
parent
commit
bf5cfb3d95
7 changed files with 4 additions and 941 deletions
  1. +3
    -6
      README.md
  2. +1
    -1
      dockerfile
  3. +0
    -399
      src/Printer.cpp
  4. +0
    -535
      src/Printer.h
  5. BIN
      src/Printer.o
  6. BIN
      src/Server.o
  7. BIN
      src/server

+ 3
- 6
README.md View File

@ -19,15 +19,12 @@ sudo apt-get install libzeroc-freeze-dev zeroc-freeze-utils
### Generate headers
```
make slice
slice2cpp Printer.ice
```
### Compile & link
```
make
c++ -I. -DICE_CPP11_MAPPING -c Printer.cpp Server.cpp -std=c++11 -pthread
c++ -o server Printer.o Server.o -lIce++11 -pthread -std=c++11
```
# Develpment
## TODO
- User Object
- ...

+ 1
- 1
dockerfile View File

@ -10,7 +10,7 @@ RUN apt-get update
RUN apt-get install -qq wget unzip build-essential cmake gcc libcunit1-dev libudev-dev zeroc-ice-all-runtime zeroc-ice-all-dev libzeroc-freeze-dev zeroc-freeze-utils
ADD src/ /
RUN slice2cpp Printer.ice
RUN c++ -I. -DICE_CPP11_MAPPING -c Printer.cpp Server.cpp -std=c++11 -pthread
RUN c++ -o server Printer.o Server.o -lIce++11 -pthread -std=c++11


+ 0
- 399
src/Printer.cpp View File

@ -1,399 +0,0 @@
// **********************************************************************
//
// Copyright (c) 2003-2018 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.
//
// **********************************************************************
//
// Ice version 3.7.1
//
// <auto-generated>
//
// Generated from file `Printer.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
#include <Printer.h>
#include <IceUtil/PushDisableWarnings.h>
#include <Ice/LocalException.h>
#include <Ice/ValueFactory.h>
#include <Ice/OutgoingAsync.h>
#include <Ice/InputStream.h>
#include <Ice/OutputStream.h>
#include <IceUtil/PopDisableWarnings.h>
#if defined(_MSC_VER)
# pragma warning(disable:4458) // declaration of ... hides class member
#elif defined(__clang__)
# pragma clang diagnostic ignored "-Wshadow"
#elif defined(__GNUC__)
# pragma GCC diagnostic ignored "-Wshadow"
#endif
#ifndef ICE_IGNORE_VERSION
# if ICE_INT_VERSION / 100 != 307
# error Ice version mismatch!
# endif
# if ICE_INT_VERSION % 100 > 50
# error Beta header file detected
# endif
# if ICE_INT_VERSION % 100 < 1
# error Ice patch level mismatch!
# endif
#endif
#ifdef ICE_CPP11_MAPPING // C++11 mapping
namespace
{
const ::std::string iceC_Demo_Printer_ids[2] =
{
"::Demo::Printer",
"::Ice::Object"
};
const ::std::string iceC_Demo_Printer_ops[] =
{
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping",
"printString"
};
const ::std::string iceC_Demo_Printer_printString_name = "printString";
}
bool
Demo::Printer::ice_isA(::std::string s, const ::Ice::Current&) const
{
return ::std::binary_search(iceC_Demo_Printer_ids, iceC_Demo_Printer_ids + 2, s);
}
::std::vector<::std::string>
Demo::Printer::ice_ids(const ::Ice::Current&) const
{
return ::std::vector<::std::string>(&iceC_Demo_Printer_ids[0], &iceC_Demo_Printer_ids[2]);
}
::std::string
Demo::Printer::ice_id(const ::Ice::Current&) const
{
return ice_staticId();
}
const ::std::string&
Demo::Printer::ice_staticId()
{
static const ::std::string typeId = "::Demo::Printer";
return typeId;
}
/// \cond INTERNAL
bool
Demo::Printer::_iceD_printString(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
auto istr = inS.startReadParams();
::std::string iceP_s;
istr->readAll(iceP_s);
inS.endReadParams();
this->printString(::std::move(iceP_s), current);
inS.writeEmptyParams();
return true;
}
/// \endcond
/// \cond INTERNAL
bool
Demo::Printer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_Demo_Printer_ops, iceC_Demo_Printer_ops + 5, current.operation);
if(r.first == r.second)
{
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
switch(r.first - iceC_Demo_Printer_ops)
{
case 0:
{
return _iceD_ice_id(in, current);
}
case 1:
{
return _iceD_ice_ids(in, current);
}
case 2:
{
return _iceD_ice_isA(in, current);
}
case 3:
{
return _iceD_ice_ping(in, current);
}
case 4:
{
return _iceD_printString(in, current);
}
default:
{
assert(false);
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
}
}
/// \endcond
/// \cond INTERNAL
void
Demo::PrinterPrx::_iceI_printString(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>& outAsync, const ::std::string& iceP_s, const ::Ice::Context& context)
{
outAsync->invoke(iceC_Demo_Printer_printString_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context,
[&](::Ice::OutputStream* ostr)
{
ostr->writeAll(iceP_s);
},
nullptr);
}
/// \endcond
/// \cond INTERNAL
::std::shared_ptr<::Ice::ObjectPrx>
Demo::PrinterPrx::_newInstance() const
{
return ::IceInternal::createProxy<PrinterPrx>();
}
/// \endcond
const ::std::string&
Demo::PrinterPrx::ice_staticId()
{
return Printer::ice_staticId();
}
#else // C++98 mapping
namespace
{
const ::std::string iceC_Demo_Printer_printString_name = "printString";
}
/// \cond INTERNAL
::IceProxy::Ice::Object* ::IceProxy::Demo::upCast(Printer* p) { return p; }
void
::IceProxy::Demo::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< Printer>& v)
{
::Ice::ObjectPrx proxy;
istr->read(proxy);
if(!proxy)
{
v = 0;
}
else
{
v = new Printer;
v->_copyFrom(proxy);
}
}
/// \endcond
::Ice::AsyncResultPtr
IceProxy::Demo::Printer::_iceI_begin_printString(const ::std::string& iceP_s, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync)
{
::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_Demo_Printer_printString_name, del, cookie, sync);
try
{
result->prepare(iceC_Demo_Printer_printString_name, ::Ice::Normal, context);
::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat);
ostr->write(iceP_s);
result->endWriteParams();
result->invoke(iceC_Demo_Printer_printString_name);
}
catch(const ::Ice::Exception& ex)
{
result->abort(ex);
}
return result;
}
void
IceProxy::Demo::Printer::end_printString(const ::Ice::AsyncResultPtr& result)
{
_end(result, iceC_Demo_Printer_printString_name);
}
/// \cond INTERNAL
::IceProxy::Ice::Object*
IceProxy::Demo::Printer::_newInstance() const
{
return new Printer;
}
/// \endcond
const ::std::string&
IceProxy::Demo::Printer::ice_staticId()
{
return ::Demo::Printer::ice_staticId();
}
Demo::Printer::~Printer()
{
}
/// \cond INTERNAL
::Ice::Object* Demo::upCast(Printer* p) { return p; }
/// \endcond
namespace
{
const ::std::string iceC_Demo_Printer_ids[2] =
{
"::Demo::Printer",
"::Ice::Object"
};
}
bool
Demo::Printer::ice_isA(const ::std::string& s, const ::Ice::Current&) const
{
return ::std::binary_search(iceC_Demo_Printer_ids, iceC_Demo_Printer_ids + 2, s);
}
::std::vector< ::std::string>
Demo::Printer::ice_ids(const ::Ice::Current&) const
{
return ::std::vector< ::std::string>(&iceC_Demo_Printer_ids[0], &iceC_Demo_Printer_ids[2]);
}
const ::std::string&
Demo::Printer::ice_id(const ::Ice::Current&) const
{
return ice_staticId();
}
const ::std::string&
Demo::Printer::ice_staticId()
{
#ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC
static const ::std::string typeId = "::Demo::Printer";
return typeId;
#else
return iceC_Demo_Printer_ids[0];
#endif
}
/// \cond INTERNAL
bool
Demo::Printer::_iceD_printString(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::Normal, current.mode);
::Ice::InputStream* istr = inS.startReadParams();
::std::string iceP_s;
istr->read(iceP_s);
inS.endReadParams();
this->printString(iceP_s, current);
inS.writeEmptyParams();
return true;
}
/// \endcond
namespace
{
const ::std::string iceC_Demo_Printer_all[] =
{
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping",
"printString"
};
}
/// \cond INTERNAL
bool
Demo::Printer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair<const ::std::string*, const ::std::string*> r = ::std::equal_range(iceC_Demo_Printer_all, iceC_Demo_Printer_all + 5, current.operation);
if(r.first == r.second)
{
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
switch(r.first - iceC_Demo_Printer_all)
{
case 0:
{
return _iceD_ice_id(in, current);
}
case 1:
{
return _iceD_ice_ids(in, current);
}
case 2:
{
return _iceD_ice_isA(in, current);
}
case 3:
{
return _iceD_ice_ping(in, current);
}
case 4:
{
return _iceD_printString(in, current);
}
default:
{
assert(false);
throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation);
}
}
}
/// \endcond
/// \cond STREAM
void
Demo::Printer::_iceWriteImpl(::Ice::OutputStream* ostr) const
{
ostr->startSlice(ice_staticId(), -1, true);
::Ice::StreamWriter< Printer, ::Ice::OutputStream>::write(ostr, *this);
ostr->endSlice();
}
void
Demo::Printer::_iceReadImpl(::Ice::InputStream* istr)
{
istr->startSlice();
::Ice::StreamReader< Printer, ::Ice::InputStream>::read(istr, *this);
istr->endSlice();
}
/// \endcond
/// \cond INTERNAL
void
Demo::_icePatchObjectPtr(PrinterPtr& handle, const ::Ice::ObjectPtr& v)
{
handle = PrinterPtr::dynamicCast(v);
if(v && !handle)
{
IceInternal::Ex::throwUOE(Printer::ice_staticId(), v);
}
}
/// \endcond
namespace Ice
{
}
#endif

+ 0
- 535
src/Printer.h View File

@ -1,535 +0,0 @@
// **********************************************************************
//
// Copyright (c) 2003-2018 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.
//
// **********************************************************************
//
// Ice version 3.7.1
//
// <auto-generated>
//
// Generated from file `Printer.ice'
//
// Warning: do not edit this file.
//
// </auto-generated>
//
#ifndef __Printer_h__
#define __Printer_h__
#include <IceUtil/PushDisableWarnings.h>
#include <Ice/ProxyF.h>
#include <Ice/ObjectF.h>
#include <Ice/ValueF.h>
#include <Ice/Exception.h>
#include <Ice/LocalObject.h>
#include <Ice/StreamHelpers.h>
#include <Ice/Comparable.h>
#include <Ice/Proxy.h>
#include <Ice/Object.h>
#include <Ice/GCObject.h>
#include <Ice/Value.h>
#include <Ice/Incoming.h>
#include <Ice/FactoryTableInit.h>
#include <IceUtil/ScopedArray.h>
#include <Ice/Optional.h>
#include <IceUtil/UndefSysMacros.h>
#ifndef ICE_IGNORE_VERSION
# if ICE_INT_VERSION / 100 != 307
# error Ice version mismatch!
# endif
# if ICE_INT_VERSION % 100 > 50
# error Beta header file detected
# endif
# if ICE_INT_VERSION % 100 < 1
# error Ice patch level mismatch!
# endif
#endif
#ifdef ICE_CPP11_MAPPING // C++11 mapping
namespace Demo
{
class Printer;
class PrinterPrx;
}
namespace Demo
{
class Printer : public virtual ::Ice::Object
{
public:
using ProxyType = PrinterPrx;
/**
* Determines whether this object supports an interface with the given Slice type ID.
* @param id The fully-scoped Slice type ID.
* @param current The Current object for the invocation.
* @return True if this object supports the interface, false, otherwise.
*/
virtual bool ice_isA(::std::string id, const ::Ice::Current& current) const override;
/**
* Obtains a list of the Slice type IDs representing the interfaces supported by this object.
* @param current The Current object for the invocation.
* @return A list of fully-scoped type IDs.
*/
virtual ::std::vector<::std::string> ice_ids(const ::Ice::Current& current) const override;
/**
* Obtains a Slice type ID representing the most-derived interface supported by this object.
* @param current The Current object for the invocation.
* @return A fully-scoped type ID.
*/
virtual ::std::string ice_id(const ::Ice::Current& current) const override;
/**
* Obtains the Slice type ID corresponding to this class.
* @return A fully-scoped type ID.
*/
static const ::std::string& ice_staticId();
virtual void printString(::std::string s, const ::Ice::Current& current) = 0;
/// \cond INTERNAL
bool _iceD_printString(::IceInternal::Incoming&, const ::Ice::Current&);
/// \endcond
/// \cond INTERNAL
virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&) override;
/// \endcond
};
}
namespace Demo
{
class PrinterPrx : public virtual ::Ice::Proxy<PrinterPrx, ::Ice::ObjectPrx>
{
public:
void printString(const ::std::string& s, const ::Ice::Context& context = ::Ice::noExplicitContext)
{
_makePromiseOutgoing<void>(true, this, &PrinterPrx::_iceI_printString, s, context).get();
}
template<template<typename> class P = ::std::promise>
auto printStringAsync(const ::std::string& s, const ::Ice::Context& context = ::Ice::noExplicitContext)
-> decltype(::std::declval<P<void>>().get_future())
{
return _makePromiseOutgoing<void, P>(false, this, &PrinterPrx::_iceI_printString, s, context);
}
::std::function<void()>
printStringAsync(const ::std::string& s,
::std::function<void()> response,
::std::function<void(::std::exception_ptr)> ex = nullptr,
::std::function<void(bool)> sent = nullptr,
const ::Ice::Context& context = ::Ice::noExplicitContext)
{
return _makeLamdaOutgoing<void>(response, ex, sent, this, &PrinterPrx::_iceI_printString, s, context);
}
/// \cond INTERNAL
void _iceI_printString(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<void>>&, const ::std::string&, const ::Ice::Context&);
/// \endcond
/**
* Obtains the Slice type ID of this interface.
* @return The fully-scoped type ID.
*/
static const ::std::string& ice_staticId();
protected:
/// \cond INTERNAL
PrinterPrx() = default;
friend ::std::shared_ptr<PrinterPrx> IceInternal::createProxy<PrinterPrx>();
virtual ::std::shared_ptr<::Ice::ObjectPrx> _newInstance() const override;
/// \endcond
};
}
/// \cond STREAM
namespace Ice
{
}
/// \endcond
/// \cond INTERNAL
namespace Demo
{
using PrinterPtr = ::std::shared_ptr<Printer>;
using PrinterPrxPtr = ::std::shared_ptr<PrinterPrx>;
}
/// \endcond
#else // C++98 mapping
namespace IceProxy
{
namespace Demo
{
class Printer;
/// \cond INTERNAL
void _readProxy(::Ice::InputStream*, ::IceInternal::ProxyHandle< ::IceProxy::Demo::Printer>&);
::IceProxy::Ice::Object* upCast(::IceProxy::Demo::Printer*);
/// \endcond
}
}
namespace Demo
{
class Printer;
/// \cond INTERNAL
::Ice::Object* upCast(Printer*);
/// \endcond
typedef ::IceInternal::Handle< Printer> PrinterPtr;
typedef ::IceInternal::ProxyHandle< ::IceProxy::Demo::Printer> PrinterPrx;
typedef PrinterPrx PrinterPrxPtr;
/// \cond INTERNAL
void _icePatchObjectPtr(PrinterPtr&, const ::Ice::ObjectPtr&);
/// \endcond
}
namespace Demo
{
/**
* Base class for asynchronous callback wrapper classes used for calls to
* IceProxy::Demo::Printer::begin_printString.
* Create a wrapper instance by calling ::Demo::newCallback_Printer_printString.
*/
class Callback_Printer_printString_Base : public virtual ::IceInternal::CallbackBase { };
typedef ::IceUtil::Handle< Callback_Printer_printString_Base> Callback_Printer_printStringPtr;
}
namespace IceProxy
{
namespace Demo
{
class Printer : public virtual ::Ice::Proxy<Printer, ::IceProxy::Ice::Object>
{
public:
void printString(const ::std::string& s, const ::Ice::Context& context = ::Ice::noExplicitContext)
{
end_printString(_iceI_begin_printString(s, context, ::IceInternal::dummyCallback, 0, true));
}
::Ice::AsyncResultPtr begin_printString(const ::std::string& s, const ::Ice::Context& context = ::Ice::noExplicitContext)
{
return _iceI_begin_printString(s, context, ::IceInternal::dummyCallback, 0);
}
::Ice::AsyncResultPtr begin_printString(const ::std::string& s, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
{
return _iceI_begin_printString(s, ::Ice::noExplicitContext, cb, cookie);
}
::Ice::AsyncResultPtr begin_printString(const ::std::string& s, const ::Ice::Context& context, const ::Ice::CallbackPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
{
return _iceI_begin_printString(s, context, cb, cookie);
}
::Ice::AsyncResultPtr begin_printString(const ::std::string& s, const ::Demo::Callback_Printer_printStringPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
{
return _iceI_begin_printString(s, ::Ice::noExplicitContext, cb, cookie);
}
::Ice::AsyncResultPtr begin_printString(const ::std::string& s, const ::Ice::Context& context, const ::Demo::Callback_Printer_printStringPtr& cb, const ::Ice::LocalObjectPtr& cookie = 0)
{
return _iceI_begin_printString(s, context, cb, cookie);
}
void end_printString(const ::Ice::AsyncResultPtr& result);
private:
::Ice::AsyncResultPtr _iceI_begin_printString(const ::std::string&, const ::Ice::Context&, const ::IceInternal::CallbackBasePtr&, const ::Ice::LocalObjectPtr& cookie = 0, bool sync = false);
public:
/**
* Obtains the Slice type ID corresponding to this interface.
* @return A fully-scoped type ID.
*/
static const ::std::string& ice_staticId();
protected:
/// \cond INTERNAL
virtual ::IceProxy::Ice::Object* _newInstance() const;
/// \endcond
};
}
}
namespace Demo
{
class Printer : public virtual ::Ice::Object
{
public:
typedef PrinterPrx ProxyType;
typedef PrinterPtr PointerType;
virtual ~Printer();
/**
* Determines whether this object supports an interface with the given Slice type ID.
* @param id The fully-scoped Slice type ID.
* @param current The Current object for the invocation.
* @return True if this object supports the interface, false, otherwise.
*/
virtual bool ice_isA(const ::std::string& id, const ::Ice::Current& current = ::Ice::emptyCurrent) const;
/**
* Obtains a list of the Slice type IDs representing the interfaces supported by this object.
* @param current The Current object for the invocation.
* @return A list of fully-scoped type IDs.
*/
virtual ::std::vector< ::std::string> ice_ids(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
/**
* Obtains a Slice type ID representing the most-derived interface supported by this object.
* @param current The Current object for the invocation.
* @return A fully-scoped type ID.
*/
virtual const ::std::string& ice_id(const ::Ice::Current& current = ::Ice::emptyCurrent) const;
/**
* Obtains the Slice type ID corresponding to this class.
* @return A fully-scoped type ID.
*/
static const ::std::string& ice_staticId();
virtual void printString(const ::std::string& s, const ::Ice::Current& current = ::Ice::emptyCurrent) = 0;
/// \cond INTERNAL
bool _iceD_printString(::IceInternal::Incoming&, const ::Ice::Current&);
/// \endcond
/// \cond INTERNAL
virtual bool _iceDispatch(::IceInternal::Incoming&, const ::Ice::Current&);
/// \endcond
protected:
/// \cond STREAM
virtual void _iceWriteImpl(::Ice::OutputStream*) const;
virtual void _iceReadImpl(::Ice::InputStream*);
/// \endcond
};
/// \cond INTERNAL
inline bool operator==(const Printer& lhs, const Printer& rhs)
{
return static_cast<const ::Ice::Object&>(lhs) == static_cast<const ::Ice::Object&>(rhs);
}
inline bool operator<(const Printer& lhs, const Printer& rhs)
{
return static_cast<const ::Ice::Object&>(lhs) < static_cast<const ::Ice::Object&>(rhs);
}
/// \endcond
}
/// \cond STREAM
namespace Ice
{
}
/// \endcond
namespace Demo
{
/**
* Type-safe asynchronous callback wrapper class used for calls to
* IceProxy::Demo::Printer::begin_printString.
* Create a wrapper instance by calling ::Demo::newCallback_Printer_printString.
*/
template<class T>
class CallbackNC_Printer_printString : public Callback_Printer_printString_Base, public ::IceInternal::OnewayCallbackNC<T>
{
public:
typedef IceUtil::Handle<T> TPtr;
typedef void (T::*Exception)(const ::Ice::Exception&);
typedef void (T::*Sent)(bool);
typedef void (T::*Response)();
CallbackNC_Printer_printString(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
: ::IceInternal::OnewayCallbackNC<T>(obj, cb, excb, sentcb)
{
}
};
/**
* Creates a callback wrapper instance that delegates to your object.
* @param instance The callback object.
* @param cb The success method of the callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T> Callback_Printer_printStringPtr
newCallback_Printer_printString(const IceUtil::Handle<T>& instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
return new CallbackNC_Printer_printString<T>(instance, cb, excb, sentcb);
}
/**
* Creates a callback wrapper instance that delegates to your object.
* @param instance The callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T> Callback_Printer_printStringPtr
newCallback_Printer_printString(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
return new CallbackNC_Printer_printString<T>(instance, 0, excb, sentcb);
}
/**
* Creates a callback wrapper instance that delegates to your object.
* @param instance The callback object.
* @param cb The success method of the callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T> Callback_Printer_printStringPtr
newCallback_Printer_printString(T* instance, void (T::*cb)(), void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
return new CallbackNC_Printer_printString<T>(instance, cb, excb, sentcb);
}
/**
* Creates a callback wrapper instance that delegates to your object.
* @param instance The callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T> Callback_Printer_printStringPtr
newCallback_Printer_printString(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
{
return new CallbackNC_Printer_printString<T>(instance, 0, excb, sentcb);
}
/**
* Type-safe asynchronous callback wrapper class with cookie support used for calls to
* IceProxy::Demo::Printer::begin_printString.
* Create a wrapper instance by calling ::Demo::newCallback_Printer_printString.
*/
template<class T, typename CT>
class Callback_Printer_printString : public Callback_Printer_printString_Base, public ::IceInternal::OnewayCallback<T, CT>
{
public:
typedef IceUtil::Handle<T> TPtr;
typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
typedef void (T::*Sent)(bool , const CT&);
typedef void (T::*Response)(const CT&);
Callback_Printer_printString(const TPtr& obj, Response cb, Exception excb, Sent sentcb)
: ::IceInternal::OnewayCallback<T, CT>(obj, cb, excb, sentcb)
{
}
};
/**
* Creates a callback wrapper instance that delegates to your object.
* Use this overload when your callback methods receive a cookie value.
* @param instance The callback object.
* @param cb The success method of the callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T, typename CT> Callback_Printer_printStringPtr
newCallback_Printer_printString(const IceUtil::Handle<T>& instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
return new Callback_Printer_printString<T, CT>(instance, cb, excb, sentcb);
}
/**
* Creates a callback wrapper instance that delegates to your object.
* Use this overload when your callback methods receive a cookie value.
* @param instance The callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T, typename CT> Callback_Printer_printStringPtr
newCallback_Printer_printString(const IceUtil::Handle<T>& instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
return new Callback_Printer_printString<T, CT>(instance, 0, excb, sentcb);
}
/**
* Creates a callback wrapper instance that delegates to your object.
* Use this overload when your callback methods receive a cookie value.
* @param instance The callback object.
* @param cb The success method of the callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T, typename CT> Callback_Printer_printStringPtr
newCallback_Printer_printString(T* instance, void (T::*cb)(const CT&), void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
return new Callback_Printer_printString<T, CT>(instance, cb, excb, sentcb);
}
/**
* Creates a callback wrapper instance that delegates to your object.
* Use this overload when your callback methods receive a cookie value.
* @param instance The callback object.
* @param excb The exception method of the callback object.
* @param sentcb The sent method of the callback object.
* @return An object that can be passed to an asynchronous invocation of IceProxy::Demo::Printer::begin_printString.
*/
template<class T, typename CT> Callback_Printer_printStringPtr
newCallback_Printer_printString(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&), void (T::*sentcb)(bool, const CT&) = 0)
{
return new Callback_Printer_printString<T, CT>(instance, 0, excb, sentcb);
}
}
#endif
#include <IceUtil/PopDisableWarnings.h>
#endif

BIN
src/Printer.o View File


BIN
src/Server.o View File


BIN
src/server View File


Loading…
Cancel
Save