RTI Connext Modern C++ API  Version 6.1.1
dds::sub::status::DataState Class Reference

The DataState class describes the state of a sample and includes the information about the sample's InstanceState, ViewState, and SampleState. More...

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

Inheritance diagram for dds::sub::status::DataState:
rti::sub::status::DataStateEx

Public Member Functions

 DataState ()
 Create a DataState with InstanceState::any(), ViewState::any(), and SampleState::any() More...
 
 DataState (const SampleState &the_sample_state)
 Create a DataState with InstanceState::any(), ViewState::any(), and the provided SampleState. More...
 
 DataState (const ViewState &the_view_state)
 Create a DataState with InstanceState::any(), SampleState::any(), and the provided ViewState. More...
 
 DataState (const InstanceState &the_instance_state)
 Create a DataState with SampleState::any(), ViewState::any(), and the provided InstanceState. More...
 
 DataState (const SampleState &the_sample_state, const ViewState &the_view_state, const InstanceState &the_instance_state)
 Create a DataState with the provided SampleState, ViewState, and InstanceState. More...
 
bool operator== (const DataState &other) const
 Compare two DataState objects for equality. More...
 
bool operator!= (const DataState &other) const
 Compare two DataState objects for inequality. More...
 
DataStateoperator<< (const SampleState &the_sample_state)
 Set the provided SampleState in a DataState object. More...
 
DataStateoperator<< (const InstanceState &the_instance_state)
 Set the provided InstanceState in a DataState object. More...
 
DataStateoperator<< (const ViewState &the_view_state)
 Set the provided ViewState in a DataState object. More...
 
const DataStateoperator>> (SampleState &the_sample_state) const
 Get the SampleState from a DataState object. More...
 
const DataStateoperator>> (InstanceState &the_instance_state) const
 Get the InstanceState from a DataState object. More...
 
const DataStateoperator>> (ViewState &the_view_state) const
 Get the ViewState from a DataState object. More...
 
const SampleStatesample_state () const
 Get the SampleState from a DataState object. More...
 
void sample_state (const SampleState &the_sample_state)
 Set the provided SampleState in a DataState object. More...
 
const InstanceStateinstance_state () const
 Get the InstanceState from a DataState object. More...
 
void instance_state (const InstanceState &the_instance_state)
 Set the provided InstanceState in a DataState object. More...
 
const ViewStateview_state () const
 Get the ViewState from a DataState object. More...
 
void view_state (const ViewState &the_view_state)
 Set the provided ViewState in a DataState object. More...
 

Static Public Member Functions

static DataState any ()
 Create a DataState with InstanceState::any(), ViewState::any(), and SampleState::any() More...
 
static DataState new_data ()
 Create a DataState with InstanceState::alive(), ViewState::any(), and SampleState::not_read() More...
 
static DataState any_data ()
 Create a DataState with InstanceState::alive(), ViewState::any(), and SampleState::any() More...
 
static DataState new_instance ()
 Create a DataState with InstanceState::alive(), ViewState::new_view(), and SampleState::any() More...
 

Friends

void swap (DataState &left, DataState &right) OMG_NOEXCEPT
 Swap the contents of two DataState objects. More...
 

Related Functions

(Note that these are not member functions.)

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

Detailed Description

The DataState class describes the state of a sample and includes the information about the sample's InstanceState, ViewState, and SampleState.

Constructor & Destructor Documentation

◆ DataState() [1/5]

dds::sub::status::DataState::DataState ( )
inline

◆ DataState() [2/5]

dds::sub::status::DataState::DataState ( const SampleState the_sample_state)
inline

Create a DataState with InstanceState::any(), ViewState::any(), and the provided SampleState.

Note that the constructor is implicit, so you can use a SampleState wherever a DataState is expected.

◆ DataState() [3/5]

dds::sub::status::DataState::DataState ( const ViewState the_view_state)
inline

Create a DataState with InstanceState::any(), SampleState::any(), and the provided ViewState.

Note that the constructor is implicit, so you can use a ViewState wherever a DataState is expected.

◆ DataState() [4/5]

dds::sub::status::DataState::DataState ( const InstanceState the_instance_state)
inline

Create a DataState with SampleState::any(), ViewState::any(), and the provided InstanceState.

Note that the constructor is implicit, so you can use a InstanceState wherever a DataState is expected.

◆ DataState() [5/5]

dds::sub::status::DataState::DataState ( const SampleState the_sample_state,
const ViewState the_view_state,
const InstanceState the_instance_state 
)
inline

Create a DataState with the provided SampleState, ViewState, and InstanceState.

Member Function Documentation

◆ operator==()

bool dds::sub::status::DataState::operator== ( const DataState other) const
inline

Compare two DataState objects for equality.

References instance_state(), sample_state(), and view_state().

◆ operator!=()

bool dds::sub::status::DataState::operator!= ( const DataState other) const
inline

Compare two DataState objects for inequality.

◆ operator<<() [1/3]

DataState& dds::sub::status::DataState::operator<< ( const SampleState the_sample_state)
inline

Set the provided SampleState in a DataState object.

◆ operator<<() [2/3]

DataState& dds::sub::status::DataState::operator<< ( const InstanceState the_instance_state)
inline

Set the provided InstanceState in a DataState object.

◆ operator<<() [3/3]

DataState& dds::sub::status::DataState::operator<< ( const ViewState the_view_state)
inline

Set the provided ViewState in a DataState object.

◆ operator>>() [1/3]

const DataState& dds::sub::status::DataState::operator>> ( SampleState the_sample_state) const
inline

Get the SampleState from a DataState object.

◆ operator>>() [2/3]

const DataState& dds::sub::status::DataState::operator>> ( InstanceState the_instance_state) const
inline

Get the InstanceState from a DataState object.

◆ operator>>() [3/3]

const DataState& dds::sub::status::DataState::operator>> ( ViewState the_view_state) const
inline

Get the ViewState from a DataState object.

◆ sample_state() [1/2]

const SampleState& dds::sub::status::DataState::sample_state ( ) const
inline

Get the SampleState from a DataState object.

Referenced by dds::sub::find(), and operator==().

◆ sample_state() [2/2]

void dds::sub::status::DataState::sample_state ( const SampleState the_sample_state)
inline

Set the provided SampleState in a DataState object.

◆ instance_state() [1/2]

const InstanceState& dds::sub::status::DataState::instance_state ( ) const
inline

Get the InstanceState from a DataState object.

Referenced by dds::sub::find(), and operator==().

◆ instance_state() [2/2]

void dds::sub::status::DataState::instance_state ( const InstanceState the_instance_state)
inline

Set the provided InstanceState in a DataState object.

◆ view_state() [1/2]

const ViewState& dds::sub::status::DataState::view_state ( ) const
inline

Get the ViewState from a DataState object.

Referenced by dds::sub::find(), and operator==().

◆ view_state() [2/2]

void dds::sub::status::DataState::view_state ( const ViewState the_view_state)
inline

Set the provided ViewState in a DataState object.

◆ any()

◆ new_data()

◆ any_data()

◆ new_instance()

Friends And Related Function Documentation

◆ swap

void swap ( DataState left,
DataState right 
)
friend

Swap the contents of two DataState objects.

◆ operator<<()

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

Prints a data state as a readable string.