RTI Connext Modern C++ API  Version 6.1.0
dds::sub::status::SampleState Class Reference

Indicates whether or not a sample has ever been read. More...

#include <dds/sub/status/DataState.hpp>

Inherits bitset< OMG_DDS_STATE_BIT_COUNT >.

Public Types

typedef std::bitset< OMG_DDS_STATE_BIT_COUNT > MaskType
 An std::bitset of SampleStates. More...
 

Public Member Functions

 SampleState (const MaskType &other)
 Create an SampleState from MaskType. More...
 

Static Public Member Functions

static const SampleState read ()
 Creates a read SampleState. More...
 
static const SampleState not_read ()
 Creates a not_read SampleState object. More...
 
static const SampleState any ()
 Creates a SampleState object representing any sample state. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, const SampleState &s)
 Prints a sample state as a readable string. More...
 

Detailed Description

Indicates whether or not a sample has ever been read.

Member Typedef Documentation

◆ MaskType

typedef std::bitset<OMG_DDS_STATE_BIT_COUNT > dds::sub::status::SampleState::MaskType

An std::bitset of SampleStates.

Constructor & Destructor Documentation

◆ SampleState()

dds::sub::status::SampleState::SampleState ( const MaskType other)
inline

Create an SampleState from MaskType.

Parameters
otherThe MaskType to create the SampleState with

Member Function Documentation

◆ read()

static const SampleState dds::sub::status::SampleState::read ( )
inlinestatic

Creates a read SampleState.

Indicates that the application has already accessed that sample by means of a read or take operation.

◆ not_read()

static const SampleState dds::sub::status::SampleState::not_read ( )
inlinestatic

Creates a not_read SampleState object.

Indicates that the application has not accessed that sample before.

Referenced by dds::sub::status::DataState::new_data().

◆ any()

static const SampleState dds::sub::status::SampleState::any ( )
inlinestatic

Creates a SampleState object representing any sample state.

This is equivalent to read() | not_read()

Referenced by dds::sub::status::DataState::any(), dds::sub::status::DataState::any_data(), and dds::sub::status::DataState::new_instance().

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const SampleState s 
)
related

Prints a sample state as a readable string.