LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT > Class Template Reference

#include "llvm/ExecutionEngine/Orc/RPCUtils.h"

Inheritance diagram for llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >:
Collaboration graph
[legend]

Public Member Functions

 SingleThreadedRPCEndpoint (ChannelT &C, bool LazyAutoNegotiation)
 
template<typename Func , typename HandlerT >
void addHandler (HandlerT Handler)
 
template<typename Func , typename ClassT , typename RetT , typename... ArgTs>
void addHandler (ClassT &Object, RetT(ClassT::*Method)(ArgTs...))
 
template<typename Func , typename HandlerT >
void addAsyncHandler (HandlerT Handler)
 
template<typename Func , typename ClassT , typename RetT , typename... ArgTs>
void addAsyncHandler (ClassT &Object, RetT(ClassT::*Method)(ArgTs...))
 Add a class-method as a handler. More...
 
template<typename Func , typename... ArgTs, typename AltRetT = typename Func::ReturnType>
detail::ResultTraits< AltRetT >::ErrorReturnType callB (const ArgTs &... Args)
 
- Public Member Functions inherited from llvm::orc::rpc::detail::RPCEndpointBase< SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT >
 RPCEndpointBase (ChannelT &C, bool LazyAutoNegotiation)
 Construct an RPC instance on a channel. More...
 
Error negotiateFunction (bool Retry=false)
 Negotiate a function id for Func with the other end of the channel. More...
 
Error appendCallAsync (HandlerT Handler, const ArgTs &... Args)
 Append a call Func, does not call send on the channel. More...
 
Error sendAppendedCalls ()
 
Error callAsync (HandlerT Handler, const ArgTs &... Args)
 
Error handleOne ()
 Handle one incoming call. More...
 
void abandonPendingResponses ()
 Abandon all outstanding result handlers. More...
 
void removeHandler ()
 Remove the handler for the given function. More...
 
void clearHandlers ()
 Clear all handlers. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::orc::rpc::detail::RPCEndpointBase< SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT >
**static detail::ReadArgs< ArgTs... > readArgs (ArgTs &... Args)
 Helper for handling setter procedures - this method returns a functor that sets the variables referred to by Args... More...
 
- Protected Types inherited from llvm::orc::rpc::detail::RPCEndpointBase< SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT >
using WrappedHandlerFn = std::function< Error(ChannelT &, SequenceNumberT)>
 
- Protected Member Functions inherited from llvm::orc::rpc::detail::RPCEndpointBase< SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT >
FunctionIdT getInvalidFunctionId () const
 
void addHandlerImpl (HandlerT Handler)
 Add the given handler to the handler map and make it available for autonegotiation and execution. More...
 
void addAsyncHandlerImpl (HandlerT Handler)
 
Error handleResponse (SequenceNumberT SeqNo)
 
FunctionIdT handleNegotiate (const std::string &Name)
 
Expected< FunctionIdT > getRemoteFunctionId (bool NegotiateIfNotInMap, bool NegotiateIfInvalid)
 
WrappedHandlerFn wrapHandler (HandlerT Handler)
 
WrappedHandlerFn wrapAsyncHandler (HandlerT Handler)
 
- Protected Attributes inherited from llvm::orc::rpc::detail::RPCEndpointBase< SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT >
ChannelT & C
 
bool LazyAutoNegotiation
 
RPCFunctionIdAllocator< FunctionIdT > FnIdAllocator
 
FunctionIdT ResponseId
 
std::map< std::string, FunctionIdT > LocalFunctionIds
 
std::map< const char *, FunctionIdT > RemoteFunctionIds
 
std::map< FunctionIdT, WrappedHandlerFnHandlers
 
std::mutex ResponsesMutex
 
detail::SequenceNumberManager< SequenceNumberT > SequenceNumberMgr
 
std::map< SequenceNumberT, std::unique_ptr< detail::ResponseHandler< ChannelT > > > PendingResponses
 

Detailed Description

template<typename ChannelT, typename FunctionIdT = uint32_t, typename SequenceNumberT = uint32_t>
class llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >

Definition at line 1540 of file RPCUtils.h.

Constructor & Destructor Documentation

◆ SingleThreadedRPCEndpoint()

template<typename ChannelT, typename FunctionIdT = uint32_t, typename SequenceNumberT = uint32_t>
llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::SingleThreadedRPCEndpoint ( ChannelT &  C,
bool  LazyAutoNegotiation 
)
inline

Definition at line 1551 of file RPCUtils.h.

Member Function Documentation

◆ addAsyncHandler() [1/2]

template<typename ChannelT, typename FunctionIdT = uint32_t, typename SequenceNumberT = uint32_t>
template<typename Func , typename HandlerT >
void llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::addAsyncHandler ( HandlerT  Handler)
inline

Definition at line 1566 of file RPCUtils.h.

◆ addAsyncHandler() [2/2]

template<typename ChannelT, typename FunctionIdT = uint32_t, typename SequenceNumberT = uint32_t>
template<typename Func , typename ClassT , typename RetT , typename... ArgTs>
void llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::addAsyncHandler ( ClassT &  Object,
RetT(ClassT::*)(ArgTs...)  Method 
)
inline

Add a class-method as a handler.

Definition at line 1572 of file RPCUtils.h.

◆ addHandler() [1/2]

template<typename ChannelT, typename FunctionIdT = uint32_t, typename SequenceNumberT = uint32_t>
template<typename Func , typename HandlerT >
void llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::addHandler ( HandlerT  Handler)
inline

Definition at line 1555 of file RPCUtils.h.

◆ addHandler() [2/2]

template<typename ChannelT, typename FunctionIdT = uint32_t, typename SequenceNumberT = uint32_t>
template<typename Func , typename ClassT , typename RetT , typename... ArgTs>
void llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::addHandler ( ClassT &  Object,
RetT(ClassT::*)(ArgTs...)  Method 
)
inline

Definition at line 1560 of file RPCUtils.h.

◆ callB()

template<typename ChannelT, typename FunctionIdT = uint32_t, typename SequenceNumberT = uint32_t>
template<typename Func , typename... ArgTs, typename AltRetT = typename Func::ReturnType>
detail::ResultTraits<AltRetT>::ErrorReturnType llvm::orc::rpc::SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::callB ( const ArgTs &...  Args)
inline

Definition at line 1580 of file RPCUtils.h.


The documentation for this class was generated from the following file: