CppWAMP
C++11 client library for the WAMP protocol
wamp::ScopedRegistration Class Reference

Limits a Registration's lifetime to a particular scope. More...

#include <cppwamp/registration.hpp>

Inheritance diagram for wamp::ScopedRegistration:

Public Member Functions

 ScopedRegistration ()
 Default constructs an empty ScopedRegistration.
 
 ScopedRegistration (ScopedRegistration &&other) noexcept
 Move constructor.
 
 ScopedRegistration (Registration registration)
 Converting constructor taking a Registration object to manage.
 
 ~ScopedRegistration ()
 Destructor which automatically unsubscribes the subscription.
 
ScopedRegistrationoperator= (ScopedRegistration &&other) noexcept
 Move assignment.
 
ScopedRegistrationoperator= (Registration subscription)
 Assigns another Regisration to manage. More...
 
void release ()
 Releases the registration so that it will no longer be automatically unregistered if the ScopedRegistration is destroyed or reassigned.
 
 ScopedRegistration (const ScopedRegistration &)=delete
 Non-copyable.
 
ScopedRegistrationoperator= (const ScopedRegistration &)=delete
 Non-copyable.
 
- Public Member Functions inherited from wamp::Registration
 Registration ()
 Constructs an empty registration. More...
 
 Registration (const Registration &other)
 Copy constructor.
 
 Registration (Registration &&other) noexcept
 Move constructor. More...
 
 operator bool () const
 Returns false if the registration is empty.
 
RegistrationId id () const
 Obtains the ID number of this registration.
 
Registrationoperator= (const Registration &other)
 Copy assignment.
 
Registrationoperator= (Registration &&other) noexcept
 Move assignment. More...
 
void unregister () const
 Unregisters the RPC.
 

Detailed Description

Limits a Registration's lifetime to a particular scope.

See also
Scoped Registrations
Registration, Session::enroll
Examples
examples/chat/main.cpp.

Member Function Documentation

◆ operator=()

ScopedRegistration & wamp::ScopedRegistration::operator= ( Registration  subscription)

Assigns another Regisration to manage.

The old registration is automatically unregistered.


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