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