From be2926499af2e372c313d965533be3a7ee0dcf4d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 16 May 2016 11:19:10 +0200 Subject: add tobii eyex sdk --- Tobii EyeX/include/eyex-cpp/InteractionObject.hpp | 63 +++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 Tobii EyeX/include/eyex-cpp/InteractionObject.hpp (limited to 'Tobii EyeX/include/eyex-cpp/InteractionObject.hpp') diff --git a/Tobii EyeX/include/eyex-cpp/InteractionObject.hpp b/Tobii EyeX/include/eyex-cpp/InteractionObject.hpp new file mode 100755 index 0000000..75d4171 --- /dev/null +++ b/Tobii EyeX/include/eyex-cpp/InteractionObject.hpp @@ -0,0 +1,63 @@ +/********************************************************************************************************************* + * Copyright 2013-2014 Tobii Technology AB. All rights reserved. + * InteractionObject.hpp + *********************************************************************************************************************/ + +#if !defined(__TOBII_TX_CLIENT_CPPBINDINGS_INTERACTIONOBJECT__HPP__) +#define __TOBII_TX_CLIENT_CPPBINDINGS_INTERACTIONOBJECT__HPP__ + +/*********************************************************************************************************************/ + +TX_NAMESPACE_BEGIN + +/*********************************************************************************************************************/ + +template +class InteractionObjectBase : + public HandleWrapper +{ +public: + InteractionObjectBase(const std::shared_ptr& spContext, THandle hObject); + + TX_INTERACTIONOBJECTTYPE GetObjectType() const; + + bool TryGetProperty(std::shared_ptr* pspProperty, const std::string& propertyName) const; + std::shared_ptr GetProperty(const std::string& propertyName) const; + std::vector> GetProperties() const; + void CopyPropertiesTo(const std::shared_ptr& spObject) const; + std::string FormatAsText() const; + +public: + template + typename PropertyValueResolver::ValueType GetPropertyValue(const std::string& propertyName) const; + + template + bool TryGetPropertyValue(TValue* pValue, const std::string& propertyName) const; +}; + +/*********************************************************************************************************************/ + +class InteractionObject : + public InteractionObjectBase +{ +public: + InteractionObject(const std::shared_ptr& spContext, TX_HANDLE hObject); + virtual ~InteractionObject(); + + std::shared_ptr CreateProperty(const std::string& propertyName); + +public: + template + void SetPropertyValue(const std::string& propertyName, const TValue& value); +}; + +/*********************************************************************************************************************/ + +TX_NAMESPACE_END + +/*********************************************************************************************************************/ + + +#endif // !defined(__TOBII_TX_CLIENT_CPPBINDINGS_INTERACTIONOBJECT__HPP__) + +/*********************************************************************************************************************/ -- cgit v1.2.3