00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 namespace OpenDDS { 00009 namespace DCPS { 00010 00011 ACE_INLINE size_t 00012 TransportSendBuffer::capacity() const 00013 { 00014 return this->capacity_; 00015 } 00016 00017 ACE_INLINE void 00018 TransportSendBuffer::bind(TransportSendStrategy* strategy) 00019 { 00020 this->strategy_ = strategy; 00021 } 00022 00023 00024 // class SingleSendBuffer 00025 00026 ACE_INLINE size_t 00027 SingleSendBuffer::n_chunks() const 00028 { 00029 return this->n_chunks_; 00030 } 00031 00032 ACE_INLINE SequenceNumber 00033 SingleSendBuffer::low() const 00034 { 00035 if (this->buffers_.empty()) throw std::exception(); 00036 return this->buffers_.begin()->first; 00037 } 00038 00039 ACE_INLINE SequenceNumber 00040 SingleSendBuffer::high() const 00041 { 00042 if (this->buffers_.empty()) throw std::exception(); 00043 return this->buffers_.rbegin()->first; 00044 } 00045 00046 ACE_INLINE bool 00047 SingleSendBuffer::empty() const 00048 { 00049 return this->buffers_.empty(); 00050 } 00051 00052 ACE_INLINE bool 00053 SingleSendBuffer::contains(const SequenceNumber& seq) const 00054 { 00055 return this->buffers_.count(seq); 00056 } 00057 00058 } // namespace DCPS 00059 } // namespace OpenDDS