USRP Hardware Driver and USRP Manual  Version: 4.7.0.0
UHD and USRP Manual
uhd::dirty_tracked< data_t > Class Template Reference

#include <uhd/utils/dirty_tracked.hpp>

Public Member Functions

 dirty_tracked ()
 
 dirty_tracked (const data_t &value)
 
 dirty_tracked (const uhd::dirty_tracked< data_t > &)=default
 
const data_t & get () const
 
bool is_dirty () const
 
void mark_clean ()
 
void force_dirty ()
 
dirty_trackedoperator= (const data_t &value)
 
dirty_trackedoperator= (const dirty_tracked &source)
 
 operator const data_t & () const
 

Detailed Description

template<typename data_t>
class uhd::dirty_tracked< data_t >

A class that wraps a data value with a dirty flag When the client uses the assignment operator on this object, the object automatically dirties itself if the assigned type is not equal the underlying data. Data can be cleaned using the mark_clean entry-point.

Requirements for data_t

  • Must have a default constructor
  • Must have a copy constructor
  • Must have an assignment operator (=)
  • Must have an equality operator (==)

Constructor & Destructor Documentation

◆ dirty_tracked() [1/3]

template<typename data_t>
uhd::dirty_tracked< data_t >::dirty_tracked ( )
inline

Default ctor: Initialize to default value and dirty

◆ dirty_tracked() [2/3]

template<typename data_t>
uhd::dirty_tracked< data_t >::dirty_tracked ( const data_t &  value)
inline

Initialize to specified value and dirty

◆ dirty_tracked() [3/3]

template<typename data_t>
uhd::dirty_tracked< data_t >::dirty_tracked ( const uhd::dirty_tracked< data_t > &  )
default

Member Function Documentation

◆ force_dirty()

template<typename data_t>
void uhd::dirty_tracked< data_t >::force_dirty ( )
inline

Mark the underlying data as dirty

◆ get()

template<typename data_t>
const data_t& uhd::dirty_tracked< data_t >::get ( void  ) const
inline

Get underlying data

◆ is_dirty()

template<typename data_t>
bool uhd::dirty_tracked< data_t >::is_dirty ( ) const
inline

Has the underlying data changed since the last time it was cleaned?

◆ mark_clean()

template<typename data_t>
void uhd::dirty_tracked< data_t >::mark_clean ( )
inline

Mark the underlying data as clean

◆ operator const data_t &()

template<typename data_t>
uhd::dirty_tracked< data_t >::operator const data_t & ( ) const
inline

Explicit conversion from this type to data_t

◆ operator=() [1/2]

template<typename data_t>
dirty_tracked& uhd::dirty_tracked< data_t >::operator= ( const data_t &  value)
inline

Assignment with data. Store the specified value and mark it as dirty if it is not equal to the underlying data.

◆ operator=() [2/2]

template<typename data_t>
dirty_tracked& uhd::dirty_tracked< data_t >::operator= ( const dirty_tracked< data_t > &  source)
inline

Assignment with dirty tracked type. Store the specified value from dirty type and mark it as dirty if it is not equal to the underlying data. This exists to optimize out an implicit cast from dirty_tracked type to data type.


The documentation for this class was generated from the following file: