|
forb
|
The class from which any automatically generated stub will inherit. More...
#include <base_stub.hpp>
Public Types | |
| using | buffer_size_t = forb::streams::shared_memory::size_t |
| The type of the buffer size. | |
Public Member Functions | |
| virtual | ~base_stub () noexcept=default |
| Virtual destructor. | |
| base_stub (const base_stub &other)=delete | |
| This class does not support copy construction. | |
| base_stub & | operator= (const base_stub &other)=delete |
| This class does not support copy assignment. | |
| base_stub (base_stub &&other)=delete | |
| This class does not support move construction. | |
| base_stub & | operator= (base_stub &&other)=delete |
| This class does not support move assignment. | |
| shared_memory::size_t | buffer_size () const |
| The size of the buffer within the shared memory (if shared memory is adopted as data exchange stream). More... | |
Protected Member Functions | |
| base_stub ()=default | |
| Default constructor, creates an empty stub handle. More... | |
| void | init_call (call_id_t code) |
| Initializes a new call request. | |
| void | wait_return () |
| Waits the termination of the call request. More... | |
| virtual bool | _match (const std::string &type) const =0 |
| Returns true of the type string equals the fully qualified name of the given stub class. | |
| virtual remote_var | _create_empty () const =0 |
| Creates a new empty stub object of the current type. | |
Static Protected Member Functions | |
| static std::vector< base_stub * > & | _protos () |
| Returns a reference to the vector of prototypes of all known stub implementations. | |
Protected Attributes | |
| std::mutex | _mutex |
| The mutex that avoids concurrent call requests using the same stub handle. | |
| stream * | rpcstream = nullptr |
| The pointer to the stream that will be used to make call requests. More... | |
| stream * | datastream = nullptr |
| The pointer to the stream that will be used to exchange data. More... | |
Friends | |
| class | remote_registry |
| The forb::remote_registry class will be able to call private methods of this class, to instantiate correctly new instances. More... | |
The class from which any automatically generated stub will inherit.
|
explicitprotecteddefault |
Default constructor, creates an empty stub handle.
The optional argument is the size of the buffer within the shared memory area (if shared memory is used).
|
inline |
The size of the buffer within the shared memory (if shared memory is adopted as data exchange stream).
|
protected |
Waits the termination of the call request.
Actually this method waits the remote host to read all incoming parameters, not to actually perform the call. This way, signal-like paradigm calls are supported efficiently.
|
friend |
The forb::remote_registry class will be able to call private methods of this class, to instantiate correctly new instances.
|
protected |
The pointer to the stream that will be used to exchange data.
This may point either to _socket or to _shmem attributes.
|
protected |
The pointer to the stream that will be used to make call requests.
In this implementation this is always pointing to _socket attribute.
1.8.12