blob: 3b663bad4aaaeac11121d47e422e0f464f4ed147 (
plain)
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
|
/*********************************************************************************************************************
* Copyright 2013-2014 Tobii Technology AB. All rights reserved.
* StateBag.hpp
*********************************************************************************************************************/
#if !defined(__TOBII_TX_CLIENT_CPPBINDINGS_STATEBAG__HPP__)
#define __TOBII_TX_CLIENT_CPPBINDINGS_STATEBAG__HPP__
/*********************************************************************************************************************/
TX_NAMESPACE_BEGIN
/*********************************************************************************************************************/
class StateBag :
public InteractionObject
{
public:
StateBag(const std::shared_ptr<const Context>& spContext, TX_HANDLE hBag);
std::string GetStatePath() const;
template <typename TValue>
bool TryGetStateValue(TValue* pValue, const std::string& valuePath) const;
template <typename TValue>
void SetStateValue(const std::string& valuePath, const TValue& value);
void SetAsync(AsyncDataHandler fnCompletion = nullptr);
private:
bool TryGetPropertyForStateValue(std::shared_ptr<Property>* pspProperty, const std::string& valuePath, bool createIfNotExists) const;
};
/*********************************************************************************************************************/
TX_NAMESPACE_END
/*********************************************************************************************************************/
#endif // !defined(__TOBII_TX_CLIENT_CPPBINDINGS_STATEBAG__HPP__)
/*********************************************************************************************************************/
|