USRP Hardware Driver and USRP Manual  Version: 4.6.0.0
UHD and USRP Manual
dirtifier.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2019 Ettus Research, a National Instruments Brand
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #pragma once
8 
9 #include <uhd/rfnoc/property.hpp>
10 
11 namespace uhd { namespace rfnoc {
12 
19 {
20 public:
22  : property_base_t("__ALWAYS_DIRTY__", res_source_info(res_source_info::FRAMEWORK))
23  {
24  // nop
25  }
26 
28  bool is_dirty() const override
29  {
30  return true;
31  }
32 
34  bool is_valid() const override
35  {
36  return false;
37  }
38 
40  bool equal(property_base_t*) const override
41  {
42  return false;
43  }
44 
46  void force_dirty() override {}
47 
48  void set_from_str(const std::string&) override
49  {
50  throw uhd::runtime_error("Dirtifier property can never be set!");
51  }
52 
53 private:
55  void mark_clean() override {}
56 
58  void forward(property_base_t*) override
59  {
60  throw uhd::type_error("Cannot forward to or from dirtifier property!");
61  }
62 
64  bool is_type_equal(property_base_t*) const override
65  {
66  return false;
67  }
68 };
69 
70 }} /* namespace uhd::rfnoc */
Definition: exception.hpp:131
Definition: dirtifier.hpp:18
Definition: build_info.hpp:12
bool is_dirty() const override
This property is always dirty.
Definition: dirtifier.hpp:28
dirtifier_t()
Definition: dirtifier.hpp:21
Definition: res_source_info.hpp:17
void set_from_str(const std::string &) override
Definition: dirtifier.hpp:48
bool is_valid() const override
This property is always invalid.
Definition: dirtifier.hpp:34
bool equal(property_base_t *) const override
This property is never equal to anything else.
Definition: dirtifier.hpp:40
Definition: property.hpp:25
Definition: exception.hpp:95
void force_dirty() override
Always dirty, so this can be called as often as we like.
Definition: dirtifier.hpp:46