#include <uhd/rfnoc/property.hpp>
Base class for properties
Public Types | |
| enum | access_t { NONE , RO = 0x1 , RW = 0x3 , RWLOCKED = 0x5 } |
Public Member Functions | |
| property_base_t (const std::string &id, const res_source_info &source_info) | |
| virtual | ~property_base_t () |
| const std::string & | get_id () const |
| Gets the ID (name) of this property. More... | |
| const res_source_info & | get_src_info () const |
| Return the source info for this property. More... | |
| virtual bool | is_dirty () const =0 |
| Query this property's dirty flag. More... | |
| virtual bool | is_valid () const =0 |
| Query this property's valid flag. More... | |
| bool | read_access_granted () const |
| Returns true if this property can be read. More... | |
| bool | write_access_granted () const |
| Returns true if this property can be written to. More... | |
| access_t | get_access_mode () const |
| Return the current access mode. More... | |
| virtual bool | equal (property_base_t *rhs) const =0 |
| Return true if rhs has the same type and value. More... | |
| virtual std::unique_ptr< property_base_t > | clone (res_source_info) |
| Create a copy of this property. More... | |
| virtual void | force_dirty ()=0 |
| virtual void | set_from_str (const std::string &new_val_str)=0 |
Friends | |
| class | prop_accessor_t |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Create a copy of this property.
The copy must have the same type, value, and ID. However, it is often desirable to have a new source information, so that can be overridden.
The cleanliness state of original is not preserved. The new property will have the same cleanliness state as any other new property.
Reimplemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, and uhd::rfnoc::property_t< int >.
|
pure virtual |
Return true if rhs has the same type and value.
Implemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, uhd::rfnoc::property_t< int >, and uhd::rfnoc::dirtifier_t.
|
pure virtual |
|
inline |
Return the current access mode.
|
inline |
Gets the ID (name) of this property.
|
inline |
Return the source info for this property.
|
pure virtual |
Query this property's dirty flag.
If it's true, that means this property was recently changed, but changes have not propagated yet and still need resolving.
Implemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, uhd::rfnoc::property_t< int >, and uhd::rfnoc::dirtifier_t.
|
pure virtual |
Query this property's valid flag.
If it's false, that means this property has a default value that should NOT be forwarded.
Implemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, uhd::rfnoc::property_t< int >, and uhd::rfnoc::dirtifier_t.
|
inline |
Returns true if this property can be read.
|
pure virtual |
Set this property's value using a string
This requires the underlying property type to be convertible from a string.
| uhd::runtime_error | if the underlying type has no conversion from a string |
Implemented in uhd::rfnoc::property_t< data_t >, uhd::rfnoc::property_t< double >, uhd::rfnoc::property_t< int >, and uhd::rfnoc::dirtifier_t.
|
inline |
Returns true if this property can be written to.
|
friend |