USRP Hardware Driver and USRP Manual Version: 4.0.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
10
11namespace uhd { namespace rfnoc {
12
19{
20public:
22 : property_base_t("__ALWAYS_DIRTY__", res_source_info(res_source_info::FRAMEWORK))
23 {
24 // nop
25 }
26
28 bool is_dirty() const
29 {
30 return true;
31 }
32
34 bool is_valid() const
35 {
36 return false;
37 }
38
41 {
42 return false;
43 }
44
46 void force_dirty() {}
47
48 void set_from_str(const std::string&)
49 {
50 throw uhd::runtime_error("Dirtifier property can never be set!");
51 }
52
53private:
55 void mark_clean() {}
56
58 void forward(property_base_t*)
59 {
60 throw uhd::type_error("Cannot forward to or from dirtifier property!");
61 }
62
64 bool is_type_equal(property_base_t*) const
65 {
66 return false;
67 }
68};
69
70}} /* namespace uhd::rfnoc */
Definition: dirtifier.hpp:19
bool equal(property_base_t *) const
This property is never equal to anything else.
Definition: dirtifier.hpp:40
void set_from_str(const std::string &)
Definition: dirtifier.hpp:48
dirtifier_t()
Definition: dirtifier.hpp:21
bool is_dirty() const
This property is always dirty.
Definition: dirtifier.hpp:28
bool is_valid() const
This property is always invalid.
Definition: dirtifier.hpp:34
void force_dirty()
Always dirty, so this can be called as often as we like.
Definition: dirtifier.hpp:46
Definition: property.hpp:26
property_base_t(const std::string &id, const res_source_info &source_info)
Definition: property.hpp:36
Definition: build_info.hpp:12
Definition: res_source_info.hpp:18
Definition: exception.hpp:133
Definition: exception.hpp:97