Loading...
Searching...
No Matches
dirtifier.hpp
Go to the documentation of this file.
//
// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/rfnoc/property.hpp>
namespace uhd { namespace rfnoc {
class dirtifier_t : public property_base_t
{
public:
dirtifier_t()
: property_base_t("__ALWAYS_DIRTY__", res_source_info(res_source_info::FRAMEWORK))
{
// nop
}
bool is_dirty() const override
{
return true;
}
bool is_valid() const override
{
return false;
}
bool equal(property_base_t*) const override
{
return false;
}
void force_dirty() override {}
void set_from_str(const std::string&) override
{
throw uhd::runtime_error("Dirtifier property can never be set!");
}
private:
void mark_clean() override {}
void forward(property_base_t*) override
{
throw uhd::type_error("Cannot forward to or from dirtifier property!");
}
bool is_type_equal(property_base_t*) const override
{
return false;
}
};
}} /* namespace uhd::rfnoc */
uhd::rfnoc::dirtifier_t::force_dirty
void force_dirty() override
Always dirty, so this can be called as often as we like.
Definition dirtifier.hpp:46
uhd::rfnoc::dirtifier_t::set_from_str
void set_from_str(const std::string &) override
Definition dirtifier.hpp:48
uhd::rfnoc::dirtifier_t::is_dirty
bool is_dirty() const override
This property is always dirty.
Definition dirtifier.hpp:28
uhd::rfnoc::dirtifier_t::dirtifier_t
dirtifier_t()
Definition dirtifier.hpp:21
uhd::rfnoc::dirtifier_t::equal
bool equal(property_base_t *) const override
This property is never equal to anything else.
Definition dirtifier.hpp:40
uhd::rfnoc::dirtifier_t::is_valid
bool is_valid() const override
This property is always invalid.
Definition dirtifier.hpp:34
uhd::rfnoc::property_base_t::property_base_t
property_base_t(const std::string &id, const res_source_info &source_info)
Definition property.hpp:36
uhd::rfnoc
Definition actions.hpp:24
uhd
Definition build_info.hpp:12
property.hpp
uhd::rfnoc::res_source_info
Definition res_source_info.hpp:18
uhd::runtime_error
Definition exception.hpp:132
uhd::type_error
Definition exception.hpp:96