blob: a344c8e3ad1f6c915b40e0e352f53c18cc9f270d [file] [log] [blame]
Sadik Armagana097d2a2021-11-24 15:47:28 +00001//
2// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include <sstream>
8
9namespace armnn
10{
11
12class PredicateResult
13{
14public:
15 explicit PredicateResult(bool result)
16 : m_Result(result)
17 {}
18
19 PredicateResult(const PredicateResult& predicateResult)
20 : m_Result(predicateResult.m_Result)
21 , m_Message(predicateResult.m_Message.str())
22 {}
23
24 void SetResult(bool newResult)
25 {
26 m_Result = newResult;
27 }
28
29 std::stringstream& Message()
30 {
31 return m_Message;
32 }
33
34 bool operator!() const
35 {
36 return !m_Result;
37 }
38
39 void operator=(PredicateResult otherPredicateResult)
40 {
41 otherPredicateResult.m_Result = m_Result;
42 }
43
44 bool m_Result;
45 std::stringstream m_Message;
46};
47
48} // namespace armnn