-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathDataViewerCollection.hpp
More file actions
48 lines (32 loc) · 1.31 KB
/
DataViewerCollection.hpp
File metadata and controls
48 lines (32 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
//
#ifndef DATAVIEWERCOLLECTIONIMPL_HPP
#define DATAVIEWERCOLLECTIONIMPL_HPP
#include "ctmacros.hpp"
#include "IDataViewerCollection.hpp"
#include "pal/PAL.hpp"
#include <mutex>
#include <vector>
namespace MAT_NS_BEGIN {
class DataViewerCollection : public IDataViewerCollection
{
public:
virtual void DispatchDataViewerEvent(const std::vector<uint8_t>& packetData) const noexcept override;
virtual void RegisterViewer(const std::shared_ptr<IDataViewer>& dataViewer) override;
virtual void UnregisterViewer(const char* viewerName) override;
virtual void UnregisterAllViewers() override;
virtual bool IsViewerEnabled(const char* viewerName) const override;
virtual bool IsViewerEnabled() const noexcept override;
virtual bool IsViewerRegistered(const char* viewerName) const override;
virtual ~DataViewerCollection() noexcept {}
private:
MATSDK_LOG_DECL_COMPONENT_CLASS();
mutable std::recursive_mutex m_dataViewerMapLock;
protected:
std::shared_ptr<IDataViewer> GetViewerFromCollection(const char* viewerName) const;
std::vector<std::shared_ptr<IDataViewer>> m_dataViewerCollection;
};
} MAT_NS_END
#endif