BasicQueueLinkChunk_T.h

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 #ifndef OPENDDS_DCPS_BASICQUEUELINKCHUNK_T_H
00009 #define OPENDDS_DCPS_BASICQUEUELINKCHUNK_T_H
00010 
00011 #include "BasicQueueLink_T.h"
00012 
00013 #include "ace/OS_NS_stdlib.h"
00014 #include "dds/DCPS/PoolAllocationBase.h"
00015 
00016 namespace OpenDDS {
00017 namespace DCPS {
00018 
00019 template <typename T>
00020 struct BasicQueueLinkChunk : public PoolAllocationBase {
00021   typedef BasicQueueLink<T> LinkType;
00022 
00023   BasicQueueLinkChunk(size_t chunk_size)
00024     : next_(0)
00025   {
00026     links_ = new LinkType[chunk_size];
00027   }
00028 
00029   ~BasicQueueLinkChunk() {
00030     delete [] links_;
00031   }
00032 
00033   /// The array of LinkType objects in this chunk.
00034   LinkType* links_;
00035 
00036   /// The next chunk (or 0 if this is the last chunk).
00037   BasicQueueLinkChunk<T>* next_;
00038 };
00039 
00040 } // namespace DCPS
00041 } // namespace OpenDDS
00042 
00043 #endif  /* OPENDDS_DCPS_BASICQUEUELINKCHUNK_T_H */

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