Line data Source code
1 : /* 2 : * 3 : * 4 : * Distributed under the OpenDDS License. 5 : * See: http://www.opendds.org/license.html 6 : */ 7 : 8 : OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 9 : 10 : namespace OpenDDS { 11 : namespace DCPS { 12 : 13 : #ifndef OPENDDS_SAFETY_PROFILE 14 : template<typename DatumType> 15 : ACE_INLINE 16 0 : std::ostream& operator<<( 17 : std::ostream& str, 18 : const DataCollector<DatumType>& value) 19 : { 20 0 : return value.insert(str); 21 : } 22 : #endif //OPENDDS_SAFETY_PROFILE 23 : 24 : template<typename DatumType> 25 : ACE_INLINE 26 0 : DataCollector<DatumType>::DataCollector(unsigned int bound, OnFull onFull) 27 0 : : buffer_(bound), 28 0 : writeAt_(0), 29 0 : bound_(bound), 30 0 : full_(false), 31 0 : onFull_(onFull) 32 : { 33 0 : if (this->onFull_ == Unbounded) { 34 0 : this->buffer_.clear(); 35 : } 36 0 : } 37 : 38 : #ifndef OPENDDS_SAFETY_PROFILE 39 : template<typename DatumType> 40 : ACE_INLINE 41 : DataCollector<DatumType>& 42 : DataCollector<DatumType>::operator<<(DatumType datum) 43 : { 44 : this->collect(datum); 45 : return *this; 46 : } 47 : #endif //OPENDDS_SAFETY_PROFILE 48 : 49 : } // namespace DCPS 50 : } // namespace OpenDDS 51 : 52 : OPENDDS_END_VERSIONED_NAMESPACE_DECL