OpenDDS::DCPS::GroupRakeData Class Reference

#include <GroupRakeData.h>

List of all members.

Classes

class  SortedSetCmp

Public Member Functions

 GroupRakeData ()
bool insert_sample (ReceivedDataElement *sample, SubscriptionInstance_rch i, size_t index_in_instance)
void get_datareaders (DDS::DataReaderSeq &readers)
bool copy_to_user ()
void reset ()
RakeData get_data ()

Private Member Functions

 GroupRakeData (const GroupRakeData &)
GroupRakeDataoperator= (const GroupRakeData &)
typedef OPENDDS_MULTISET_CMP (RakeData, SortedSetCmp) SortedSet

Private Attributes

SortedSet sorted_
SortedSet::iterator current_sample_

Detailed Description

Rake is an abbreviation for "read or take". This class manages the results from a read() or take() operation, which are the received_data and the info_seq sequences passed in by-reference from the user.

Definition at line 33 of file GroupRakeData.h.


Constructor & Destructor Documentation

OpenDDS::DCPS::GroupRakeData::GroupRakeData (  ) 

Definition at line 19 of file GroupRakeData.cpp.

00020 {
00021 }

OpenDDS::DCPS::GroupRakeData::GroupRakeData ( const GroupRakeData  )  [private]

Member Function Documentation

bool OpenDDS::DCPS::GroupRakeData::copy_to_user (  ) 
RakeData OpenDDS::DCPS::GroupRakeData::get_data (  ) 

Definition at line 64 of file GroupRakeData.cpp.

References current_sample_.

00065 {
00066   RakeData data = *this->current_sample_;
00067   ++this->current_sample_;
00068   return data;
00069 }

void OpenDDS::DCPS::GroupRakeData::get_datareaders ( DDS::DataReaderSeq readers  ) 

Definition at line 41 of file GroupRakeData.cpp.

References sorted_.

Referenced by OpenDDS::DCPS::SubscriberImpl::get_datareaders().

00042 {
00043   ACE_UNUSED_ARG(readers);
00044 #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE
00045   readers.length(static_cast<CORBA::ULong>(this->sorted_.size()));
00046   CORBA::ULong i = 0;
00047   SortedSet::iterator itEnd = this->sorted_.end();
00048   for (SortedSet::iterator it = this->sorted_.begin(); it != itEnd; ++it) {
00049     readers[i++] =
00050       DDS::DataReader::_duplicate(it->si_->instance_state_.data_reader());
00051   }
00052 #endif
00053 }

Here is the caller graph for this function:

bool OpenDDS::DCPS::GroupRakeData::insert_sample ( ReceivedDataElement sample,
SubscriptionInstance_rch  i,
size_t  index_in_instance 
)

Returns false if the sample will definitely not be part of the resulting dataset, however if this returns true it still may be excluded (due to sorting and max_samples).

Definition at line 24 of file GroupRakeData.cpp.

References current_sample_, OpenDDS::DCPS::ReceivedDataElement::registered_data_, and sorted_.

Referenced by OpenDDS::DCPS::DataReaderImpl::get_ordered_data().

00027 {
00028   // Ignore DISPOSE and UNREGISTER messages in case they are sent
00029   // in the group coherent changes, but it shouldn't.
00030   if (!sample->registered_data_) return false;
00031 
00032   RakeData rd = {sample, instance, index_in_instance};
00033   this->sorted_.insert(rd);
00034 
00035   this->current_sample_ = this->sorted_.begin();
00036   return true;
00037 }

Here is the caller graph for this function:

typedef OpenDDS::DCPS::GroupRakeData::OPENDDS_MULTISET_CMP ( RakeData  ,
SortedSetCmp   
) [private]
GroupRakeData& OpenDDS::DCPS::GroupRakeData::operator= ( const GroupRakeData  )  [private]
void OpenDDS::DCPS::GroupRakeData::reset ( void   ) 

Definition at line 57 of file GroupRakeData.cpp.

References sorted_.

Referenced by OpenDDS::DCPS::DataReaderImpl::end_access().

00058 {
00059   this->sorted_.clear();
00060 }

Here is the caller graph for this function:


Member Data Documentation

SortedSet::iterator OpenDDS::DCPS::GroupRakeData::current_sample_ [private]

Definition at line 80 of file GroupRakeData.h.

Referenced by get_data(), and insert_sample().

Definition at line 78 of file GroupRakeData.h.

Referenced by get_datareaders(), insert_sample(), and reset().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1