#include <GroupRakeData.h>
Public Member Functions | |
GroupRakeData () | |
bool | insert_sample (ReceivedDataElement *sample, SubscriptionInstance *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 &) | |
GroupRakeData & | operator= (const GroupRakeData &) |
typedef | OPENDDS_MULTISET_CMP (RakeData, SortedSetCmp) SortedSet |
Private Attributes | |
SortedSet | sorted_ |
SortedSet::iterator | current_sample_ |
Classes | |
class | SortedSetCmp |
Definition at line 31 of file GroupRakeData.h.
OpenDDS::DCPS::GroupRakeData::GroupRakeData | ( | ) |
OpenDDS::DCPS::GroupRakeData::GroupRakeData | ( | const GroupRakeData & | ) | [private] |
bool OpenDDS::DCPS::GroupRakeData::copy_to_user | ( | ) |
RakeData OpenDDS::DCPS::GroupRakeData::get_data | ( | ) |
Definition at line 62 of file GroupRakeData.cpp.
References current_sample_.
00063 { 00064 RakeData data = *this->current_sample_; 00065 ++this->current_sample_; 00066 return data; 00067 }
void OpenDDS::DCPS::GroupRakeData::get_datareaders | ( | DDS::DataReaderSeq & | readers | ) |
Definition at line 39 of file GroupRakeData.cpp.
References sorted_.
Referenced by OpenDDS::DCPS::SubscriberImpl::get_datareaders().
00040 { 00041 ACE_UNUSED_ARG(readers); 00042 #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE 00043 readers.length(static_cast<CORBA::ULong>(this->sorted_.size())); 00044 int i = 0; 00045 SortedSet::iterator itEnd = this->sorted_.end(); 00046 for (SortedSet::iterator it = this->sorted_.begin(); it != itEnd; ++it) { 00047 readers[i++] = 00048 DDS::DataReader::_duplicate(it->si_->instance_state_.data_reader()); 00049 } 00050 #endif 00051 }
bool OpenDDS::DCPS::GroupRakeData::insert_sample | ( | ReceivedDataElement * | sample, | |
SubscriptionInstance * | 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 22 of file GroupRakeData.cpp.
References current_sample_, OpenDDS::DCPS::ReceivedDataElement::registered_data_, and sorted_.
Referenced by OpenDDS::DCPS::DataReaderImpl::get_ordered_data().
00025 { 00026 // Ignore DISPOSE and UNREGISTER messages in case they are sent 00027 // in the group coherent changes, but it shouldn't. 00028 if (!sample->registered_data_) return false; 00029 00030 RakeData rd = {sample, instance, index_in_instance}; 00031 this->sorted_.insert(rd); 00032 00033 this->current_sample_ = this->sorted_.begin(); 00034 return true; 00035 }
typedef OpenDDS::DCPS::GroupRakeData::OPENDDS_MULTISET_CMP | ( | RakeData | , | |
SortedSetCmp | ||||
) | [private] |
GroupRakeData& OpenDDS::DCPS::GroupRakeData::operator= | ( | const GroupRakeData & | ) | [private] |
void OpenDDS::DCPS::GroupRakeData::reset | ( | ) |
Definition at line 55 of file GroupRakeData.cpp.
References sorted_.
Referenced by OpenDDS::DCPS::DataReaderImpl::end_access().
00056 { 00057 this->sorted_.clear(); 00058 }
SortedSet::iterator OpenDDS::DCPS::GroupRakeData::current_sample_ [private] |
SortedSet OpenDDS::DCPS::GroupRakeData::sorted_ [private] |
Definition at line 76 of file GroupRakeData.h.
Referenced by get_datareaders(), insert_sample(), and reset().