OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::sub::GenerationCount Class Reference

Class to hold sample GenerationCount information and is part of dds::sub::SampleInfo. More...

#include "GenerationCount.hpp"

Inheritance diagram for dds::sub::GenerationCount:
Inheritance graph

Public Member Functions

int32_t disposed () const
 
int32_t no_writers () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 

Detailed Description

Class to hold sample GenerationCount information and is part of dds::sub::SampleInfo.

Generations A generation is defined as: ‘the number of times an instance has become alive (with instance_state==ALIVE) at the time the sample was received’. Note that the generation counters are initialized to zero when a DataReader first detects a never-seen-before instance.

For each instance the middleware internally maintains two counts: the disposed_generation_count and no_writers_generation_count, relative to each DataReader:

Two types of generations are distinguished: disposed_generation_count and no_writers_generation_count.

  • The disposed_generation_count and no_writers_generation_count are initialized to zero when the DataReader first detects the presence of a never-seen-before instance.
  • The disposed_generation_count is incremented each time the instance_state of the corresponding instance changes from not_alive_disposed to alive.
  • The no_writers_generation_count is incremented each time the instance_state of the corresponding instance changes from not_alive_no_writers to alive.

The disposed_generation_count and no_writers_generation_count associated with the SampleInfo capture a snapshot of the corresponding counters at the time the sample was received.

See also
SampleInfo for more information

Definition at line 63 of file GenerationCount.hpp.

Member Function Documentation

◆ disposed()

int32_t dds::sub::GenerationCount::disposed ( ) const

Gets the disposed_generation_count.

The disposed_generation_count is initialized at zero and is incremented each time the instance_state, of the corresponding instance, changes from not_alive_disposed to alive.

Returns
the disposed_generation_count

Definition at line 48 of file GenerationCountImpl.hpp.

◆ no_writers()

int32_t dds::sub::GenerationCount::no_writers ( ) const
inline

Gets the no_writers_generation_count.

The no_writers_generation_count is initialized at zero and is incremented each time the instance_state, of the corresponding instance, changes from not_alive_no_writers to alive.

Returns
the no_writers_generation_count

Definition at line 54 of file GenerationCountImpl.hpp.

◆ operator!=()

template<typename D >
bool dds::core::Value< D >::operator!= ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if not equal

Definition at line 99 of file Value.hpp.

◆ operator->() [1/2]

template<typename D >
D * dds::core::Value< D >::operator-> ( )
inherited

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 111 of file Value.hpp.

◆ operator->() [2/2]

template<typename D >
const D * dds::core::Value< D >::operator-> ( ) const
inherited

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 105 of file Value.hpp.

◆ operator==()

template<typename D >
bool dds::core::Value< D >::operator== ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if equal

Definition at line 93 of file Value.hpp.


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