本文介绍了如何在C ++ / CLI中包装c ++侦听器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C ++ / CLI为3D传感器的SDK编写包装器。问题是在最后一个版本中SDK有很多变化,包括两个监听器。我是第一次使用C ++ / CLI而且我不知道如何包装监听器。我看到其他网站可以解释这一点,但我不太清楚这是做什么的。



听众是这样的:

I am writting a wrapper in C++/CLI for a SDK of a 3D sensor. The question is in the last release the SDK has many changes, including a two listeners. Is my first time with C++/CLI and I do not know how to wrap the listener. I see other sites that explain this, but I do not understand very well what are the doing.

The listener is like this:

class DecoderListener
{
public:
    virtual ~DecoderListener() {};
    virtual Status onCloudDecoded(int /lastFrameDecodedNumber/, int /lastFrameDecodedLen/, long long /lastFrameDecodedTimeStamp/,
            float * /positions/, float * /normals/, unsigned char * /colors/)
    {
        return NotImplemented;
    };


    virtual Status onMapDecoded(int /*depthMapNumber*/, long long /*timeStamp*/, unsigned char const* /*pImage*/, int /*dataSize*/, int /*dataW*/, int /*dataH*/)
    {
        return NotImplemented;
    };

    virtual Status onDepthMapWithColorDecoded(int /*depthMapNumber*/, long long /*timeStamp*/, unsigned char const* /*pDMImage*/, int /*DMDataSize*/, int /*DMdataW*/, int /*DMdataH*/, unsigned char const* /*pcolorImage*/, int /*colorDataSize*/, int /*colorDataW*/, int /*colorDataH*/)
    {
        return NotImplemented;
    };
};

推荐答案


这篇关于如何在C ++ / CLI中包装c ++侦听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 21:03