| 205 | } |
| 206 | |
| 207 | void |
| 208 | OpenDDS::DCPS::DataDurabilityCache::sample_data_type::init |
| 209 | (const ACE_Message_Block * data) |
| 210 | { |
| 211 | this->length_ = data->total_length(); |
| 212 | |
| 213 | ACE_ALLOCATOR(this->sample_, |
| 214 | static_cast<char *>( |
| 215 | this->allocator_->malloc(this->length_))); |
| 216 | |
| 217 | char * buf = this->sample_; |
| 218 | |
| 219 | for (ACE_Message_Block const * i = data; |
| 220 | i != 0; |
| 221 | i = i->cont()) { |
| 222 | ACE_OS::memcpy(buf, i->rd_ptr(), i->length()); |
| 223 | buf += i->length(); |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | OpenDDS::DCPS::DataDurabilityCache::sample_data_type::sample_data_type( |
| 228 | sample_data_type const & rhs) |
nothing calls this directly
no test coverage detected