mirror of
https://github.com/logos-co/logos-view-module.git
synced 2026-08-31 06:51:08 +00:00
19 lines
824 B
Plaintext
19 lines
824 B
Plaintext
// Auto-generated by logos_module(REP_FILE ...) — DO NOT EDIT.
|
|||
|
|
#include "LogosViewPluginBase.h"
|
||
|
|
#include "rep_@LOGOS_REP_BASE@_source.h"
|
||
|
|
|
||
|
|
#include <QRemoteObjectHost>
|
||
|
|
|
||
|
|
bool @LOGOS_REP_CLASS@ViewPluginBase::enableRemoting(QRemoteObjectHostBase* host)
|
||
|
|
{
|
||
|
|
if (!host || !m_backend) return false;
|
||
|
|
// The backend must inherit @LOGOS_REP_CLASS@SimpleSource (which the rep
|
||
|
|
// compiler generates from @LOGOS_REP_BASE@.rep). Using the templated
|
||
|
|
// enableRemoting<@LOGOS_REP_CLASS@SourceAPI> overload publishes the
|
||
|
|
// typed source signature so typed replicas on the client side reach the
|
||
|
|
// Valid state and start receiving property updates.
|
||
|
|
auto* src = qobject_cast<@LOGOS_REP_CLASS@SimpleSource*>(m_backend);
|
||
|
|
if (!src) return false;
|
||
|
|
return host->enableRemoting<@LOGOS_REP_CLASS@SourceAPI>(src);
|
||
|
|
}
|