ArmNN
 22.08
PredicateResult.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include <sstream>
8 
9 namespace armnn
10 {
11 
13 {
14 public:
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
std::stringstream m_Message
std::stringstream & Message()
Copyright (c) 2021 ARM Limited and Contributors.
void SetResult(bool newResult)
PredicateResult(const PredicateResult &predicateResult)
void operator=(PredicateResult otherPredicateResult)