ADTF
Loading...
Searching...
No Matches
Example Demo Interface Source

Description

Shows how to create an interface client.

Prebuilt Binaries

Source Code

./examples/demo_adtfplugins/demo_interface_source/

Streaming Source

demo_interface_source.h

#pragma once
#include <print_intf.h>
#ifndef ADTF_EXAMPLES_CID
#define ADTF_EXAMPLES_CID ".local.cid"
#endif
class cInterfaceSource final : public adtf::filter::cSampleStreamingSource
{
private:
public:
ADTF_CLASS_ID_NAME(cInterfaceSource,
"demo_interface_printer.streaming_source" ADTF_EXAMPLES_CID,
"Demo Interface Printer");
public:
cInterfaceSource();
~cInterfaceSource() override;
};
#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
Definition class_id.h:33
Definition sample_streaming_source.h:50
Definition object_ptr.h:384

demo_interface_source.cpp

#include "demo_interface_source.h"
using namespace adtf::ucom;
using namespace adtf::filter;
ADTF_PLUGIN("Demo Interface Printer",
cInterfaceSource);
cInterfaceSource::cInterfaceSource()
{
m_pPrinter = make_object_ptr<cPrinter>();
CreateInterfaceServer<IPrintInterface>("printer_server", m_pPrinter);
SetDescription("printer_server", "Interface server to provide access to function for printing");
// sets a short description for the component
SetDescription("Use this streaming source to provide a server for a printer Interface (e.g. used by 'Demo Interface Binding', see Filters");
// set help link to jump to documentation from ADTF Configuration Editor
SetHelpLink("$(ADTF_DIR)/doc/html/page_demo_interface_printer.html");
}
cInterfaceSource::~cInterfaceSource() = default;
#define ADTF_PLUGIN(__plugin_identifier,...)
Definition adtf_plugin.h:29
Namespace for the ADTF Filter SDK.
Definition configurable_runner.h:18
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
object_ptr< Implementation > make_object_ptr(Args &&... args)
Alias always bringing the latest version of ant::make_object_ptr() into scope.
Definition object_ptr_utilities.h:129