USRP Hardware Driver and USRP Manual  Version: 003.010.001.HEAD-0-gc705922a
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 dirty_tracked &source)
 
UHD_INLINE const data_t & get () const
 
UHD_INLINE bool is_dirty () const
 
UHD_INLINE void mark_clean ()
 
UHD_INLINE void force_dirty ()
 
UHD_INLINE dirty_trackedoperator= (const data_t &value)
 
UHD_INLINE dirty_trackedoperator= (const dirty_tracked &source)
 
UHD_INLINE 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 dirty_tracked< data_t > &  source)
inline

Copy ctor: Assign source to this type

Member Function Documentation

◆ force_dirty()

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

Mark the underlying data as dirty

◆ get()

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

Get underlying data

◆ is_dirty()

template<typename data_t>
UHD_INLINE 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>
UHD_INLINE void uhd::dirty_tracked< data_t >::mark_clean ( )
inline

Mark the underlying data as clean

◆ operator const data_t &()

template<typename data_t>
UHD_INLINE 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>
UHD_INLINE 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>
UHD_INLINE 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: