1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-10-05 19:18:01 +08:00
ULib/include/ulib/xml/soap/soap_gen_method.h
stefanocasazza eb39e7643a sync
2016-07-12 16:11:57 +02:00

67 lines
1.8 KiB
C++

// ============================================================================
//
// = LIBRARY
// ULib - c++ library
//
// = FILENAME
// soap_gen_method.h
//
// = AUTHOR
// Stefano Casazza
//
// ============================================================================
#ifndef ULIB_SOAP_GENERIC_METHOD_H
#define ULIB_SOAP_GENERIC_METHOD_H 1
#include <ulib/net/rpc/rpc_object.h>
#include <ulib/xml/soap/soap_fault.h>
#include <ulib/xml/soap/soap_encoder.h>
#include <ulib/net/rpc/rpc_gen_method.h>
class U_EXPORT USOAPGenericMethod : public URPCGenericMethod {
public:
USOAPGenericMethod(const UString& n, const UString& _ns, UCommand* cmd, int rtype) : URPCGenericMethod(n, _ns, cmd, rtype)
{
U_TRACE_REGISTER_OBJECT(0, USOAPGenericMethod, "%V,%V,%p,%d", n.rep, _ns.rep, cmd, rtype)
}
virtual ~USOAPGenericMethod()
{
U_TRACE_UNREGISTER_OBJECT(0, USOAPGenericMethod)
}
// VIRTUAL METHOD
virtual void encode() U_DECL_OVERRIDE;
// DEBUG
#if defined(U_STDCPP_ENABLE) && defined(DEBUG)
const char* dump(bool reset) const { return USOAPGenericMethod::dump(reset); }
#endif
protected:
// Triggers the creation of the USOAPFault
virtual void setFailed()
{
U_TRACE_NO_PARAM(0, "USOAPGenericMethod::setFailed()")
U_NEW(USOAPFault, pFault, USOAPFault);
}
private:
#ifdef U_COMPILER_DELETE_MEMBERS
USOAPGenericMethod(const USOAPGenericMethod& g) = delete;
USOAPGenericMethod& operator=(const USOAPGenericMethod& g) = delete;
#else
USOAPGenericMethod(const USOAPGenericMethod& g) : URPCGenericMethod(UString::getStringNull(), UString::getStringNull(), 0, 0) {}
USOAPGenericMethod& operator=(const USOAPGenericMethod& g) { return *this; }
#endif
};
#endif