Commit 708d3dee authored by BlackAngle233's avatar BlackAngle233
Browse files

update final design

parent 1444629e
fileFormatVersion: 2
guid: 44c9ba743dc35844b964af85fa3c5aac
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_CLOUDRECOGNIZER_HXX__
#define __EASYAR_CLOUDRECOGNIZER_HXX__
#include "easyar/types.hxx"
namespace easyar {
class CloudRecognizationResult
{
protected:
easyar_CloudRecognizationResult * cdata_ ;
void init_cdata(easyar_CloudRecognizationResult * cdata);
virtual CloudRecognizationResult & operator=(const CloudRecognizationResult & data) { return *this; } //deleted
public:
CloudRecognizationResult(easyar_CloudRecognizationResult * cdata);
virtual ~CloudRecognizationResult();
CloudRecognizationResult(const CloudRecognizationResult & data);
const easyar_CloudRecognizationResult * get_cdata() const;
easyar_CloudRecognizationResult * get_cdata();
/// <summary>
/// Returns recognition status.
/// </summary>
CloudRecognizationStatus getStatus();
/// <summary>
/// Returns the recognized target when status is FoundTarget.
/// </summary>
void getTarget(/* OUT */ ImageTarget * * Return);
/// <summary>
/// Returns the error message when status is UnknownError.
/// </summary>
void getUnknownErrorMessage(/* OUT */ String * * Return);
};
/// <summary>
/// CloudRecognizer implements cloud recognition. It can only be used after created a recognition image library on the cloud. Please refer to EasyAR CRS documentation.
/// When the component is not needed anymore, call close function to close it. It shall not be used after calling close.
/// Before using a CloudRecognizer, an `ImageTracker`_ must be setup and prepared. Any target returned from cloud should be manually put into the `ImageTracker`_ using `ImageTracker.loadTarget`_ if it need to be tracked. Then the target can be used as same as a local target after loaded into the tracker. When a target is recognized, you can get it from callback, and you should use target uid to distinguish different targets. The target runtimeID is dynamically created and cannot be used as unique identifier in the cloud situation.
/// </summary>
class CloudRecognizer
{
protected:
easyar_CloudRecognizer * cdata_ ;
void init_cdata(easyar_CloudRecognizer * cdata);
virtual CloudRecognizer & operator=(const CloudRecognizer & data) { return *this; } //deleted
public:
CloudRecognizer(easyar_CloudRecognizer * cdata);
virtual ~CloudRecognizer();
CloudRecognizer(const CloudRecognizer & data);
const easyar_CloudRecognizer * get_cdata() const;
easyar_CloudRecognizer * get_cdata();
/// <summary>
/// Returns true.
/// </summary>
static bool isAvailable();
/// <summary>
/// Creates an instance and connects to the server.
/// </summary>
static void create(String * cloudRecognitionServiceServerAddress, String * apiKey, String * apiSecret, String * cloudRecognitionServiceAppId, /* OUT */ CloudRecognizer * * Return);
/// <summary>
/// Creates an instance and connects to the server with Cloud Secret.
/// </summary>
static void createByCloudSecret(String * cloudRecognitionServiceServerAddress, String * cloudRecognitionServiceSecret, String * cloudRecognitionServiceAppId, /* OUT */ CloudRecognizer * * Return);
/// <summary>
/// Send recognition request. The lowest available request interval is 300ms.
/// </summary>
void resolve(InputFrame * inputFrame, CallbackScheduler * callbackScheduler, FunctorOfVoidFromCloudRecognizationResult callback);
/// <summary>
/// Stops the recognition and closes connection. The component shall not be used after calling close.
/// </summary>
void close();
};
#ifndef __EASYAR_OPTIONALOFIMAGETARGET__
#define __EASYAR_OPTIONALOFIMAGETARGET__
struct OptionalOfImageTarget
{
bool has_value;
ImageTarget * value;
};
static inline easyar_OptionalOfImageTarget OptionalOfImageTarget_to_c(ImageTarget * o);
#endif
#ifndef __EASYAR_OPTIONALOFSTRING__
#define __EASYAR_OPTIONALOFSTRING__
struct OptionalOfString
{
bool has_value;
String * value;
};
static inline easyar_OptionalOfString OptionalOfString_to_c(String * o);
#endif
#ifndef __EASYAR_FUNCTOROFVOIDFROMCLOUDRECOGNIZATIONRESULT__
#define __EASYAR_FUNCTOROFVOIDFROMCLOUDRECOGNIZATIONRESULT__
struct FunctorOfVoidFromCloudRecognizationResult
{
void * _state;
void (* func)(void * _state, CloudRecognizationResult *);
void (* destroy)(void * _state);
FunctorOfVoidFromCloudRecognizationResult(void * _state, void (* func)(void * _state, CloudRecognizationResult *), void (* destroy)(void * _state));
};
static void FunctorOfVoidFromCloudRecognizationResult_func(void * _state, easyar_CloudRecognizationResult *, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoidFromCloudRecognizationResult_destroy(void * _state);
static inline easyar_FunctorOfVoidFromCloudRecognizationResult FunctorOfVoidFromCloudRecognizationResult_to_c(FunctorOfVoidFromCloudRecognizationResult f);
#endif
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_CLOUDRECOGNIZER_HXX__
#define __IMPLEMENTATION_EASYAR_CLOUDRECOGNIZER_HXX__
#include "easyar/cloudrecognizer.h"
#include "easyar/imagetarget.hxx"
#include "easyar/target.hxx"
#include "easyar/image.hxx"
#include "easyar/buffer.hxx"
#include "easyar/frame.hxx"
#include "easyar/cameraparameters.hxx"
#include "easyar/vector.hxx"
#include "easyar/matrix.hxx"
#include "easyar/callbackscheduler.hxx"
namespace easyar {
inline CloudRecognizationResult::CloudRecognizationResult(easyar_CloudRecognizationResult * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline CloudRecognizationResult::~CloudRecognizationResult()
{
if (cdata_) {
easyar_CloudRecognizationResult__dtor(cdata_);
cdata_ = NULL;
}
}
inline CloudRecognizationResult::CloudRecognizationResult(const CloudRecognizationResult & data)
:
cdata_(NULL)
{
easyar_CloudRecognizationResult * cdata = NULL;
easyar_CloudRecognizationResult__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_CloudRecognizationResult * CloudRecognizationResult::get_cdata() const
{
return cdata_;
}
inline easyar_CloudRecognizationResult * CloudRecognizationResult::get_cdata()
{
return cdata_;
}
inline void CloudRecognizationResult::init_cdata(easyar_CloudRecognizationResult * cdata)
{
cdata_ = cdata;
}
inline CloudRecognizationStatus CloudRecognizationResult::getStatus()
{
if (cdata_ == NULL) {
return CloudRecognizationStatus();
}
easyar_CloudRecognizationStatus _return_value_ = easyar_CloudRecognizationResult_getStatus(cdata_);
return static_cast<CloudRecognizationStatus>(_return_value_);
}
inline void CloudRecognizationResult::getTarget(/* OUT */ ImageTarget * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OptionalOfImageTarget _return_value_ = {false, NULL};
easyar_CloudRecognizationResult_getTarget(cdata_, &_return_value_);
*Return = (_return_value_.has_value ? new ImageTarget(_return_value_.value) : NULL);
}
inline void CloudRecognizationResult::getUnknownErrorMessage(/* OUT */ String * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OptionalOfString _return_value_ = {false, NULL};
easyar_CloudRecognizationResult_getUnknownErrorMessage(cdata_, &_return_value_);
*Return = (_return_value_.has_value ? new String(_return_value_.value) : NULL);
}
inline CloudRecognizer::CloudRecognizer(easyar_CloudRecognizer * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline CloudRecognizer::~CloudRecognizer()
{
if (cdata_) {
easyar_CloudRecognizer__dtor(cdata_);
cdata_ = NULL;
}
}
inline CloudRecognizer::CloudRecognizer(const CloudRecognizer & data)
:
cdata_(NULL)
{
easyar_CloudRecognizer * cdata = NULL;
easyar_CloudRecognizer__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_CloudRecognizer * CloudRecognizer::get_cdata() const
{
return cdata_;
}
inline easyar_CloudRecognizer * CloudRecognizer::get_cdata()
{
return cdata_;
}
inline void CloudRecognizer::init_cdata(easyar_CloudRecognizer * cdata)
{
cdata_ = cdata;
}
inline bool CloudRecognizer::isAvailable()
{
bool _return_value_ = easyar_CloudRecognizer_isAvailable();
return _return_value_;
}
inline void CloudRecognizer::create(String * arg0, String * arg1, String * arg2, String * arg3, /* OUT */ CloudRecognizer * * Return)
{
easyar_CloudRecognizer * _return_value_ = NULL;
easyar_CloudRecognizer_create(arg0->get_cdata(), arg1->get_cdata(), arg2->get_cdata(), arg3->get_cdata(), &_return_value_);
*Return = new CloudRecognizer(_return_value_);
}
inline void CloudRecognizer::createByCloudSecret(String * arg0, String * arg1, String * arg2, /* OUT */ CloudRecognizer * * Return)
{
easyar_CloudRecognizer * _return_value_ = NULL;
easyar_CloudRecognizer_createByCloudSecret(arg0->get_cdata(), arg1->get_cdata(), arg2->get_cdata(), &_return_value_);
*Return = new CloudRecognizer(_return_value_);
}
inline void CloudRecognizer::resolve(InputFrame * arg0, CallbackScheduler * arg1, FunctorOfVoidFromCloudRecognizationResult arg2)
{
if (cdata_ == NULL) {
return;
}
easyar_CloudRecognizer_resolve(cdata_, arg0->get_cdata(), arg1->get_cdata(), FunctorOfVoidFromCloudRecognizationResult_to_c(arg2));
}
inline void CloudRecognizer::close()
{
if (cdata_ == NULL) {
return;
}
easyar_CloudRecognizer_close(cdata_);
}
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFIMAGETARGET__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFIMAGETARGET__
static inline easyar_OptionalOfImageTarget OptionalOfImageTarget_to_c(ImageTarget * o)
{
if (o != NULL) {
easyar_OptionalOfImageTarget _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfImageTarget _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFSTRING__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFSTRING__
static inline easyar_OptionalOfString OptionalOfString_to_c(String * o)
{
if (o != NULL) {
easyar_OptionalOfString _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfString _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMCLOUDRECOGNIZATIONRESULT__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMCLOUDRECOGNIZATIONRESULT__
inline FunctorOfVoidFromCloudRecognizationResult::FunctorOfVoidFromCloudRecognizationResult(void * _state, void (* func)(void * _state, CloudRecognizationResult *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoidFromCloudRecognizationResult_func(void * _state, easyar_CloudRecognizationResult * arg0, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
easyar_CloudRecognizationResult__retain(arg0, &arg0);
CloudRecognizationResult * cpparg0 = new CloudRecognizationResult(arg0);
FunctorOfVoidFromCloudRecognizationResult * f = reinterpret_cast<FunctorOfVoidFromCloudRecognizationResult *>(_state);
f->func(f->_state, cpparg0);
delete cpparg0;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoidFromCloudRecognizationResult_destroy(void * _state)
{
FunctorOfVoidFromCloudRecognizationResult * f = reinterpret_cast<FunctorOfVoidFromCloudRecognizationResult *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoidFromCloudRecognizationResult FunctorOfVoidFromCloudRecognizationResult_to_c(FunctorOfVoidFromCloudRecognizationResult f)
{
easyar_FunctorOfVoidFromCloudRecognizationResult _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoidFromCloudRecognizationResult(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoidFromCloudRecognizationResult_func;
_return_value_.destroy = FunctorOfVoidFromCloudRecognizationResult_destroy;
return _return_value_;
}
#endif
}
#endif
fileFormatVersion: 2
guid: e6dc2db321752eb48ad0bed7d2ee5ef9
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
@interface easyar_CloudRecognizationResult : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Returns recognition status.
/// </summary>
- (easyar_CloudRecognizationStatus)getStatus;
/// <summary>
/// Returns the recognized target when status is FoundTarget.
/// </summary>
- (easyar_ImageTarget *)getTarget;
/// <summary>
/// Returns the error message when status is UnknownError.
/// </summary>
- (NSString *)getUnknownErrorMessage;
@end
/// <summary>
/// CloudRecognizer implements cloud recognition. It can only be used after created a recognition image library on the cloud. Please refer to EasyAR CRS documentation.
/// When the component is not needed anymore, call close function to close it. It shall not be used after calling close.
/// Before using a CloudRecognizer, an `ImageTracker`_ must be setup and prepared. Any target returned from cloud should be manually put into the `ImageTracker`_ using `ImageTracker.loadTarget`_ if it need to be tracked. Then the target can be used as same as a local target after loaded into the tracker. When a target is recognized, you can get it from callback, and you should use target uid to distinguish different targets. The target runtimeID is dynamically created and cannot be used as unique identifier in the cloud situation.
/// </summary>
@interface easyar_CloudRecognizer : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Returns true.
/// </summary>
+ (bool)isAvailable;
/// <summary>
/// Creates an instance and connects to the server.
/// </summary>
+ (easyar_CloudRecognizer *)create:(NSString *)cloudRecognitionServiceServerAddress apiKey:(NSString *)apiKey apiSecret:(NSString *)apiSecret cloudRecognitionServiceAppId:(NSString *)cloudRecognitionServiceAppId;
/// <summary>
/// Creates an instance and connects to the server with Cloud Secret.
/// </summary>
+ (easyar_CloudRecognizer *)createByCloudSecret:(NSString *)cloudRecognitionServiceServerAddress cloudRecognitionServiceSecret:(NSString *)cloudRecognitionServiceSecret cloudRecognitionServiceAppId:(NSString *)cloudRecognitionServiceAppId;
/// <summary>
/// Send recognition request. The lowest available request interval is 300ms.
/// </summary>
- (void)resolve:(easyar_InputFrame *)inputFrame callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler callback:(void (^)(easyar_CloudRecognizationResult * result))callback;
/// <summary>
/// Stops the recognition and closes connection. The component shall not be used after calling close.
/// </summary>
- (void)close;
@end
fileFormatVersion: 2
guid: 25867eec2a1c57340b466e6862ad1ea5
timeCreated: 1611716671
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_DATAFLOW_H__
#define __EASYAR_DATAFLOW_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Input data.
/// </summary>
void easyar_SignalSink_handle(easyar_SignalSink * This);
void easyar_SignalSink__dtor(easyar_SignalSink * This);
void easyar_SignalSink__retain(const easyar_SignalSink * This, /* OUT */ easyar_SignalSink * * Return);
const char * easyar_SignalSink__typeName(const easyar_SignalSink * This);
/// <summary>
/// Sets data handler.
/// </summary>
void easyar_SignalSource_setHandler(easyar_SignalSource * This, easyar_OptionalOfFunctorOfVoid handler);
/// <summary>
/// Connects to input port.
/// </summary>
void easyar_SignalSource_connect(easyar_SignalSource * This, easyar_SignalSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void easyar_SignalSource_disconnect(easyar_SignalSource * This);
void easyar_SignalSource__dtor(easyar_SignalSource * This);
void easyar_SignalSource__retain(const easyar_SignalSource * This, /* OUT */ easyar_SignalSource * * Return);
const char * easyar_SignalSource__typeName(const easyar_SignalSource * This);
/// <summary>
/// Input data.
/// </summary>
void easyar_InputFrameSink_handle(easyar_InputFrameSink * This, easyar_InputFrame * inputData);
void easyar_InputFrameSink__dtor(easyar_InputFrameSink * This);
void easyar_InputFrameSink__retain(const easyar_InputFrameSink * This, /* OUT */ easyar_InputFrameSink * * Return);
const char * easyar_InputFrameSink__typeName(const easyar_InputFrameSink * This);
/// <summary>
/// Sets data handler.
/// </summary>
void easyar_InputFrameSource_setHandler(easyar_InputFrameSource * This, easyar_OptionalOfFunctorOfVoidFromInputFrame handler);
/// <summary>
/// Connects to input port.
/// </summary>
void easyar_InputFrameSource_connect(easyar_InputFrameSource * This, easyar_InputFrameSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void easyar_InputFrameSource_disconnect(easyar_InputFrameSource * This);
void easyar_InputFrameSource__dtor(easyar_InputFrameSource * This);
void easyar_InputFrameSource__retain(const easyar_InputFrameSource * This, /* OUT */ easyar_InputFrameSource * * Return);
const char * easyar_InputFrameSource__typeName(const easyar_InputFrameSource * This);
/// <summary>
/// Input data.
/// </summary>
void easyar_OutputFrameSink_handle(easyar_OutputFrameSink * This, easyar_OutputFrame * inputData);
void easyar_OutputFrameSink__dtor(easyar_OutputFrameSink * This);
void easyar_OutputFrameSink__retain(const easyar_OutputFrameSink * This, /* OUT */ easyar_OutputFrameSink * * Return);
const char * easyar_OutputFrameSink__typeName(const easyar_OutputFrameSink * This);
/// <summary>
/// Sets data handler.
/// </summary>
void easyar_OutputFrameSource_setHandler(easyar_OutputFrameSource * This, easyar_OptionalOfFunctorOfVoidFromOutputFrame handler);
/// <summary>
/// Connects to input port.
/// </summary>
void easyar_OutputFrameSource_connect(easyar_OutputFrameSource * This, easyar_OutputFrameSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void easyar_OutputFrameSource_disconnect(easyar_OutputFrameSource * This);
void easyar_OutputFrameSource__dtor(easyar_OutputFrameSource * This);
void easyar_OutputFrameSource__retain(const easyar_OutputFrameSource * This, /* OUT */ easyar_OutputFrameSource * * Return);
const char * easyar_OutputFrameSource__typeName(const easyar_OutputFrameSource * This);
/// <summary>
/// Input data.
/// </summary>
void easyar_FeedbackFrameSink_handle(easyar_FeedbackFrameSink * This, easyar_FeedbackFrame * inputData);
void easyar_FeedbackFrameSink__dtor(easyar_FeedbackFrameSink * This);
void easyar_FeedbackFrameSink__retain(const easyar_FeedbackFrameSink * This, /* OUT */ easyar_FeedbackFrameSink * * Return);
const char * easyar_FeedbackFrameSink__typeName(const easyar_FeedbackFrameSink * This);
/// <summary>
/// Sets data handler.
/// </summary>
void easyar_FeedbackFrameSource_setHandler(easyar_FeedbackFrameSource * This, easyar_OptionalOfFunctorOfVoidFromFeedbackFrame handler);
/// <summary>
/// Connects to input port.
/// </summary>
void easyar_FeedbackFrameSource_connect(easyar_FeedbackFrameSource * This, easyar_FeedbackFrameSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void easyar_FeedbackFrameSource_disconnect(easyar_FeedbackFrameSource * This);
void easyar_FeedbackFrameSource__dtor(easyar_FeedbackFrameSource * This);
void easyar_FeedbackFrameSource__retain(const easyar_FeedbackFrameSource * This, /* OUT */ easyar_FeedbackFrameSource * * Return);
const char * easyar_FeedbackFrameSource__typeName(const easyar_FeedbackFrameSource * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_InputFrameFork_input(easyar_InputFrameFork * This, /* OUT */ easyar_InputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void easyar_InputFrameFork_output(easyar_InputFrameFork * This, int index, /* OUT */ easyar_InputFrameSource * * Return);
/// <summary>
/// Output count.
/// </summary>
int easyar_InputFrameFork_outputCount(easyar_InputFrameFork * This);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_InputFrameFork_create(int outputCount, /* OUT */ easyar_InputFrameFork * * Return);
void easyar_InputFrameFork__dtor(easyar_InputFrameFork * This);
void easyar_InputFrameFork__retain(const easyar_InputFrameFork * This, /* OUT */ easyar_InputFrameFork * * Return);
const char * easyar_InputFrameFork__typeName(const easyar_InputFrameFork * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_OutputFrameFork_input(easyar_OutputFrameFork * This, /* OUT */ easyar_OutputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void easyar_OutputFrameFork_output(easyar_OutputFrameFork * This, int index, /* OUT */ easyar_OutputFrameSource * * Return);
/// <summary>
/// Output count.
/// </summary>
int easyar_OutputFrameFork_outputCount(easyar_OutputFrameFork * This);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_OutputFrameFork_create(int outputCount, /* OUT */ easyar_OutputFrameFork * * Return);
void easyar_OutputFrameFork__dtor(easyar_OutputFrameFork * This);
void easyar_OutputFrameFork__retain(const easyar_OutputFrameFork * This, /* OUT */ easyar_OutputFrameFork * * Return);
const char * easyar_OutputFrameFork__typeName(const easyar_OutputFrameFork * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_OutputFrameJoin_input(easyar_OutputFrameJoin * This, int index, /* OUT */ easyar_OutputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void easyar_OutputFrameJoin_output(easyar_OutputFrameJoin * This, /* OUT */ easyar_OutputFrameSource * * Return);
/// <summary>
/// Input count.
/// </summary>
int easyar_OutputFrameJoin_inputCount(easyar_OutputFrameJoin * This);
/// <summary>
/// Creates an instance. The default joiner will be used, which takes input frame from the first input and first result or null of each input. The first result of every input will be placed at the corresponding input index of results of the final output frame.
/// </summary>
void easyar_OutputFrameJoin_create(int inputCount, /* OUT */ easyar_OutputFrameJoin * * Return);
/// <summary>
/// Creates an instance. A custom joiner is specified.
/// </summary>
void easyar_OutputFrameJoin_createWithJoiner(int inputCount, easyar_FunctorOfOutputFrameFromListOfOutputFrame joiner, /* OUT */ easyar_OutputFrameJoin * * Return);
void easyar_OutputFrameJoin__dtor(easyar_OutputFrameJoin * This);
void easyar_OutputFrameJoin__retain(const easyar_OutputFrameJoin * This, /* OUT */ easyar_OutputFrameJoin * * Return);
const char * easyar_OutputFrameJoin__typeName(const easyar_OutputFrameJoin * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_FeedbackFrameFork_input(easyar_FeedbackFrameFork * This, /* OUT */ easyar_FeedbackFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void easyar_FeedbackFrameFork_output(easyar_FeedbackFrameFork * This, int index, /* OUT */ easyar_FeedbackFrameSource * * Return);
/// <summary>
/// Output count.
/// </summary>
int easyar_FeedbackFrameFork_outputCount(easyar_FeedbackFrameFork * This);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_FeedbackFrameFork_create(int outputCount, /* OUT */ easyar_FeedbackFrameFork * * Return);
void easyar_FeedbackFrameFork__dtor(easyar_FeedbackFrameFork * This);
void easyar_FeedbackFrameFork__retain(const easyar_FeedbackFrameFork * This, /* OUT */ easyar_FeedbackFrameFork * * Return);
const char * easyar_FeedbackFrameFork__typeName(const easyar_FeedbackFrameFork * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_InputFrameThrottler_input(easyar_InputFrameThrottler * This, /* OUT */ easyar_InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int easyar_InputFrameThrottler_bufferRequirement(easyar_InputFrameThrottler * This);
/// <summary>
/// Output port.
/// </summary>
void easyar_InputFrameThrottler_output(easyar_InputFrameThrottler * This, /* OUT */ easyar_InputFrameSource * * Return);
/// <summary>
/// Input port for clearance signal.
/// </summary>
void easyar_InputFrameThrottler_signalInput(easyar_InputFrameThrottler * This, /* OUT */ easyar_SignalSink * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_InputFrameThrottler_create(/* OUT */ easyar_InputFrameThrottler * * Return);
void easyar_InputFrameThrottler__dtor(easyar_InputFrameThrottler * This);
void easyar_InputFrameThrottler__retain(const easyar_InputFrameThrottler * This, /* OUT */ easyar_InputFrameThrottler * * Return);
const char * easyar_InputFrameThrottler__typeName(const easyar_InputFrameThrottler * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_OutputFrameBuffer_input(easyar_OutputFrameBuffer * This, /* OUT */ easyar_OutputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int easyar_OutputFrameBuffer_bufferRequirement(easyar_OutputFrameBuffer * This);
/// <summary>
/// Output port for frame arrival. It can be connected to `InputFrameThrottler.signalInput`_ .
/// </summary>
void easyar_OutputFrameBuffer_signalOutput(easyar_OutputFrameBuffer * This, /* OUT */ easyar_SignalSource * * Return);
/// <summary>
/// Fetches the most recent `OutputFrame`_ .
/// </summary>
void easyar_OutputFrameBuffer_peek(easyar_OutputFrameBuffer * This, /* OUT */ easyar_OptionalOfOutputFrame * Return);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_OutputFrameBuffer_create(/* OUT */ easyar_OutputFrameBuffer * * Return);
/// <summary>
/// Pauses output of `OutputFrame`_ . After execution, all results of `OutputFrameBuffer.peek`_ will be empty. `OutputFrameBuffer.signalOutput`_ is not affected.
/// </summary>
void easyar_OutputFrameBuffer_pause(easyar_OutputFrameBuffer * This);
/// <summary>
/// Resumes output of `OutputFrame`_ .
/// </summary>
void easyar_OutputFrameBuffer_resume(easyar_OutputFrameBuffer * This);
void easyar_OutputFrameBuffer__dtor(easyar_OutputFrameBuffer * This);
void easyar_OutputFrameBuffer__retain(const easyar_OutputFrameBuffer * This, /* OUT */ easyar_OutputFrameBuffer * * Return);
const char * easyar_OutputFrameBuffer__typeName(const easyar_OutputFrameBuffer * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_InputFrameToOutputFrameAdapter_input(easyar_InputFrameToOutputFrameAdapter * This, /* OUT */ easyar_InputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void easyar_InputFrameToOutputFrameAdapter_output(easyar_InputFrameToOutputFrameAdapter * This, /* OUT */ easyar_OutputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_InputFrameToOutputFrameAdapter_create(/* OUT */ easyar_InputFrameToOutputFrameAdapter * * Return);
void easyar_InputFrameToOutputFrameAdapter__dtor(easyar_InputFrameToOutputFrameAdapter * This);
void easyar_InputFrameToOutputFrameAdapter__retain(const easyar_InputFrameToOutputFrameAdapter * This, /* OUT */ easyar_InputFrameToOutputFrameAdapter * * Return);
const char * easyar_InputFrameToOutputFrameAdapter__typeName(const easyar_InputFrameToOutputFrameAdapter * This);
/// <summary>
/// Input port.
/// </summary>
void easyar_InputFrameToFeedbackFrameAdapter_input(easyar_InputFrameToFeedbackFrameAdapter * This, /* OUT */ easyar_InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int easyar_InputFrameToFeedbackFrameAdapter_bufferRequirement(easyar_InputFrameToFeedbackFrameAdapter * This);
/// <summary>
/// Side input port for historic output frame input.
/// </summary>
void easyar_InputFrameToFeedbackFrameAdapter_sideInput(easyar_InputFrameToFeedbackFrameAdapter * This, /* OUT */ easyar_OutputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void easyar_InputFrameToFeedbackFrameAdapter_output(easyar_InputFrameToFeedbackFrameAdapter * This, /* OUT */ easyar_FeedbackFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
void easyar_InputFrameToFeedbackFrameAdapter_create(/* OUT */ easyar_InputFrameToFeedbackFrameAdapter * * Return);
void easyar_InputFrameToFeedbackFrameAdapter__dtor(easyar_InputFrameToFeedbackFrameAdapter * This);
void easyar_InputFrameToFeedbackFrameAdapter__retain(const easyar_InputFrameToFeedbackFrameAdapter * This, /* OUT */ easyar_InputFrameToFeedbackFrameAdapter * * Return);
const char * easyar_InputFrameToFeedbackFrameAdapter__typeName(const easyar_InputFrameToFeedbackFrameAdapter * This);
void easyar_ListOfOutputFrame__ctor(easyar_OutputFrame * const * begin, easyar_OutputFrame * const * end, /* OUT */ easyar_ListOfOutputFrame * * Return);
void easyar_ListOfOutputFrame__dtor(easyar_ListOfOutputFrame * This);
void easyar_ListOfOutputFrame_copy(const easyar_ListOfOutputFrame * This, /* OUT */ easyar_ListOfOutputFrame * * Return);
int easyar_ListOfOutputFrame_size(const easyar_ListOfOutputFrame * This);
easyar_OutputFrame * easyar_ListOfOutputFrame_at(const easyar_ListOfOutputFrame * This, int index);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 879f8b2a919e6e249bbac9ccd76114a2
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_DATAFLOW_HXX__
#define __EASYAR_DATAFLOW_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// Signal input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
class SignalSink
{
protected:
easyar_SignalSink * cdata_ ;
void init_cdata(easyar_SignalSink * cdata);
virtual SignalSink & operator=(const SignalSink & data) { return *this; } //deleted
public:
SignalSink(easyar_SignalSink * cdata);
virtual ~SignalSink();
SignalSink(const SignalSink & data);
const easyar_SignalSink * get_cdata() const;
easyar_SignalSink * get_cdata();
/// <summary>
/// Input data.
/// </summary>
void handle();
};
/// <summary>
/// Signal output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
class SignalSource
{
protected:
easyar_SignalSource * cdata_ ;
void init_cdata(easyar_SignalSource * cdata);
virtual SignalSource & operator=(const SignalSource & data) { return *this; } //deleted
public:
SignalSource(easyar_SignalSource * cdata);
virtual ~SignalSource();
SignalSource(const SignalSource & data);
const easyar_SignalSource * get_cdata() const;
easyar_SignalSource * get_cdata();
/// <summary>
/// Sets data handler.
/// </summary>
void setHandler(OptionalOfFunctorOfVoid handler);
/// <summary>
/// Connects to input port.
/// </summary>
void connect(SignalSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void disconnect();
};
/// <summary>
/// Input frame input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
class InputFrameSink
{
protected:
easyar_InputFrameSink * cdata_ ;
void init_cdata(easyar_InputFrameSink * cdata);
virtual InputFrameSink & operator=(const InputFrameSink & data) { return *this; } //deleted
public:
InputFrameSink(easyar_InputFrameSink * cdata);
virtual ~InputFrameSink();
InputFrameSink(const InputFrameSink & data);
const easyar_InputFrameSink * get_cdata() const;
easyar_InputFrameSink * get_cdata();
/// <summary>
/// Input data.
/// </summary>
void handle(InputFrame * inputData);
};
/// <summary>
/// Input frame output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
class InputFrameSource
{
protected:
easyar_InputFrameSource * cdata_ ;
void init_cdata(easyar_InputFrameSource * cdata);
virtual InputFrameSource & operator=(const InputFrameSource & data) { return *this; } //deleted
public:
InputFrameSource(easyar_InputFrameSource * cdata);
virtual ~InputFrameSource();
InputFrameSource(const InputFrameSource & data);
const easyar_InputFrameSource * get_cdata() const;
easyar_InputFrameSource * get_cdata();
/// <summary>
/// Sets data handler.
/// </summary>
void setHandler(OptionalOfFunctorOfVoidFromInputFrame handler);
/// <summary>
/// Connects to input port.
/// </summary>
void connect(InputFrameSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void disconnect();
};
/// <summary>
/// Output frame input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
class OutputFrameSink
{
protected:
easyar_OutputFrameSink * cdata_ ;
void init_cdata(easyar_OutputFrameSink * cdata);
virtual OutputFrameSink & operator=(const OutputFrameSink & data) { return *this; } //deleted
public:
OutputFrameSink(easyar_OutputFrameSink * cdata);
virtual ~OutputFrameSink();
OutputFrameSink(const OutputFrameSink & data);
const easyar_OutputFrameSink * get_cdata() const;
easyar_OutputFrameSink * get_cdata();
/// <summary>
/// Input data.
/// </summary>
void handle(OutputFrame * inputData);
};
/// <summary>
/// Output frame output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
class OutputFrameSource
{
protected:
easyar_OutputFrameSource * cdata_ ;
void init_cdata(easyar_OutputFrameSource * cdata);
virtual OutputFrameSource & operator=(const OutputFrameSource & data) { return *this; } //deleted
public:
OutputFrameSource(easyar_OutputFrameSource * cdata);
virtual ~OutputFrameSource();
OutputFrameSource(const OutputFrameSource & data);
const easyar_OutputFrameSource * get_cdata() const;
easyar_OutputFrameSource * get_cdata();
/// <summary>
/// Sets data handler.
/// </summary>
void setHandler(OptionalOfFunctorOfVoidFromOutputFrame handler);
/// <summary>
/// Connects to input port.
/// </summary>
void connect(OutputFrameSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void disconnect();
};
/// <summary>
/// Feedback frame input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
class FeedbackFrameSink
{
protected:
easyar_FeedbackFrameSink * cdata_ ;
void init_cdata(easyar_FeedbackFrameSink * cdata);
virtual FeedbackFrameSink & operator=(const FeedbackFrameSink & data) { return *this; } //deleted
public:
FeedbackFrameSink(easyar_FeedbackFrameSink * cdata);
virtual ~FeedbackFrameSink();
FeedbackFrameSink(const FeedbackFrameSink & data);
const easyar_FeedbackFrameSink * get_cdata() const;
easyar_FeedbackFrameSink * get_cdata();
/// <summary>
/// Input data.
/// </summary>
void handle(FeedbackFrame * inputData);
};
/// <summary>
/// Feedback frame output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
class FeedbackFrameSource
{
protected:
easyar_FeedbackFrameSource * cdata_ ;
void init_cdata(easyar_FeedbackFrameSource * cdata);
virtual FeedbackFrameSource & operator=(const FeedbackFrameSource & data) { return *this; } //deleted
public:
FeedbackFrameSource(easyar_FeedbackFrameSource * cdata);
virtual ~FeedbackFrameSource();
FeedbackFrameSource(const FeedbackFrameSource & data);
const easyar_FeedbackFrameSource * get_cdata() const;
easyar_FeedbackFrameSource * get_cdata();
/// <summary>
/// Sets data handler.
/// </summary>
void setHandler(OptionalOfFunctorOfVoidFromFeedbackFrame handler);
/// <summary>
/// Connects to input port.
/// </summary>
void connect(FeedbackFrameSink * sink);
/// <summary>
/// Disconnects.
/// </summary>
void disconnect();
};
/// <summary>
/// Input frame fork.
/// It is used to branch and transfer input frame to multiple components in parallel.
/// All members of this class is thread-safe.
/// </summary>
class InputFrameFork
{
protected:
easyar_InputFrameFork * cdata_ ;
void init_cdata(easyar_InputFrameFork * cdata);
virtual InputFrameFork & operator=(const InputFrameFork & data) { return *this; } //deleted
public:
InputFrameFork(easyar_InputFrameFork * cdata);
virtual ~InputFrameFork();
InputFrameFork(const InputFrameFork & data);
const easyar_InputFrameFork * get_cdata() const;
easyar_InputFrameFork * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ InputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void output(int index, /* OUT */ InputFrameSource * * Return);
/// <summary>
/// Output count.
/// </summary>
int outputCount();
/// <summary>
/// Creates an instance.
/// </summary>
static void create(int outputCount, /* OUT */ InputFrameFork * * Return);
};
/// <summary>
/// Output frame fork.
/// It is used to branch and transfer output frame to multiple components in parallel.
/// All members of this class is thread-safe.
/// </summary>
class OutputFrameFork
{
protected:
easyar_OutputFrameFork * cdata_ ;
void init_cdata(easyar_OutputFrameFork * cdata);
virtual OutputFrameFork & operator=(const OutputFrameFork & data) { return *this; } //deleted
public:
OutputFrameFork(easyar_OutputFrameFork * cdata);
virtual ~OutputFrameFork();
OutputFrameFork(const OutputFrameFork & data);
const easyar_OutputFrameFork * get_cdata() const;
easyar_OutputFrameFork * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ OutputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void output(int index, /* OUT */ OutputFrameSource * * Return);
/// <summary>
/// Output count.
/// </summary>
int outputCount();
/// <summary>
/// Creates an instance.
/// </summary>
static void create(int outputCount, /* OUT */ OutputFrameFork * * Return);
};
/// <summary>
/// Output frame join.
/// It is used to aggregate output frame from multiple components in parallel.
/// All members of this class is thread-safe.
/// It shall be noticed that connections and disconnections to the inputs shall not be performed during the flowing of data, or it may stuck in a state that no frame can be output. (It is recommended to complete dataflow connection before start a camera.)
/// </summary>
class OutputFrameJoin
{
protected:
easyar_OutputFrameJoin * cdata_ ;
void init_cdata(easyar_OutputFrameJoin * cdata);
virtual OutputFrameJoin & operator=(const OutputFrameJoin & data) { return *this; } //deleted
public:
OutputFrameJoin(easyar_OutputFrameJoin * cdata);
virtual ~OutputFrameJoin();
OutputFrameJoin(const OutputFrameJoin & data);
const easyar_OutputFrameJoin * get_cdata() const;
easyar_OutputFrameJoin * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(int index, /* OUT */ OutputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void output(/* OUT */ OutputFrameSource * * Return);
/// <summary>
/// Input count.
/// </summary>
int inputCount();
/// <summary>
/// Creates an instance. The default joiner will be used, which takes input frame from the first input and first result or null of each input. The first result of every input will be placed at the corresponding input index of results of the final output frame.
/// </summary>
static void create(int inputCount, /* OUT */ OutputFrameJoin * * Return);
/// <summary>
/// Creates an instance. A custom joiner is specified.
/// </summary>
static void createWithJoiner(int inputCount, FunctorOfOutputFrameFromListOfOutputFrame joiner, /* OUT */ OutputFrameJoin * * Return);
};
/// <summary>
/// Feedback frame fork.
/// It is used to branch and transfer feedback frame to multiple components in parallel.
/// All members of this class is thread-safe.
/// </summary>
class FeedbackFrameFork
{
protected:
easyar_FeedbackFrameFork * cdata_ ;
void init_cdata(easyar_FeedbackFrameFork * cdata);
virtual FeedbackFrameFork & operator=(const FeedbackFrameFork & data) { return *this; } //deleted
public:
FeedbackFrameFork(easyar_FeedbackFrameFork * cdata);
virtual ~FeedbackFrameFork();
FeedbackFrameFork(const FeedbackFrameFork & data);
const easyar_FeedbackFrameFork * get_cdata() const;
easyar_FeedbackFrameFork * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ FeedbackFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void output(int index, /* OUT */ FeedbackFrameSource * * Return);
/// <summary>
/// Output count.
/// </summary>
int outputCount();
/// <summary>
/// Creates an instance.
/// </summary>
static void create(int outputCount, /* OUT */ FeedbackFrameFork * * Return);
};
/// <summary>
/// Input frame throttler.
/// There is a input frame input port and a input frame output port. It can be used to prevent incoming frames from entering algorithm components when they have not finished handling previous workload.
/// InputFrameThrottler occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// It shall be noticed that connections and disconnections to signalInput shall not be performed during the flowing of data, or it may stuck in a state that no frame can be output. (It is recommended to complete dataflow connection before start a camera.)
/// </summary>
class InputFrameThrottler
{
protected:
easyar_InputFrameThrottler * cdata_ ;
void init_cdata(easyar_InputFrameThrottler * cdata);
virtual InputFrameThrottler & operator=(const InputFrameThrottler & data) { return *this; } //deleted
public:
InputFrameThrottler(easyar_InputFrameThrottler * cdata);
virtual ~InputFrameThrottler();
InputFrameThrottler(const InputFrameThrottler & data);
const easyar_InputFrameThrottler * get_cdata() const;
easyar_InputFrameThrottler * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int bufferRequirement();
/// <summary>
/// Output port.
/// </summary>
void output(/* OUT */ InputFrameSource * * Return);
/// <summary>
/// Input port for clearance signal.
/// </summary>
void signalInput(/* OUT */ SignalSink * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ InputFrameThrottler * * Return);
};
/// <summary>
/// Output frame buffer.
/// There is an output frame input port and output frame fetching function. It can be used to convert output frame fetching from asynchronous pattern to synchronous polling pattern, which fits frame by frame rendering.
/// OutputFrameBuffer occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
class OutputFrameBuffer
{
protected:
easyar_OutputFrameBuffer * cdata_ ;
void init_cdata(easyar_OutputFrameBuffer * cdata);
virtual OutputFrameBuffer & operator=(const OutputFrameBuffer & data) { return *this; } //deleted
public:
OutputFrameBuffer(easyar_OutputFrameBuffer * cdata);
virtual ~OutputFrameBuffer();
OutputFrameBuffer(const OutputFrameBuffer & data);
const easyar_OutputFrameBuffer * get_cdata() const;
easyar_OutputFrameBuffer * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ OutputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int bufferRequirement();
/// <summary>
/// Output port for frame arrival. It can be connected to `InputFrameThrottler.signalInput`_ .
/// </summary>
void signalOutput(/* OUT */ SignalSource * * Return);
/// <summary>
/// Fetches the most recent `OutputFrame`_ .
/// </summary>
void peek(/* OUT */ OutputFrame * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ OutputFrameBuffer * * Return);
/// <summary>
/// Pauses output of `OutputFrame`_ . After execution, all results of `OutputFrameBuffer.peek`_ will be empty. `OutputFrameBuffer.signalOutput`_ is not affected.
/// </summary>
void pause();
/// <summary>
/// Resumes output of `OutputFrame`_ .
/// </summary>
void resume();
};
/// <summary>
/// Input frame to output frame adapter.
/// There is an input frame input port and an output frame output port. It can be used to wrap an input frame into an output frame, which can be used for rendering without an algorithm component. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
class InputFrameToOutputFrameAdapter
{
protected:
easyar_InputFrameToOutputFrameAdapter * cdata_ ;
void init_cdata(easyar_InputFrameToOutputFrameAdapter * cdata);
virtual InputFrameToOutputFrameAdapter & operator=(const InputFrameToOutputFrameAdapter & data) { return *this; } //deleted
public:
InputFrameToOutputFrameAdapter(easyar_InputFrameToOutputFrameAdapter * cdata);
virtual ~InputFrameToOutputFrameAdapter();
InputFrameToOutputFrameAdapter(const InputFrameToOutputFrameAdapter & data);
const easyar_InputFrameToOutputFrameAdapter * get_cdata() const;
easyar_InputFrameToOutputFrameAdapter * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ InputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void output(/* OUT */ OutputFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ InputFrameToOutputFrameAdapter * * Return);
};
/// <summary>
/// Input frame to feedback frame adapter.
/// There is an input frame input port, a historic output frame input port and a feedback frame output port. It can be used to combine an input frame and a historic output frame into a feedback frame, which is required by algorithm components such as `ImageTracker`_ .
/// On every input of an input frame, a feedback frame is generated with a previously input historic feedback frame. If there is no previously input historic feedback frame, it is null in the feedback frame.
/// InputFrameToFeedbackFrameAdapter occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
class InputFrameToFeedbackFrameAdapter
{
protected:
easyar_InputFrameToFeedbackFrameAdapter * cdata_ ;
void init_cdata(easyar_InputFrameToFeedbackFrameAdapter * cdata);
virtual InputFrameToFeedbackFrameAdapter & operator=(const InputFrameToFeedbackFrameAdapter & data) { return *this; } //deleted
public:
InputFrameToFeedbackFrameAdapter(easyar_InputFrameToFeedbackFrameAdapter * cdata);
virtual ~InputFrameToFeedbackFrameAdapter();
InputFrameToFeedbackFrameAdapter(const InputFrameToFeedbackFrameAdapter & data);
const easyar_InputFrameToFeedbackFrameAdapter * get_cdata() const;
easyar_InputFrameToFeedbackFrameAdapter * get_cdata();
/// <summary>
/// Input port.
/// </summary>
void input(/* OUT */ InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int bufferRequirement();
/// <summary>
/// Side input port for historic output frame input.
/// </summary>
void sideInput(/* OUT */ OutputFrameSink * * Return);
/// <summary>
/// Output port.
/// </summary>
void output(/* OUT */ FeedbackFrameSource * * Return);
/// <summary>
/// Creates an instance.
/// </summary>
static void create(/* OUT */ InputFrameToFeedbackFrameAdapter * * Return);
};
#ifndef __EASYAR_FUNCTOROFVOID__
#define __EASYAR_FUNCTOROFVOID__
struct FunctorOfVoid
{
void * _state;
void (* func)(void * _state);
void (* destroy)(void * _state);
FunctorOfVoid(void * _state, void (* func)(void * _state), void (* destroy)(void * _state));
};
static void FunctorOfVoid_func(void * _state, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoid_destroy(void * _state);
static inline easyar_FunctorOfVoid FunctorOfVoid_to_c(FunctorOfVoid f);
#endif
#ifndef __EASYAR_OPTIONALOFFUNCTOROFVOID__
#define __EASYAR_OPTIONALOFFUNCTOROFVOID__
struct OptionalOfFunctorOfVoid
{
bool has_value;
FunctorOfVoid value;
};
static inline easyar_OptionalOfFunctorOfVoid OptionalOfFunctorOfVoid_to_c(OptionalOfFunctorOfVoid o);
#endif
#ifndef __EASYAR_FUNCTOROFVOIDFROMINPUTFRAME__
#define __EASYAR_FUNCTOROFVOIDFROMINPUTFRAME__
struct FunctorOfVoidFromInputFrame
{
void * _state;
void (* func)(void * _state, InputFrame *);
void (* destroy)(void * _state);
FunctorOfVoidFromInputFrame(void * _state, void (* func)(void * _state, InputFrame *), void (* destroy)(void * _state));
};
static void FunctorOfVoidFromInputFrame_func(void * _state, easyar_InputFrame *, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoidFromInputFrame_destroy(void * _state);
static inline easyar_FunctorOfVoidFromInputFrame FunctorOfVoidFromInputFrame_to_c(FunctorOfVoidFromInputFrame f);
#endif
#ifndef __EASYAR_OPTIONALOFFUNCTOROFVOIDFROMINPUTFRAME__
#define __EASYAR_OPTIONALOFFUNCTOROFVOIDFROMINPUTFRAME__
struct OptionalOfFunctorOfVoidFromInputFrame
{
bool has_value;
FunctorOfVoidFromInputFrame value;
};
static inline easyar_OptionalOfFunctorOfVoidFromInputFrame OptionalOfFunctorOfVoidFromInputFrame_to_c(OptionalOfFunctorOfVoidFromInputFrame o);
#endif
#ifndef __EASYAR_FUNCTOROFVOIDFROMOUTPUTFRAME__
#define __EASYAR_FUNCTOROFVOIDFROMOUTPUTFRAME__
struct FunctorOfVoidFromOutputFrame
{
void * _state;
void (* func)(void * _state, OutputFrame *);
void (* destroy)(void * _state);
FunctorOfVoidFromOutputFrame(void * _state, void (* func)(void * _state, OutputFrame *), void (* destroy)(void * _state));
};
static void FunctorOfVoidFromOutputFrame_func(void * _state, easyar_OutputFrame *, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoidFromOutputFrame_destroy(void * _state);
static inline easyar_FunctorOfVoidFromOutputFrame FunctorOfVoidFromOutputFrame_to_c(FunctorOfVoidFromOutputFrame f);
#endif
#ifndef __EASYAR_OPTIONALOFFUNCTOROFVOIDFROMOUTPUTFRAME__
#define __EASYAR_OPTIONALOFFUNCTOROFVOIDFROMOUTPUTFRAME__
struct OptionalOfFunctorOfVoidFromOutputFrame
{
bool has_value;
FunctorOfVoidFromOutputFrame value;
};
static inline easyar_OptionalOfFunctorOfVoidFromOutputFrame OptionalOfFunctorOfVoidFromOutputFrame_to_c(OptionalOfFunctorOfVoidFromOutputFrame o);
#endif
#ifndef __EASYAR_FUNCTOROFVOIDFROMFEEDBACKFRAME__
#define __EASYAR_FUNCTOROFVOIDFROMFEEDBACKFRAME__
struct FunctorOfVoidFromFeedbackFrame
{
void * _state;
void (* func)(void * _state, FeedbackFrame *);
void (* destroy)(void * _state);
FunctorOfVoidFromFeedbackFrame(void * _state, void (* func)(void * _state, FeedbackFrame *), void (* destroy)(void * _state));
};
static void FunctorOfVoidFromFeedbackFrame_func(void * _state, easyar_FeedbackFrame *, /* OUT */ easyar_String * * _exception);
static void FunctorOfVoidFromFeedbackFrame_destroy(void * _state);
static inline easyar_FunctorOfVoidFromFeedbackFrame FunctorOfVoidFromFeedbackFrame_to_c(FunctorOfVoidFromFeedbackFrame f);
#endif
#ifndef __EASYAR_OPTIONALOFFUNCTOROFVOIDFROMFEEDBACKFRAME__
#define __EASYAR_OPTIONALOFFUNCTOROFVOIDFROMFEEDBACKFRAME__
struct OptionalOfFunctorOfVoidFromFeedbackFrame
{
bool has_value;
FunctorOfVoidFromFeedbackFrame value;
};
static inline easyar_OptionalOfFunctorOfVoidFromFeedbackFrame OptionalOfFunctorOfVoidFromFeedbackFrame_to_c(OptionalOfFunctorOfVoidFromFeedbackFrame o);
#endif
#ifndef __EASYAR_LISTOFOUTPUTFRAME__
#define __EASYAR_LISTOFOUTPUTFRAME__
class ListOfOutputFrame
{
private:
easyar_ListOfOutputFrame * cdata_;
virtual ListOfOutputFrame & operator=(const ListOfOutputFrame & data) { return *this; } //deleted
public:
ListOfOutputFrame(easyar_ListOfOutputFrame * cdata);
virtual ~ListOfOutputFrame();
ListOfOutputFrame(const ListOfOutputFrame & data);
const easyar_ListOfOutputFrame * get_cdata() const;
easyar_ListOfOutputFrame * get_cdata();
ListOfOutputFrame(easyar_OutputFrame * * begin, easyar_OutputFrame * * end);
int size() const;
OutputFrame * at(int index) const;
};
#endif
#ifndef __EASYAR_FUNCTOROFOUTPUTFRAMEFROMLISTOFOUTPUTFRAME__
#define __EASYAR_FUNCTOROFOUTPUTFRAMEFROMLISTOFOUTPUTFRAME__
struct FunctorOfOutputFrameFromListOfOutputFrame
{
void * _state;
void (* func)(void * _state, ListOfOutputFrame *, /* OUT */ OutputFrame * *);
void (* destroy)(void * _state);
FunctorOfOutputFrameFromListOfOutputFrame(void * _state, void (* func)(void * _state, ListOfOutputFrame *, /* OUT */ OutputFrame * *), void (* destroy)(void * _state));
};
static void FunctorOfOutputFrameFromListOfOutputFrame_func(void * _state, easyar_ListOfOutputFrame *, /* OUT */ easyar_OutputFrame * *, /* OUT */ easyar_String * * _exception);
static void FunctorOfOutputFrameFromListOfOutputFrame_destroy(void * _state);
static inline easyar_FunctorOfOutputFrameFromListOfOutputFrame FunctorOfOutputFrameFromListOfOutputFrame_to_c(FunctorOfOutputFrameFromListOfOutputFrame f);
#endif
#ifndef __EASYAR_OPTIONALOFOUTPUTFRAME__
#define __EASYAR_OPTIONALOFOUTPUTFRAME__
struct OptionalOfOutputFrame
{
bool has_value;
OutputFrame * value;
};
static inline easyar_OptionalOfOutputFrame OptionalOfOutputFrame_to_c(OutputFrame * o);
#endif
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_DATAFLOW_HXX__
#define __IMPLEMENTATION_EASYAR_DATAFLOW_HXX__
#include "easyar/dataflow.h"
#include "easyar/frame.hxx"
#include "easyar/image.hxx"
#include "easyar/buffer.hxx"
#include "easyar/cameraparameters.hxx"
#include "easyar/vector.hxx"
#include "easyar/matrix.hxx"
namespace easyar {
inline SignalSink::SignalSink(easyar_SignalSink * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline SignalSink::~SignalSink()
{
if (cdata_) {
easyar_SignalSink__dtor(cdata_);
cdata_ = NULL;
}
}
inline SignalSink::SignalSink(const SignalSink & data)
:
cdata_(NULL)
{
easyar_SignalSink * cdata = NULL;
easyar_SignalSink__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_SignalSink * SignalSink::get_cdata() const
{
return cdata_;
}
inline easyar_SignalSink * SignalSink::get_cdata()
{
return cdata_;
}
inline void SignalSink::init_cdata(easyar_SignalSink * cdata)
{
cdata_ = cdata;
}
inline void SignalSink::handle()
{
if (cdata_ == NULL) {
return;
}
easyar_SignalSink_handle(cdata_);
}
inline SignalSource::SignalSource(easyar_SignalSource * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline SignalSource::~SignalSource()
{
if (cdata_) {
easyar_SignalSource__dtor(cdata_);
cdata_ = NULL;
}
}
inline SignalSource::SignalSource(const SignalSource & data)
:
cdata_(NULL)
{
easyar_SignalSource * cdata = NULL;
easyar_SignalSource__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_SignalSource * SignalSource::get_cdata() const
{
return cdata_;
}
inline easyar_SignalSource * SignalSource::get_cdata()
{
return cdata_;
}
inline void SignalSource::init_cdata(easyar_SignalSource * cdata)
{
cdata_ = cdata;
}
inline void SignalSource::setHandler(OptionalOfFunctorOfVoid arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_SignalSource_setHandler(cdata_, OptionalOfFunctorOfVoid_to_c(arg0));
}
inline void SignalSource::connect(SignalSink * arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_SignalSource_connect(cdata_, arg0->get_cdata());
}
inline void SignalSource::disconnect()
{
if (cdata_ == NULL) {
return;
}
easyar_SignalSource_disconnect(cdata_);
}
inline InputFrameSink::InputFrameSink(easyar_InputFrameSink * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrameSink::~InputFrameSink()
{
if (cdata_) {
easyar_InputFrameSink__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrameSink::InputFrameSink(const InputFrameSink & data)
:
cdata_(NULL)
{
easyar_InputFrameSink * cdata = NULL;
easyar_InputFrameSink__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrameSink * InputFrameSink::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrameSink * InputFrameSink::get_cdata()
{
return cdata_;
}
inline void InputFrameSink::init_cdata(easyar_InputFrameSink * cdata)
{
cdata_ = cdata;
}
inline void InputFrameSink::handle(InputFrame * arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_InputFrameSink_handle(cdata_, arg0->get_cdata());
}
inline InputFrameSource::InputFrameSource(easyar_InputFrameSource * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrameSource::~InputFrameSource()
{
if (cdata_) {
easyar_InputFrameSource__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrameSource::InputFrameSource(const InputFrameSource & data)
:
cdata_(NULL)
{
easyar_InputFrameSource * cdata = NULL;
easyar_InputFrameSource__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrameSource * InputFrameSource::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrameSource * InputFrameSource::get_cdata()
{
return cdata_;
}
inline void InputFrameSource::init_cdata(easyar_InputFrameSource * cdata)
{
cdata_ = cdata;
}
inline void InputFrameSource::setHandler(OptionalOfFunctorOfVoidFromInputFrame arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_InputFrameSource_setHandler(cdata_, OptionalOfFunctorOfVoidFromInputFrame_to_c(arg0));
}
inline void InputFrameSource::connect(InputFrameSink * arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_InputFrameSource_connect(cdata_, arg0->get_cdata());
}
inline void InputFrameSource::disconnect()
{
if (cdata_ == NULL) {
return;
}
easyar_InputFrameSource_disconnect(cdata_);
}
inline OutputFrameSink::OutputFrameSink(easyar_OutputFrameSink * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline OutputFrameSink::~OutputFrameSink()
{
if (cdata_) {
easyar_OutputFrameSink__dtor(cdata_);
cdata_ = NULL;
}
}
inline OutputFrameSink::OutputFrameSink(const OutputFrameSink & data)
:
cdata_(NULL)
{
easyar_OutputFrameSink * cdata = NULL;
easyar_OutputFrameSink__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_OutputFrameSink * OutputFrameSink::get_cdata() const
{
return cdata_;
}
inline easyar_OutputFrameSink * OutputFrameSink::get_cdata()
{
return cdata_;
}
inline void OutputFrameSink::init_cdata(easyar_OutputFrameSink * cdata)
{
cdata_ = cdata;
}
inline void OutputFrameSink::handle(OutputFrame * arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_OutputFrameSink_handle(cdata_, arg0->get_cdata());
}
inline OutputFrameSource::OutputFrameSource(easyar_OutputFrameSource * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline OutputFrameSource::~OutputFrameSource()
{
if (cdata_) {
easyar_OutputFrameSource__dtor(cdata_);
cdata_ = NULL;
}
}
inline OutputFrameSource::OutputFrameSource(const OutputFrameSource & data)
:
cdata_(NULL)
{
easyar_OutputFrameSource * cdata = NULL;
easyar_OutputFrameSource__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_OutputFrameSource * OutputFrameSource::get_cdata() const
{
return cdata_;
}
inline easyar_OutputFrameSource * OutputFrameSource::get_cdata()
{
return cdata_;
}
inline void OutputFrameSource::init_cdata(easyar_OutputFrameSource * cdata)
{
cdata_ = cdata;
}
inline void OutputFrameSource::setHandler(OptionalOfFunctorOfVoidFromOutputFrame arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_OutputFrameSource_setHandler(cdata_, OptionalOfFunctorOfVoidFromOutputFrame_to_c(arg0));
}
inline void OutputFrameSource::connect(OutputFrameSink * arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_OutputFrameSource_connect(cdata_, arg0->get_cdata());
}
inline void OutputFrameSource::disconnect()
{
if (cdata_ == NULL) {
return;
}
easyar_OutputFrameSource_disconnect(cdata_);
}
inline FeedbackFrameSink::FeedbackFrameSink(easyar_FeedbackFrameSink * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline FeedbackFrameSink::~FeedbackFrameSink()
{
if (cdata_) {
easyar_FeedbackFrameSink__dtor(cdata_);
cdata_ = NULL;
}
}
inline FeedbackFrameSink::FeedbackFrameSink(const FeedbackFrameSink & data)
:
cdata_(NULL)
{
easyar_FeedbackFrameSink * cdata = NULL;
easyar_FeedbackFrameSink__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_FeedbackFrameSink * FeedbackFrameSink::get_cdata() const
{
return cdata_;
}
inline easyar_FeedbackFrameSink * FeedbackFrameSink::get_cdata()
{
return cdata_;
}
inline void FeedbackFrameSink::init_cdata(easyar_FeedbackFrameSink * cdata)
{
cdata_ = cdata;
}
inline void FeedbackFrameSink::handle(FeedbackFrame * arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_FeedbackFrameSink_handle(cdata_, arg0->get_cdata());
}
inline FeedbackFrameSource::FeedbackFrameSource(easyar_FeedbackFrameSource * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline FeedbackFrameSource::~FeedbackFrameSource()
{
if (cdata_) {
easyar_FeedbackFrameSource__dtor(cdata_);
cdata_ = NULL;
}
}
inline FeedbackFrameSource::FeedbackFrameSource(const FeedbackFrameSource & data)
:
cdata_(NULL)
{
easyar_FeedbackFrameSource * cdata = NULL;
easyar_FeedbackFrameSource__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_FeedbackFrameSource * FeedbackFrameSource::get_cdata() const
{
return cdata_;
}
inline easyar_FeedbackFrameSource * FeedbackFrameSource::get_cdata()
{
return cdata_;
}
inline void FeedbackFrameSource::init_cdata(easyar_FeedbackFrameSource * cdata)
{
cdata_ = cdata;
}
inline void FeedbackFrameSource::setHandler(OptionalOfFunctorOfVoidFromFeedbackFrame arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_FeedbackFrameSource_setHandler(cdata_, OptionalOfFunctorOfVoidFromFeedbackFrame_to_c(arg0));
}
inline void FeedbackFrameSource::connect(FeedbackFrameSink * arg0)
{
if (cdata_ == NULL) {
return;
}
easyar_FeedbackFrameSource_connect(cdata_, arg0->get_cdata());
}
inline void FeedbackFrameSource::disconnect()
{
if (cdata_ == NULL) {
return;
}
easyar_FeedbackFrameSource_disconnect(cdata_);
}
inline InputFrameFork::InputFrameFork(easyar_InputFrameFork * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrameFork::~InputFrameFork()
{
if (cdata_) {
easyar_InputFrameFork__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrameFork::InputFrameFork(const InputFrameFork & data)
:
cdata_(NULL)
{
easyar_InputFrameFork * cdata = NULL;
easyar_InputFrameFork__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrameFork * InputFrameFork::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrameFork * InputFrameFork::get_cdata()
{
return cdata_;
}
inline void InputFrameFork::init_cdata(easyar_InputFrameFork * cdata)
{
cdata_ = cdata;
}
inline void InputFrameFork::input(/* OUT */ InputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSink * _return_value_ = NULL;
easyar_InputFrameFork_input(cdata_, &_return_value_);
*Return = new InputFrameSink(_return_value_);
}
inline void InputFrameFork::output(int arg0, /* OUT */ InputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSource * _return_value_ = NULL;
easyar_InputFrameFork_output(cdata_, arg0, &_return_value_);
*Return = new InputFrameSource(_return_value_);
}
inline int InputFrameFork::outputCount()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_InputFrameFork_outputCount(cdata_);
return _return_value_;
}
inline void InputFrameFork::create(int arg0, /* OUT */ InputFrameFork * * Return)
{
easyar_InputFrameFork * _return_value_ = NULL;
easyar_InputFrameFork_create(arg0, &_return_value_);
*Return = new InputFrameFork(_return_value_);
}
inline OutputFrameFork::OutputFrameFork(easyar_OutputFrameFork * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline OutputFrameFork::~OutputFrameFork()
{
if (cdata_) {
easyar_OutputFrameFork__dtor(cdata_);
cdata_ = NULL;
}
}
inline OutputFrameFork::OutputFrameFork(const OutputFrameFork & data)
:
cdata_(NULL)
{
easyar_OutputFrameFork * cdata = NULL;
easyar_OutputFrameFork__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_OutputFrameFork * OutputFrameFork::get_cdata() const
{
return cdata_;
}
inline easyar_OutputFrameFork * OutputFrameFork::get_cdata()
{
return cdata_;
}
inline void OutputFrameFork::init_cdata(easyar_OutputFrameFork * cdata)
{
cdata_ = cdata;
}
inline void OutputFrameFork::input(/* OUT */ OutputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSink * _return_value_ = NULL;
easyar_OutputFrameFork_input(cdata_, &_return_value_);
*Return = new OutputFrameSink(_return_value_);
}
inline void OutputFrameFork::output(int arg0, /* OUT */ OutputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSource * _return_value_ = NULL;
easyar_OutputFrameFork_output(cdata_, arg0, &_return_value_);
*Return = new OutputFrameSource(_return_value_);
}
inline int OutputFrameFork::outputCount()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_OutputFrameFork_outputCount(cdata_);
return _return_value_;
}
inline void OutputFrameFork::create(int arg0, /* OUT */ OutputFrameFork * * Return)
{
easyar_OutputFrameFork * _return_value_ = NULL;
easyar_OutputFrameFork_create(arg0, &_return_value_);
*Return = new OutputFrameFork(_return_value_);
}
inline OutputFrameJoin::OutputFrameJoin(easyar_OutputFrameJoin * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline OutputFrameJoin::~OutputFrameJoin()
{
if (cdata_) {
easyar_OutputFrameJoin__dtor(cdata_);
cdata_ = NULL;
}
}
inline OutputFrameJoin::OutputFrameJoin(const OutputFrameJoin & data)
:
cdata_(NULL)
{
easyar_OutputFrameJoin * cdata = NULL;
easyar_OutputFrameJoin__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_OutputFrameJoin * OutputFrameJoin::get_cdata() const
{
return cdata_;
}
inline easyar_OutputFrameJoin * OutputFrameJoin::get_cdata()
{
return cdata_;
}
inline void OutputFrameJoin::init_cdata(easyar_OutputFrameJoin * cdata)
{
cdata_ = cdata;
}
inline void OutputFrameJoin::input(int arg0, /* OUT */ OutputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSink * _return_value_ = NULL;
easyar_OutputFrameJoin_input(cdata_, arg0, &_return_value_);
*Return = new OutputFrameSink(_return_value_);
}
inline void OutputFrameJoin::output(/* OUT */ OutputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSource * _return_value_ = NULL;
easyar_OutputFrameJoin_output(cdata_, &_return_value_);
*Return = new OutputFrameSource(_return_value_);
}
inline int OutputFrameJoin::inputCount()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_OutputFrameJoin_inputCount(cdata_);
return _return_value_;
}
inline void OutputFrameJoin::create(int arg0, /* OUT */ OutputFrameJoin * * Return)
{
easyar_OutputFrameJoin * _return_value_ = NULL;
easyar_OutputFrameJoin_create(arg0, &_return_value_);
*Return = new OutputFrameJoin(_return_value_);
}
inline void OutputFrameJoin::createWithJoiner(int arg0, FunctorOfOutputFrameFromListOfOutputFrame arg1, /* OUT */ OutputFrameJoin * * Return)
{
easyar_OutputFrameJoin * _return_value_ = NULL;
easyar_OutputFrameJoin_createWithJoiner(arg0, FunctorOfOutputFrameFromListOfOutputFrame_to_c(arg1), &_return_value_);
*Return = new OutputFrameJoin(_return_value_);
}
inline FeedbackFrameFork::FeedbackFrameFork(easyar_FeedbackFrameFork * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline FeedbackFrameFork::~FeedbackFrameFork()
{
if (cdata_) {
easyar_FeedbackFrameFork__dtor(cdata_);
cdata_ = NULL;
}
}
inline FeedbackFrameFork::FeedbackFrameFork(const FeedbackFrameFork & data)
:
cdata_(NULL)
{
easyar_FeedbackFrameFork * cdata = NULL;
easyar_FeedbackFrameFork__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_FeedbackFrameFork * FeedbackFrameFork::get_cdata() const
{
return cdata_;
}
inline easyar_FeedbackFrameFork * FeedbackFrameFork::get_cdata()
{
return cdata_;
}
inline void FeedbackFrameFork::init_cdata(easyar_FeedbackFrameFork * cdata)
{
cdata_ = cdata;
}
inline void FeedbackFrameFork::input(/* OUT */ FeedbackFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_FeedbackFrameSink * _return_value_ = NULL;
easyar_FeedbackFrameFork_input(cdata_, &_return_value_);
*Return = new FeedbackFrameSink(_return_value_);
}
inline void FeedbackFrameFork::output(int arg0, /* OUT */ FeedbackFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_FeedbackFrameSource * _return_value_ = NULL;
easyar_FeedbackFrameFork_output(cdata_, arg0, &_return_value_);
*Return = new FeedbackFrameSource(_return_value_);
}
inline int FeedbackFrameFork::outputCount()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_FeedbackFrameFork_outputCount(cdata_);
return _return_value_;
}
inline void FeedbackFrameFork::create(int arg0, /* OUT */ FeedbackFrameFork * * Return)
{
easyar_FeedbackFrameFork * _return_value_ = NULL;
easyar_FeedbackFrameFork_create(arg0, &_return_value_);
*Return = new FeedbackFrameFork(_return_value_);
}
inline InputFrameThrottler::InputFrameThrottler(easyar_InputFrameThrottler * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrameThrottler::~InputFrameThrottler()
{
if (cdata_) {
easyar_InputFrameThrottler__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrameThrottler::InputFrameThrottler(const InputFrameThrottler & data)
:
cdata_(NULL)
{
easyar_InputFrameThrottler * cdata = NULL;
easyar_InputFrameThrottler__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrameThrottler * InputFrameThrottler::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrameThrottler * InputFrameThrottler::get_cdata()
{
return cdata_;
}
inline void InputFrameThrottler::init_cdata(easyar_InputFrameThrottler * cdata)
{
cdata_ = cdata;
}
inline void InputFrameThrottler::input(/* OUT */ InputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSink * _return_value_ = NULL;
easyar_InputFrameThrottler_input(cdata_, &_return_value_);
*Return = new InputFrameSink(_return_value_);
}
inline int InputFrameThrottler::bufferRequirement()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_InputFrameThrottler_bufferRequirement(cdata_);
return _return_value_;
}
inline void InputFrameThrottler::output(/* OUT */ InputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSource * _return_value_ = NULL;
easyar_InputFrameThrottler_output(cdata_, &_return_value_);
*Return = new InputFrameSource(_return_value_);
}
inline void InputFrameThrottler::signalInput(/* OUT */ SignalSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_SignalSink * _return_value_ = NULL;
easyar_InputFrameThrottler_signalInput(cdata_, &_return_value_);
*Return = new SignalSink(_return_value_);
}
inline void InputFrameThrottler::create(/* OUT */ InputFrameThrottler * * Return)
{
easyar_InputFrameThrottler * _return_value_ = NULL;
easyar_InputFrameThrottler_create(&_return_value_);
*Return = new InputFrameThrottler(_return_value_);
}
inline OutputFrameBuffer::OutputFrameBuffer(easyar_OutputFrameBuffer * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline OutputFrameBuffer::~OutputFrameBuffer()
{
if (cdata_) {
easyar_OutputFrameBuffer__dtor(cdata_);
cdata_ = NULL;
}
}
inline OutputFrameBuffer::OutputFrameBuffer(const OutputFrameBuffer & data)
:
cdata_(NULL)
{
easyar_OutputFrameBuffer * cdata = NULL;
easyar_OutputFrameBuffer__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_OutputFrameBuffer * OutputFrameBuffer::get_cdata() const
{
return cdata_;
}
inline easyar_OutputFrameBuffer * OutputFrameBuffer::get_cdata()
{
return cdata_;
}
inline void OutputFrameBuffer::init_cdata(easyar_OutputFrameBuffer * cdata)
{
cdata_ = cdata;
}
inline void OutputFrameBuffer::input(/* OUT */ OutputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSink * _return_value_ = NULL;
easyar_OutputFrameBuffer_input(cdata_, &_return_value_);
*Return = new OutputFrameSink(_return_value_);
}
inline int OutputFrameBuffer::bufferRequirement()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_OutputFrameBuffer_bufferRequirement(cdata_);
return _return_value_;
}
inline void OutputFrameBuffer::signalOutput(/* OUT */ SignalSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_SignalSource * _return_value_ = NULL;
easyar_OutputFrameBuffer_signalOutput(cdata_, &_return_value_);
*Return = new SignalSource(_return_value_);
}
inline void OutputFrameBuffer::peek(/* OUT */ OutputFrame * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OptionalOfOutputFrame _return_value_ = {false, NULL};
easyar_OutputFrameBuffer_peek(cdata_, &_return_value_);
*Return = (_return_value_.has_value ? new OutputFrame(_return_value_.value) : NULL);
}
inline void OutputFrameBuffer::create(/* OUT */ OutputFrameBuffer * * Return)
{
easyar_OutputFrameBuffer * _return_value_ = NULL;
easyar_OutputFrameBuffer_create(&_return_value_);
*Return = new OutputFrameBuffer(_return_value_);
}
inline void OutputFrameBuffer::pause()
{
if (cdata_ == NULL) {
return;
}
easyar_OutputFrameBuffer_pause(cdata_);
}
inline void OutputFrameBuffer::resume()
{
if (cdata_ == NULL) {
return;
}
easyar_OutputFrameBuffer_resume(cdata_);
}
inline InputFrameToOutputFrameAdapter::InputFrameToOutputFrameAdapter(easyar_InputFrameToOutputFrameAdapter * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrameToOutputFrameAdapter::~InputFrameToOutputFrameAdapter()
{
if (cdata_) {
easyar_InputFrameToOutputFrameAdapter__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrameToOutputFrameAdapter::InputFrameToOutputFrameAdapter(const InputFrameToOutputFrameAdapter & data)
:
cdata_(NULL)
{
easyar_InputFrameToOutputFrameAdapter * cdata = NULL;
easyar_InputFrameToOutputFrameAdapter__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrameToOutputFrameAdapter * InputFrameToOutputFrameAdapter::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrameToOutputFrameAdapter * InputFrameToOutputFrameAdapter::get_cdata()
{
return cdata_;
}
inline void InputFrameToOutputFrameAdapter::init_cdata(easyar_InputFrameToOutputFrameAdapter * cdata)
{
cdata_ = cdata;
}
inline void InputFrameToOutputFrameAdapter::input(/* OUT */ InputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSink * _return_value_ = NULL;
easyar_InputFrameToOutputFrameAdapter_input(cdata_, &_return_value_);
*Return = new InputFrameSink(_return_value_);
}
inline void InputFrameToOutputFrameAdapter::output(/* OUT */ OutputFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSource * _return_value_ = NULL;
easyar_InputFrameToOutputFrameAdapter_output(cdata_, &_return_value_);
*Return = new OutputFrameSource(_return_value_);
}
inline void InputFrameToOutputFrameAdapter::create(/* OUT */ InputFrameToOutputFrameAdapter * * Return)
{
easyar_InputFrameToOutputFrameAdapter * _return_value_ = NULL;
easyar_InputFrameToOutputFrameAdapter_create(&_return_value_);
*Return = new InputFrameToOutputFrameAdapter(_return_value_);
}
inline InputFrameToFeedbackFrameAdapter::InputFrameToFeedbackFrameAdapter(easyar_InputFrameToFeedbackFrameAdapter * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline InputFrameToFeedbackFrameAdapter::~InputFrameToFeedbackFrameAdapter()
{
if (cdata_) {
easyar_InputFrameToFeedbackFrameAdapter__dtor(cdata_);
cdata_ = NULL;
}
}
inline InputFrameToFeedbackFrameAdapter::InputFrameToFeedbackFrameAdapter(const InputFrameToFeedbackFrameAdapter & data)
:
cdata_(NULL)
{
easyar_InputFrameToFeedbackFrameAdapter * cdata = NULL;
easyar_InputFrameToFeedbackFrameAdapter__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_InputFrameToFeedbackFrameAdapter * InputFrameToFeedbackFrameAdapter::get_cdata() const
{
return cdata_;
}
inline easyar_InputFrameToFeedbackFrameAdapter * InputFrameToFeedbackFrameAdapter::get_cdata()
{
return cdata_;
}
inline void InputFrameToFeedbackFrameAdapter::init_cdata(easyar_InputFrameToFeedbackFrameAdapter * cdata)
{
cdata_ = cdata;
}
inline void InputFrameToFeedbackFrameAdapter::input(/* OUT */ InputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSink * _return_value_ = NULL;
easyar_InputFrameToFeedbackFrameAdapter_input(cdata_, &_return_value_);
*Return = new InputFrameSink(_return_value_);
}
inline int InputFrameToFeedbackFrameAdapter::bufferRequirement()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_InputFrameToFeedbackFrameAdapter_bufferRequirement(cdata_);
return _return_value_;
}
inline void InputFrameToFeedbackFrameAdapter::sideInput(/* OUT */ OutputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_OutputFrameSink * _return_value_ = NULL;
easyar_InputFrameToFeedbackFrameAdapter_sideInput(cdata_, &_return_value_);
*Return = new OutputFrameSink(_return_value_);
}
inline void InputFrameToFeedbackFrameAdapter::output(/* OUT */ FeedbackFrameSource * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_FeedbackFrameSource * _return_value_ = NULL;
easyar_InputFrameToFeedbackFrameAdapter_output(cdata_, &_return_value_);
*Return = new FeedbackFrameSource(_return_value_);
}
inline void InputFrameToFeedbackFrameAdapter::create(/* OUT */ InputFrameToFeedbackFrameAdapter * * Return)
{
easyar_InputFrameToFeedbackFrameAdapter * _return_value_ = NULL;
easyar_InputFrameToFeedbackFrameAdapter_create(&_return_value_);
*Return = new InputFrameToFeedbackFrameAdapter(_return_value_);
}
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOID__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOID__
static inline easyar_OptionalOfFunctorOfVoid OptionalOfFunctorOfVoid_to_c(OptionalOfFunctorOfVoid o)
{
if (o.has_value) {
easyar_OptionalOfFunctorOfVoid _return_value_ = {true, FunctorOfVoid_to_c(o.value)};
return _return_value_;
} else {
easyar_OptionalOfFunctorOfVoid _return_value_ = {false, {NULL, NULL, NULL}};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOID__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOID__
inline FunctorOfVoid::FunctorOfVoid(void * _state, void (* func)(void * _state), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoid_func(void * _state, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
FunctorOfVoid * f = reinterpret_cast<FunctorOfVoid *>(_state);
f->func(f->_state);
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoid_destroy(void * _state)
{
FunctorOfVoid * f = reinterpret_cast<FunctorOfVoid *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoid FunctorOfVoid_to_c(FunctorOfVoid f)
{
easyar_FunctorOfVoid _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoid(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoid_func;
_return_value_.destroy = FunctorOfVoid_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOIDFROMINPUTFRAME__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOIDFROMINPUTFRAME__
static inline easyar_OptionalOfFunctorOfVoidFromInputFrame OptionalOfFunctorOfVoidFromInputFrame_to_c(OptionalOfFunctorOfVoidFromInputFrame o)
{
if (o.has_value) {
easyar_OptionalOfFunctorOfVoidFromInputFrame _return_value_ = {true, FunctorOfVoidFromInputFrame_to_c(o.value)};
return _return_value_;
} else {
easyar_OptionalOfFunctorOfVoidFromInputFrame _return_value_ = {false, {NULL, NULL, NULL}};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMINPUTFRAME__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMINPUTFRAME__
inline FunctorOfVoidFromInputFrame::FunctorOfVoidFromInputFrame(void * _state, void (* func)(void * _state, InputFrame *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoidFromInputFrame_func(void * _state, easyar_InputFrame * arg0, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
easyar_InputFrame__retain(arg0, &arg0);
InputFrame * cpparg0 = new InputFrame(arg0);
FunctorOfVoidFromInputFrame * f = reinterpret_cast<FunctorOfVoidFromInputFrame *>(_state);
f->func(f->_state, cpparg0);
delete cpparg0;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoidFromInputFrame_destroy(void * _state)
{
FunctorOfVoidFromInputFrame * f = reinterpret_cast<FunctorOfVoidFromInputFrame *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoidFromInputFrame FunctorOfVoidFromInputFrame_to_c(FunctorOfVoidFromInputFrame f)
{
easyar_FunctorOfVoidFromInputFrame _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoidFromInputFrame(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoidFromInputFrame_func;
_return_value_.destroy = FunctorOfVoidFromInputFrame_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOIDFROMOUTPUTFRAME__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOIDFROMOUTPUTFRAME__
static inline easyar_OptionalOfFunctorOfVoidFromOutputFrame OptionalOfFunctorOfVoidFromOutputFrame_to_c(OptionalOfFunctorOfVoidFromOutputFrame o)
{
if (o.has_value) {
easyar_OptionalOfFunctorOfVoidFromOutputFrame _return_value_ = {true, FunctorOfVoidFromOutputFrame_to_c(o.value)};
return _return_value_;
} else {
easyar_OptionalOfFunctorOfVoidFromOutputFrame _return_value_ = {false, {NULL, NULL, NULL}};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMOUTPUTFRAME__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMOUTPUTFRAME__
inline FunctorOfVoidFromOutputFrame::FunctorOfVoidFromOutputFrame(void * _state, void (* func)(void * _state, OutputFrame *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoidFromOutputFrame_func(void * _state, easyar_OutputFrame * arg0, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
easyar_OutputFrame__retain(arg0, &arg0);
OutputFrame * cpparg0 = new OutputFrame(arg0);
FunctorOfVoidFromOutputFrame * f = reinterpret_cast<FunctorOfVoidFromOutputFrame *>(_state);
f->func(f->_state, cpparg0);
delete cpparg0;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoidFromOutputFrame_destroy(void * _state)
{
FunctorOfVoidFromOutputFrame * f = reinterpret_cast<FunctorOfVoidFromOutputFrame *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoidFromOutputFrame FunctorOfVoidFromOutputFrame_to_c(FunctorOfVoidFromOutputFrame f)
{
easyar_FunctorOfVoidFromOutputFrame _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoidFromOutputFrame(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoidFromOutputFrame_func;
_return_value_.destroy = FunctorOfVoidFromOutputFrame_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOIDFROMFEEDBACKFRAME__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFFUNCTOROFVOIDFROMFEEDBACKFRAME__
static inline easyar_OptionalOfFunctorOfVoidFromFeedbackFrame OptionalOfFunctorOfVoidFromFeedbackFrame_to_c(OptionalOfFunctorOfVoidFromFeedbackFrame o)
{
if (o.has_value) {
easyar_OptionalOfFunctorOfVoidFromFeedbackFrame _return_value_ = {true, FunctorOfVoidFromFeedbackFrame_to_c(o.value)};
return _return_value_;
} else {
easyar_OptionalOfFunctorOfVoidFromFeedbackFrame _return_value_ = {false, {NULL, NULL, NULL}};
return _return_value_;
}
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMFEEDBACKFRAME__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFVOIDFROMFEEDBACKFRAME__
inline FunctorOfVoidFromFeedbackFrame::FunctorOfVoidFromFeedbackFrame(void * _state, void (* func)(void * _state, FeedbackFrame *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfVoidFromFeedbackFrame_func(void * _state, easyar_FeedbackFrame * arg0, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
easyar_FeedbackFrame__retain(arg0, &arg0);
FeedbackFrame * cpparg0 = new FeedbackFrame(arg0);
FunctorOfVoidFromFeedbackFrame * f = reinterpret_cast<FunctorOfVoidFromFeedbackFrame *>(_state);
f->func(f->_state, cpparg0);
delete cpparg0;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfVoidFromFeedbackFrame_destroy(void * _state)
{
FunctorOfVoidFromFeedbackFrame * f = reinterpret_cast<FunctorOfVoidFromFeedbackFrame *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfVoidFromFeedbackFrame FunctorOfVoidFromFeedbackFrame_to_c(FunctorOfVoidFromFeedbackFrame f)
{
easyar_FunctorOfVoidFromFeedbackFrame _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfVoidFromFeedbackFrame(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfVoidFromFeedbackFrame_func;
_return_value_.destroy = FunctorOfVoidFromFeedbackFrame_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_FUNCTOROFOUTPUTFRAMEFROMLISTOFOUTPUTFRAME__
#define __IMPLEMENTATION_EASYAR_FUNCTOROFOUTPUTFRAMEFROMLISTOFOUTPUTFRAME__
inline FunctorOfOutputFrameFromListOfOutputFrame::FunctorOfOutputFrameFromListOfOutputFrame(void * _state, void (* func)(void * _state, ListOfOutputFrame *, /* OUT */ OutputFrame * *), void (* destroy)(void * _state))
{
this->_state = _state;
this->func = func;
this->destroy = destroy;
}
static void FunctorOfOutputFrameFromListOfOutputFrame_func(void * _state, easyar_ListOfOutputFrame * arg0, /* OUT */ easyar_OutputFrame * * Return, /* OUT */ easyar_String * * _exception)
{
*_exception = NULL;
try {
easyar_ListOfOutputFrame_copy(arg0, &arg0);
ListOfOutputFrame * cpparg0 = new ListOfOutputFrame(arg0);
FunctorOfOutputFrameFromListOfOutputFrame * f = reinterpret_cast<FunctorOfOutputFrameFromListOfOutputFrame *>(_state);
OutputFrame * _return_value_;
f->func(f->_state, cpparg0, &_return_value_);
easyar_OutputFrame * _return_value_c_ = _return_value_->get_cdata();
easyar_OutputFrame__retain(_return_value_c_, &_return_value_c_);
*Return = _return_value_c_;
delete cpparg0;
} catch (std::exception & ex) {
easyar_String_from_utf8_begin(ex.what(), _exception);
}
}
static void FunctorOfOutputFrameFromListOfOutputFrame_destroy(void * _state)
{
FunctorOfOutputFrameFromListOfOutputFrame * f = reinterpret_cast<FunctorOfOutputFrameFromListOfOutputFrame *>(_state);
if (f->destroy) {
f->destroy(f->_state);
}
delete f;
}
static inline easyar_FunctorOfOutputFrameFromListOfOutputFrame FunctorOfOutputFrameFromListOfOutputFrame_to_c(FunctorOfOutputFrameFromListOfOutputFrame f)
{
easyar_FunctorOfOutputFrameFromListOfOutputFrame _return_value_ = {NULL, NULL, NULL};
_return_value_._state = new FunctorOfOutputFrameFromListOfOutputFrame(f._state, f.func, f.destroy);
_return_value_.func = FunctorOfOutputFrameFromListOfOutputFrame_func;
_return_value_.destroy = FunctorOfOutputFrameFromListOfOutputFrame_destroy;
return _return_value_;
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_LISTOFOUTPUTFRAME__
#define __IMPLEMENTATION_EASYAR_LISTOFOUTPUTFRAME__
inline ListOfOutputFrame::ListOfOutputFrame(easyar_ListOfOutputFrame * cdata)
: cdata_(cdata)
{
}
inline ListOfOutputFrame::~ListOfOutputFrame()
{
if (cdata_) {
easyar_ListOfOutputFrame__dtor(cdata_);
cdata_ = NULL;
}
}
inline ListOfOutputFrame::ListOfOutputFrame(const ListOfOutputFrame & data)
: cdata_(static_cast<easyar_ListOfOutputFrame *>(NULL))
{
easyar_ListOfOutputFrame_copy(data.cdata_, &cdata_);
}
inline const easyar_ListOfOutputFrame * ListOfOutputFrame::get_cdata() const
{
return cdata_;
}
inline easyar_ListOfOutputFrame * ListOfOutputFrame::get_cdata()
{
return cdata_;
}
inline ListOfOutputFrame::ListOfOutputFrame(easyar_OutputFrame * * begin, easyar_OutputFrame * * end)
: cdata_(static_cast<easyar_ListOfOutputFrame *>(NULL))
{
easyar_ListOfOutputFrame__ctor(begin, end, &cdata_);
}
inline int ListOfOutputFrame::size() const
{
return easyar_ListOfOutputFrame_size(cdata_);
}
inline OutputFrame * ListOfOutputFrame::at(int index) const
{
easyar_OutputFrame * _return_value_ = easyar_ListOfOutputFrame_at(cdata_, index);
easyar_OutputFrame__retain(_return_value_, &_return_value_);
return new OutputFrame(_return_value_);
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_OPTIONALOFOUTPUTFRAME__
#define __IMPLEMENTATION_EASYAR_OPTIONALOFOUTPUTFRAME__
static inline easyar_OptionalOfOutputFrame OptionalOfOutputFrame_to_c(OutputFrame * o)
{
if (o != NULL) {
easyar_OptionalOfOutputFrame _return_value_ = {true, o->get_cdata()};
return _return_value_;
} else {
easyar_OptionalOfOutputFrame _return_value_ = {false, NULL};
return _return_value_;
}
}
#endif
}
#endif
fileFormatVersion: 2
guid: 16173f92e9441c845bdc182215ef30a4
timeCreated: 1611716671
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
/// <summary>
/// Signal input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_SignalSink : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input data.
/// </summary>
- (void)handle;
@end
/// <summary>
/// Signal output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_SignalSource : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Sets data handler.
/// </summary>
- (void)setHandler:(void (^)())handler;
/// <summary>
/// Connects to input port.
/// </summary>
- (void)connect:(easyar_SignalSink *)sink;
/// <summary>
/// Disconnects.
/// </summary>
- (void)disconnect;
@end
/// <summary>
/// Input frame input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_InputFrameSink : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input data.
/// </summary>
- (void)handle:(easyar_InputFrame *)inputData;
@end
/// <summary>
/// Input frame output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_InputFrameSource : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Sets data handler.
/// </summary>
- (void)setHandler:(void (^)(easyar_InputFrame *))handler;
/// <summary>
/// Connects to input port.
/// </summary>
- (void)connect:(easyar_InputFrameSink *)sink;
/// <summary>
/// Disconnects.
/// </summary>
- (void)disconnect;
@end
/// <summary>
/// Output frame input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_OutputFrameSink : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input data.
/// </summary>
- (void)handle:(easyar_OutputFrame *)inputData;
@end
/// <summary>
/// Output frame output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_OutputFrameSource : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Sets data handler.
/// </summary>
- (void)setHandler:(void (^)(easyar_OutputFrame *))handler;
/// <summary>
/// Connects to input port.
/// </summary>
- (void)connect:(easyar_OutputFrameSink *)sink;
/// <summary>
/// Disconnects.
/// </summary>
- (void)disconnect;
@end
/// <summary>
/// Feedback frame input port.
/// It is used to expose input port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_FeedbackFrameSink : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input data.
/// </summary>
- (void)handle:(easyar_FeedbackFrame *)inputData;
@end
/// <summary>
/// Feedback frame output port.
/// It is used to expose output port for a component.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_FeedbackFrameSource : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Sets data handler.
/// </summary>
- (void)setHandler:(void (^)(easyar_FeedbackFrame *))handler;
/// <summary>
/// Connects to input port.
/// </summary>
- (void)connect:(easyar_FeedbackFrameSink *)sink;
/// <summary>
/// Disconnects.
/// </summary>
- (void)disconnect;
@end
/// <summary>
/// Input frame fork.
/// It is used to branch and transfer input frame to multiple components in parallel.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_InputFrameFork : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_InputFrameSink *)input;
/// <summary>
/// Output port.
/// </summary>
- (easyar_InputFrameSource *)output:(int)index;
/// <summary>
/// Output count.
/// </summary>
- (int)outputCount;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_InputFrameFork *)create:(int)outputCount;
@end
/// <summary>
/// Output frame fork.
/// It is used to branch and transfer output frame to multiple components in parallel.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_OutputFrameFork : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_OutputFrameSink *)input;
/// <summary>
/// Output port.
/// </summary>
- (easyar_OutputFrameSource *)output:(int)index;
/// <summary>
/// Output count.
/// </summary>
- (int)outputCount;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_OutputFrameFork *)create:(int)outputCount;
@end
/// <summary>
/// Output frame join.
/// It is used to aggregate output frame from multiple components in parallel.
/// All members of this class is thread-safe.
/// It shall be noticed that connections and disconnections to the inputs shall not be performed during the flowing of data, or it may stuck in a state that no frame can be output. (It is recommended to complete dataflow connection before start a camera.)
/// </summary>
@interface easyar_OutputFrameJoin : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_OutputFrameSink *)input:(int)index;
/// <summary>
/// Output port.
/// </summary>
- (easyar_OutputFrameSource *)output;
/// <summary>
/// Input count.
/// </summary>
- (int)inputCount;
/// <summary>
/// Creates an instance. The default joiner will be used, which takes input frame from the first input and first result or null of each input. The first result of every input will be placed at the corresponding input index of results of the final output frame.
/// </summary>
+ (easyar_OutputFrameJoin *)create:(int)inputCount;
/// <summary>
/// Creates an instance. A custom joiner is specified.
/// </summary>
+ (easyar_OutputFrameJoin *)createWithJoiner:(int)inputCount joiner:(easyar_OutputFrame * (^)(NSArray<easyar_OutputFrame *> *))joiner;
@end
/// <summary>
/// Feedback frame fork.
/// It is used to branch and transfer feedback frame to multiple components in parallel.
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_FeedbackFrameFork : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_FeedbackFrameSink *)input;
/// <summary>
/// Output port.
/// </summary>
- (easyar_FeedbackFrameSource *)output:(int)index;
/// <summary>
/// Output count.
/// </summary>
- (int)outputCount;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_FeedbackFrameFork *)create:(int)outputCount;
@end
/// <summary>
/// Input frame throttler.
/// There is a input frame input port and a input frame output port. It can be used to prevent incoming frames from entering algorithm components when they have not finished handling previous workload.
/// InputFrameThrottler occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// It shall be noticed that connections and disconnections to signalInput shall not be performed during the flowing of data, or it may stuck in a state that no frame can be output. (It is recommended to complete dataflow connection before start a camera.)
/// </summary>
@interface easyar_InputFrameThrottler : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_InputFrameSink *)input;
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
- (int)bufferRequirement;
/// <summary>
/// Output port.
/// </summary>
- (easyar_InputFrameSource *)output;
/// <summary>
/// Input port for clearance signal.
/// </summary>
- (easyar_SignalSink *)signalInput;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_InputFrameThrottler *)create;
@end
/// <summary>
/// Output frame buffer.
/// There is an output frame input port and output frame fetching function. It can be used to convert output frame fetching from asynchronous pattern to synchronous polling pattern, which fits frame by frame rendering.
/// OutputFrameBuffer occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_OutputFrameBuffer : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_OutputFrameSink *)input;
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
- (int)bufferRequirement;
/// <summary>
/// Output port for frame arrival. It can be connected to `InputFrameThrottler.signalInput`_ .
/// </summary>
- (easyar_SignalSource *)signalOutput;
/// <summary>
/// Fetches the most recent `OutputFrame`_ .
/// </summary>
- (easyar_OutputFrame *)peek;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_OutputFrameBuffer *)create;
/// <summary>
/// Pauses output of `OutputFrame`_ . After execution, all results of `OutputFrameBuffer.peek`_ will be empty. `OutputFrameBuffer.signalOutput`_ is not affected.
/// </summary>
- (void)pause;
/// <summary>
/// Resumes output of `OutputFrame`_ .
/// </summary>
- (void)resume;
@end
/// <summary>
/// Input frame to output frame adapter.
/// There is an input frame input port and an output frame output port. It can be used to wrap an input frame into an output frame, which can be used for rendering without an algorithm component. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_InputFrameToOutputFrameAdapter : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_InputFrameSink *)input;
/// <summary>
/// Output port.
/// </summary>
- (easyar_OutputFrameSource *)output;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_InputFrameToOutputFrameAdapter *)create;
@end
/// <summary>
/// Input frame to feedback frame adapter.
/// There is an input frame input port, a historic output frame input port and a feedback frame output port. It can be used to combine an input frame and a historic output frame into a feedback frame, which is required by algorithm components such as `ImageTracker`_ .
/// On every input of an input frame, a feedback frame is generated with a previously input historic feedback frame. If there is no previously input historic feedback frame, it is null in the feedback frame.
/// InputFrameToFeedbackFrameAdapter occupies one buffer of camera. Use setBufferCapacity of camera to set an amount of buffers that is not less than the sum of amount of buffers occupied by all components. Refer to `Overview &lt;Overview.html&gt;`__ .
/// All members of this class is thread-safe.
/// </summary>
@interface easyar_InputFrameToFeedbackFrameAdapter : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Input port.
/// </summary>
- (easyar_InputFrameSink *)input;
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
- (int)bufferRequirement;
/// <summary>
/// Side input port for historic output frame input.
/// </summary>
- (easyar_OutputFrameSink *)sideInput;
/// <summary>
/// Output port.
/// </summary>
- (easyar_FeedbackFrameSource *)output;
/// <summary>
/// Creates an instance.
/// </summary>
+ (easyar_InputFrameToFeedbackFrameAdapter *)create;
@end
fileFormatVersion: 2
guid: 0582c114565dd2545b2d292902a9d345
timeCreated: 1611716671
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_DENSESPATIALMAP_H__
#define __EASYAR_DENSESPATIALMAP_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Returns True when the device supports dense reconstruction, otherwise returns False.
/// </summary>
bool easyar_DenseSpatialMap_isAvailable(void);
/// <summary>
/// Input port for input frame. For DenseSpatialMap to work, the inputFrame must include image and it&#39;s camera parameters and spatial information (cameraTransform and trackingStatus). See also `InputFrameSink`_ .
/// </summary>
void easyar_DenseSpatialMap_inputFrameSink(easyar_DenseSpatialMap * This, /* OUT */ easyar_InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int easyar_DenseSpatialMap_bufferRequirement(easyar_DenseSpatialMap * This);
/// <summary>
/// Create `DenseSpatialMap`_ object.
/// </summary>
void easyar_DenseSpatialMap_create(/* OUT */ easyar_DenseSpatialMap * * Return);
/// <summary>
/// Start or continue runninng `DenseSpatialMap`_ algorithm.
/// </summary>
bool easyar_DenseSpatialMap_start(easyar_DenseSpatialMap * This);
/// <summary>
/// Pause the reconstruction algorithm. Call `start` to resume reconstruction.
/// </summary>
void easyar_DenseSpatialMap_stop(easyar_DenseSpatialMap * This);
/// <summary>
/// Close `DenseSpatialMap`_ algorithm.
/// </summary>
void easyar_DenseSpatialMap_close(easyar_DenseSpatialMap * This);
/// <summary>
/// Get the mesh management object of type `SceneMesh`_ . The contents will automatically update after calling the `DenseSpatialMap.updateSceneMesh`_ function.
/// </summary>
void easyar_DenseSpatialMap_getMesh(easyar_DenseSpatialMap * This, /* OUT */ easyar_SceneMesh * * Return);
/// <summary>
/// Get the lastest updated mesh and save it to the `SceneMesh`_ object obtained by `DenseSpatialMap.getMesh`_ .
/// The parameter `updateMeshAll` indicates whether to perform a `full update` or an `incremental update`. When `updateMeshAll` is True, `full update` is performed. All meshes are saved to `SceneMesh`_ . When `updateMeshAll` is False, `incremental update` is performed, and only the most recently updated mesh is saved to `SceneMesh`_ .
/// `Full update` will take extra time and memory space, causing performance degradation.
/// </summary>
bool easyar_DenseSpatialMap_updateSceneMesh(easyar_DenseSpatialMap * This, bool updateMeshAll);
void easyar_DenseSpatialMap__dtor(easyar_DenseSpatialMap * This);
void easyar_DenseSpatialMap__retain(const easyar_DenseSpatialMap * This, /* OUT */ easyar_DenseSpatialMap * * Return);
const char * easyar_DenseSpatialMap__typeName(const easyar_DenseSpatialMap * This);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 8eb6be3a8c6f91841a1cf3b248ed1bf5
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_DENSESPATIALMAP_HXX__
#define __EASYAR_DENSESPATIALMAP_HXX__
#include "easyar/types.hxx"
namespace easyar {
/// <summary>
/// DenseSpatialMap is used to reconstruct the environment accurately and densely. The reconstructed model is represented by `triangle mesh`, which is denoted simply by `mesh`.
/// DenseSpatialMap occupies 1 buffers of camera.
/// </summary>
class DenseSpatialMap
{
protected:
easyar_DenseSpatialMap * cdata_ ;
void init_cdata(easyar_DenseSpatialMap * cdata);
virtual DenseSpatialMap & operator=(const DenseSpatialMap & data) { return *this; } //deleted
public:
DenseSpatialMap(easyar_DenseSpatialMap * cdata);
virtual ~DenseSpatialMap();
DenseSpatialMap(const DenseSpatialMap & data);
const easyar_DenseSpatialMap * get_cdata() const;
easyar_DenseSpatialMap * get_cdata();
/// <summary>
/// Returns True when the device supports dense reconstruction, otherwise returns False.
/// </summary>
static bool isAvailable();
/// <summary>
/// Input port for input frame. For DenseSpatialMap to work, the inputFrame must include image and it&#39;s camera parameters and spatial information (cameraTransform and trackingStatus). See also `InputFrameSink`_ .
/// </summary>
void inputFrameSink(/* OUT */ InputFrameSink * * Return);
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
int bufferRequirement();
/// <summary>
/// Create `DenseSpatialMap`_ object.
/// </summary>
static void create(/* OUT */ DenseSpatialMap * * Return);
/// <summary>
/// Start or continue runninng `DenseSpatialMap`_ algorithm.
/// </summary>
bool start();
/// <summary>
/// Pause the reconstruction algorithm. Call `start` to resume reconstruction.
/// </summary>
void stop();
/// <summary>
/// Close `DenseSpatialMap`_ algorithm.
/// </summary>
void close();
/// <summary>
/// Get the mesh management object of type `SceneMesh`_ . The contents will automatically update after calling the `DenseSpatialMap.updateSceneMesh`_ function.
/// </summary>
void getMesh(/* OUT */ SceneMesh * * Return);
/// <summary>
/// Get the lastest updated mesh and save it to the `SceneMesh`_ object obtained by `DenseSpatialMap.getMesh`_ .
/// The parameter `updateMeshAll` indicates whether to perform a `full update` or an `incremental update`. When `updateMeshAll` is True, `full update` is performed. All meshes are saved to `SceneMesh`_ . When `updateMeshAll` is False, `incremental update` is performed, and only the most recently updated mesh is saved to `SceneMesh`_ .
/// `Full update` will take extra time and memory space, causing performance degradation.
/// </summary>
bool updateSceneMesh(bool updateMeshAll);
};
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_DENSESPATIALMAP_HXX__
#define __IMPLEMENTATION_EASYAR_DENSESPATIALMAP_HXX__
#include "easyar/densespatialmap.h"
#include "easyar/dataflow.hxx"
#include "easyar/frame.hxx"
#include "easyar/image.hxx"
#include "easyar/buffer.hxx"
#include "easyar/cameraparameters.hxx"
#include "easyar/vector.hxx"
#include "easyar/matrix.hxx"
#include "easyar/scenemesh.hxx"
namespace easyar {
inline DenseSpatialMap::DenseSpatialMap(easyar_DenseSpatialMap * cdata)
:
cdata_(NULL)
{
init_cdata(cdata);
}
inline DenseSpatialMap::~DenseSpatialMap()
{
if (cdata_) {
easyar_DenseSpatialMap__dtor(cdata_);
cdata_ = NULL;
}
}
inline DenseSpatialMap::DenseSpatialMap(const DenseSpatialMap & data)
:
cdata_(NULL)
{
easyar_DenseSpatialMap * cdata = NULL;
easyar_DenseSpatialMap__retain(data.cdata_, &cdata);
init_cdata(cdata);
}
inline const easyar_DenseSpatialMap * DenseSpatialMap::get_cdata() const
{
return cdata_;
}
inline easyar_DenseSpatialMap * DenseSpatialMap::get_cdata()
{
return cdata_;
}
inline void DenseSpatialMap::init_cdata(easyar_DenseSpatialMap * cdata)
{
cdata_ = cdata;
}
inline bool DenseSpatialMap::isAvailable()
{
bool _return_value_ = easyar_DenseSpatialMap_isAvailable();
return _return_value_;
}
inline void DenseSpatialMap::inputFrameSink(/* OUT */ InputFrameSink * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_InputFrameSink * _return_value_ = NULL;
easyar_DenseSpatialMap_inputFrameSink(cdata_, &_return_value_);
*Return = new InputFrameSink(_return_value_);
}
inline int DenseSpatialMap::bufferRequirement()
{
if (cdata_ == NULL) {
return int();
}
int _return_value_ = easyar_DenseSpatialMap_bufferRequirement(cdata_);
return _return_value_;
}
inline void DenseSpatialMap::create(/* OUT */ DenseSpatialMap * * Return)
{
easyar_DenseSpatialMap * _return_value_ = NULL;
easyar_DenseSpatialMap_create(&_return_value_);
*Return = new DenseSpatialMap(_return_value_);
}
inline bool DenseSpatialMap::start()
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_DenseSpatialMap_start(cdata_);
return _return_value_;
}
inline void DenseSpatialMap::stop()
{
if (cdata_ == NULL) {
return;
}
easyar_DenseSpatialMap_stop(cdata_);
}
inline void DenseSpatialMap::close()
{
if (cdata_ == NULL) {
return;
}
easyar_DenseSpatialMap_close(cdata_);
}
inline void DenseSpatialMap::getMesh(/* OUT */ SceneMesh * * Return)
{
if (cdata_ == NULL) {
*Return = NULL;
return;
}
easyar_SceneMesh * _return_value_ = NULL;
easyar_DenseSpatialMap_getMesh(cdata_, &_return_value_);
*Return = new SceneMesh(_return_value_);
}
inline bool DenseSpatialMap::updateSceneMesh(bool arg0)
{
if (cdata_ == NULL) {
return bool();
}
bool _return_value_ = easyar_DenseSpatialMap_updateSceneMesh(cdata_, arg0);
return _return_value_;
}
}
#endif
fileFormatVersion: 2
guid: 15b545a74b525584fbedce18822f92d9
timeCreated: 1611716671
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#import "easyar/types.oc.h"
/// <summary>
/// DenseSpatialMap is used to reconstruct the environment accurately and densely. The reconstructed model is represented by `triangle mesh`, which is denoted simply by `mesh`.
/// DenseSpatialMap occupies 1 buffers of camera.
/// </summary>
@interface easyar_DenseSpatialMap : easyar_RefBase
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
/// <summary>
/// Returns True when the device supports dense reconstruction, otherwise returns False.
/// </summary>
+ (bool)isAvailable;
/// <summary>
/// Input port for input frame. For DenseSpatialMap to work, the inputFrame must include image and it&#39;s camera parameters and spatial information (cameraTransform and trackingStatus). See also `InputFrameSink`_ .
/// </summary>
- (easyar_InputFrameSink *)inputFrameSink;
/// <summary>
/// Camera buffers occupied in this component.
/// </summary>
- (int)bufferRequirement;
/// <summary>
/// Create `DenseSpatialMap`_ object.
/// </summary>
+ (easyar_DenseSpatialMap *)create;
/// <summary>
/// Start or continue runninng `DenseSpatialMap`_ algorithm.
/// </summary>
- (bool)start;
/// <summary>
/// Pause the reconstruction algorithm. Call `start` to resume reconstruction.
/// </summary>
- (void)stop;
/// <summary>
/// Close `DenseSpatialMap`_ algorithm.
/// </summary>
- (void)close;
/// <summary>
/// Get the mesh management object of type `SceneMesh`_ . The contents will automatically update after calling the `DenseSpatialMap.updateSceneMesh`_ function.
/// </summary>
- (easyar_SceneMesh *)getMesh;
/// <summary>
/// Get the lastest updated mesh and save it to the `SceneMesh`_ object obtained by `DenseSpatialMap.getMesh`_ .
/// The parameter `updateMeshAll` indicates whether to perform a `full update` or an `incremental update`. When `updateMeshAll` is True, `full update` is performed. All meshes are saved to `SceneMesh`_ . When `updateMeshAll` is False, `incremental update` is performed, and only the most recently updated mesh is saved to `SceneMesh`_ .
/// `Full update` will take extra time and memory space, causing performance degradation.
/// </summary>
- (bool)updateSceneMesh:(bool)updateMeshAll;
@end
fileFormatVersion: 2
guid: f46a3a3cf0fd30f43a238bfd8e2d6fe0
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_ENGINE_H__
#define __EASYAR_ENGINE_H__
#include "easyar/types.h"
#ifdef __cplusplus
extern "C" {
#endif
/// <summary>
/// Gets the version schema hash, which can be used to ensure type declarations consistent with runtime library.
/// </summary>
int easyar_Engine_schemaHash(void);
bool easyar_Engine_initialize(easyar_String * key);
/// <summary>
/// Handles the app onPause, pauses internal tasks.
/// </summary>
void easyar_Engine_onPause(void);
/// <summary>
/// Handles the app onResume, resumes internal tasks.
/// </summary>
void easyar_Engine_onResume(void);
/// <summary>
/// Gets error message on initialization failure.
/// </summary>
void easyar_Engine_errorMessage(/* OUT */ easyar_String * * Return);
/// <summary>
/// Gets the version number of EasyARSense.
/// </summary>
void easyar_Engine_versionString(/* OUT */ easyar_String * * Return);
/// <summary>
/// Gets the product name of EasyARSense. (Including variant, operating system and CPU architecture.)
/// </summary>
void easyar_Engine_name(/* OUT */ easyar_String * * Return);
#ifdef __cplusplus
}
#endif
#endif
fileFormatVersion: 2
guid: 804d31cecb860c24bb2262c073b9588d
timeCreated: 1611716672
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//=============================================================================================================================
//
// EasyAR Sense 4.2.0.8700-7bcbc8b1c
// Copyright (c) 2015-2021 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
// EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
// and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
//
//=============================================================================================================================
#ifndef __EASYAR_ENGINE_HXX__
#define __EASYAR_ENGINE_HXX__
#include "easyar/types.hxx"
namespace easyar {
class Engine
{
public:
/// <summary>
/// Gets the version schema hash, which can be used to ensure type declarations consistent with runtime library.
/// </summary>
static int schemaHash();
static bool initialize(String * key);
/// <summary>
/// Handles the app onPause, pauses internal tasks.
/// </summary>
static void onPause();
/// <summary>
/// Handles the app onResume, resumes internal tasks.
/// </summary>
static void onResume();
/// <summary>
/// Gets error message on initialization failure.
/// </summary>
static void errorMessage(/* OUT */ String * * Return);
/// <summary>
/// Gets the version number of EasyARSense.
/// </summary>
static void versionString(/* OUT */ String * * Return);
/// <summary>
/// Gets the product name of EasyARSense. (Including variant, operating system and CPU architecture.)
/// </summary>
static void name(/* OUT */ String * * Return);
};
}
#endif
#ifndef __IMPLEMENTATION_EASYAR_ENGINE_HXX__
#define __IMPLEMENTATION_EASYAR_ENGINE_HXX__
#include "easyar/engine.h"
namespace easyar {
inline int Engine::schemaHash()
{
int _return_value_ = easyar_Engine_schemaHash();
return _return_value_;
}
inline bool Engine::initialize(String * arg0)
{
if (easyar_Engine_schemaHash() != -446312183) {
return false;
}
bool _return_value_ = easyar_Engine_initialize(arg0->get_cdata());
return _return_value_;
}
inline void Engine::onPause()
{
easyar_Engine_onPause();
}
inline void Engine::onResume()
{
easyar_Engine_onResume();
}
inline void Engine::errorMessage(/* OUT */ String * * Return)
{
easyar_String * _return_value_ = NULL;
easyar_Engine_errorMessage(&_return_value_);
*Return = new String(_return_value_);
}
inline void Engine::versionString(/* OUT */ String * * Return)
{
easyar_String * _return_value_ = NULL;
easyar_Engine_versionString(&_return_value_);
*Return = new String(_return_value_);
}
inline void Engine::name(/* OUT */ String * * Return)
{
easyar_String * _return_value_ = NULL;
easyar_Engine_name(&_return_value_);
*Return = new String(_return_value_);
}
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment