Capsule API Example

Loading...
Searching...
No Matches
ClassificationNFB.hpp
Go to the documentation of this file.
1// Copyright. 2019 - 2024 PSBD. All rights reserved.
2
3#pragma once
4
5#include "CDefinesPrivate.h"
6#include "Classification.hpp"
7
8#include <Core/Common.hpp>
9#include <Core/Delegate.hpp>
10
11 namespace capsule::client {
12 class ClassificationNFBPrivate;
13 class Device;
14
30 class CL_DLL ClassificationNFB final : public Classification {
31 friend ClassificationNFBPrivate;
32
33 public:
37 enum class CallResult : uint8_t {
38 Success,
39 ModelIsNotTrained_Deprecated,
40 ModelIsTrained_Deprecated,
41 FailedToSendData
42 };
43
44 explicit ClassificationNFB(Device& owner);
45
46 void SetOnUserStateChangedEvent(std::function<void(ClassificationNFB&, const nfb::NFBValue&)>&& callback);
47 void SetOnErrorEvent(std::function<void(ClassificationNFB&, const std::string&)>&& callback);
48
49 private:
50 ClassificationNFBPrivate* getImpl();
51 const ClassificationNFBPrivate* getImpl() const;
52};
53
54} // namespace capsule::client
CDefinesPrivate.h
CL_DLL
#define CL_DLL
Definition CDefinesPrivate.h:51
Classification.hpp
capsule::client::Classification
is the base class for to NFB or productivity classification process.
Definition Classification.hpp:16
capsule::client::ClassificationNFB
Interface to NFB classification process.
Definition ClassificationNFB.hpp:30
capsule::client::ClassificationNFB::ClassificationNFB
ClassificationNFB(Device &owner)
capsule::client::ClassificationNFB::SetOnUserStateChangedEvent
void SetOnUserStateChangedEvent(std::function< void(ClassificationNFB &, const nfb::NFBValue &)> &&callback)
capsule::client::ClassificationNFB::SetOnErrorEvent
void SetOnErrorEvent(std::function< void(ClassificationNFB &, const std::string &)> &&callback)
capsule::client::ClassificationNFB::CallResult
CallResult
NFB call result.
Definition ClassificationNFB.hpp:37
capsule::client::Device
Device.
Definition Device.hpp:71
capsule::client
Definition Classification.hpp:7