![]() |
Imt.Base C++ API V4.1.1.0
|
Classes that implement this interface provide a generic mechanism to exchange data with a remoting peer. More...
#include <Imt.Base.Lib.Remoting/inc/Imt.Base.Lib.Remoting/RemoteObjectIfc.h>
Public Member Functions | |
| virtual int32_t | getUniqueId () const =0 |
| Gets the unique id of this remote object. | |
| virtual bool | send ()=0 |
| Sends this remote object. | |
| virtual void | onReceive (::imt::base::core::serialization::Deserializer &buffer)=0 |
| Will be called when data has been received. | |
| virtual void | attach (int32_t const uniqueId)=0 |
| Attaches this remote object to remoting service. | |
| virtual void | detach ()=0 |
| Detaches this remote object from remoting service. | |
Public Member Functions inherited from imt::base::core::serialization::SerializableIfc | |
| virtual void | deserialize (Deserializer &buffer)=0 |
| Deserialize this object from the given deserialize. | |
| virtual void | serialize (Serializer &buffer) const =0 |
| Serialize this object into the given serializer. | |
Static Public Attributes | |
| static constexpr int32_t | UNDEFINED_ID {-1} |
| ID to indicate no or an invalid remote object. | |
Protected Member Functions | |
| RemoteObjectIfc () noexcept=default | |
| RemoteObjectIfc (RemoteObjectIfc const &) noexcept=default | |
| RemoteObjectIfc (RemoteObjectIfc &&) noexcept=default | |
| ~RemoteObjectIfc () noexcept=default | |
| RemoteObjectIfc & | operator= (RemoteObjectIfc const &) &noexcept=default |
| RemoteObjectIfc & | operator= (RemoteObjectIfc &&) &noexcept=default |
Protected Member Functions inherited from imt::base::core::serialization::SerializableIfc | |
| SerializableIfc () noexcept=default | |
| SerializableIfc (SerializableIfc const &) noexcept=default | |
| SerializableIfc (SerializableIfc &&) noexcept=default | |
| ~SerializableIfc () noexcept=default | |
| SerializableIfc & | operator= (SerializableIfc const &) &noexcept=default |
| SerializableIfc & | operator= (SerializableIfc &&) &noexcept=default |
Classes that implement this interface provide a generic mechanism to exchange data with a remoting peer.
Each RemoteObjectIfc implementation has a unique id, that is inserted in the byte stream sent to the remoting peer, that allows to identify the responsible remote object on the other side. The data send / received is handled in the serialize and deserialize methods.
This interface can be used to keep ownership of a remote object and delete it at the end of its lifetime.
Definition at line 25 of file RemoteObjectIfc.h.
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
pure virtual |
Attaches this remote object to remoting service.
When attaching this object, a unique id must be provided.
| uniqueId | A unique for this remote object |
Implemented in imt::base::lib::remoting::RemoteObjectAbs.
|
pure virtual |
Detaches this remote object from remoting service.
Implemented in imt::base::lib::remoting::RemoteObjectAbs.
|
pure virtual |
Gets the unique id of this remote object.
Implemented in imt::base::lib::remoting::RemoteObjectAbs.
|
pure virtual |
Will be called when data has been received.
| buffer | The deserialize containing the data |
Implemented in imt::base::lib::remoting::RemoteObjectAbs.
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
pure virtual |
Sends this remote object.
Implemented in imt::base::lib::remoting::RemoteObjectAbs.
|
staticconstexpr |
ID to indicate no or an invalid remote object.
Definition at line 32 of file RemoteObjectIfc.h.