【文件属性】:
文件名称:google开源C++项目
文件大小:6.53MB
文件格式:RAR
更新时间:2011-10-02 13:06:55
google
这是Google的开源项目,
部分代码做证明
#ifndef GOOGLE_PROTOBUF_SERVICE_H__
#define GOOGLE_PROTOBUF_SERVICE_H__
#include
#include
namespace google {
namespace protobuf {
// Defined in this file.
class Service;
class RpcController;
class RpcChannel;
// Defined in other files.
class Descriptor; // descriptor.h
class ServiceDescriptor; // descriptor.h
class MethodDescriptor; // descriptor.h
class Message; // message.h
// Abstract base interface for protocol-buffer-based RPC services. Services
// themselves are abstract interfaces (implemented either by servers or as
// stubs), but they subclass this base interface. The methods of this
// interface can be used to call the methods of the Service without knowing
// its exact type at compile time (analogous to Message::Reflection).
class LIBPROTOBUF_EXPORT Service {
public:
inline Service() {}
virtual ~Service();
// When constructing a stub, you may pass STUB_OWNS_CHANNEL as the second
// parameter to the constructor to tell it to delete its RpcChannel when
// destroyed.
enum ChannelOwnership {
STUB_OWNS_CHANNEL,
STUB_DOESNT_OWN_CHANNEL
};