TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/memory/LinkData.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_LINKDATA_HPP_
00002 #define _TUTTLE_HOST_LINKDATA_HPP_
00003 
00004 #include "MemoryPool.hpp"
00005 
00006 namespace tuttle {
00007 namespace host {
00008 namespace memory {
00009 
00010 /**
00011  * @brief A link to an external buffer which can't be managed by the MemoryPool.
00012  */
00013 class LinkData : public IPoolData
00014 {
00015         LinkData();
00016         LinkData( const LinkData& );
00017         
00018 public:
00019         LinkData( char* dataLink )
00020         : _dataLink(dataLink)
00021         {}
00022 
00023         ~LinkData ()
00024         {
00025                 // we don't own _dataLink
00026         }
00027 
00028         char*        data() { return _dataLink; }
00029         const char*  data() const { return _dataLink; }
00030 
00031         const size_t size() const { return 0; }
00032         const size_t reservedSize() const { return 0; }
00033 
00034         void addRef() {}
00035         void release() {}
00036 
00037 private:
00038         char* const _dataLink;
00039 };
00040 
00041 }
00042 }
00043 }
00044 
00045 #endif
00046