DataCollector_T.inl

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 
00009 namespace OpenDDS {
00010 namespace DCPS {
00011 
00012 #ifndef OPENDDS_SAFETY_PROFILE
00013 template<typename DatumType>
00014 ACE_INLINE
00015 std::ostream& operator<<(
00016   std::ostream& str,
00017   const DataCollector<DatumType>& value)
00018 {
00019   return value.insert(str);
00020 }
00021 #endif //OPENDDS_SAFETY_PROFILE
00022 
00023 template<typename DatumType>
00024 ACE_INLINE
00025 DataCollector<DatumType>::DataCollector(unsigned int bound, OnFull onFull)
00026   : buffer_(bound),
00027     writeAt_(0),
00028     bound_(bound),
00029     full_(false),
00030     onFull_(onFull)
00031 {
00032   if (this->onFull_ == Unbounded) {
00033     this->buffer_.clear();
00034   }
00035 }
00036 
00037 #ifndef OPENDDS_SAFETY_PROFILE
00038 template<typename DatumType>
00039 ACE_INLINE
00040 DataCollector<DatumType>&
00041 DataCollector<DatumType>::operator<<(DatumType datum)
00042 {
00043   this->collect(datum);
00044   return *this;
00045 }
00046 #endif //OPENDDS_SAFETY_PROFILE
00047 
00048 } // namespace DCPS
00049 } // namespace OpenDDS

Generated on Fri Feb 12 20:05:19 2016 for OpenDDS by  doxygen 1.4.7