kDB: Knowledge DataBase
Loading...
Searching...
No Matches
Stream.h
1#include <QExplicitlySharedDataPointer>
2
3#include <knowCore/Value.h>
4
5#include "Forward.h"
6
7namespace kDBRobotics
8{
9 class Stream
10 {
11 friend class Agents;
12 public:
13 Stream();
14 Stream(const Stream& _rhs);
15 Stream& operator=(const Stream& _rhs);
16 ~Stream();
17 knowCore::Uri uri() const;
18 QString identifier() const;
19 knowCore::Uri datatype() const;
20 knowCore::Uri contentType() const;
24 knowCore::ReturnValue<bool> hasProperty(const knowCore::Uri& _property) const;
28 knowCore::ReturnValue<knowCore::Value> property(const knowCore::Uri& _property) const;
32 knowCore::ReturnVoid setProperty(const knowCore::Uri& _property, const knowCore::Value& _value) const;
36 template<typename _T_, std::enable_if_t<not std::is_base_of_v<knowCore::Value, _T_>, bool> = true>
37 knowCore::ReturnVoid setProperty(const knowCore::Uri& _property, const _T_& _value) const { return setProperty(_property, knowCore::Value::fromValue(_value)); }
38 public:
39 bool operator==(const Stream& _rhs) const;
40 public:
41 bool isValid() const;
42 private:
43 struct Private;
44 QExplicitlySharedDataPointer<Private> d;
45 };
46}
Definition Agents.h:15
Definition Stream.h:10
knowCore::ReturnVoid setProperty(const knowCore::Uri &_property, const knowCore::Value &_value) const
Definition Stream.cpp:52
knowCore::ReturnVoid setProperty(const knowCore::Uri &_property, const _T_ &_value) const
Definition Stream.h:37
knowCore::ReturnValue< knowCore::Value > property(const knowCore::Uri &_property) const
Definition Stream.cpp:47
knowCore::ReturnValue< bool > hasProperty(const knowCore::Uri &_property) const
Definition Stream.cpp:42
Definition Uri.h:15
Definition Value.h:21
static Value fromValue(const _T_ &_value)
Definition Value.h:241