Buffer.hpp
00001
00002 #ifndef ORO_LIST_HPP
00003 #define ORO_LIST_HPP
00004
00005 #include "rtt-config.h"
00006
00012 #if defined(OROBLD_OS_NO_ASM)
00013 #include "BufferLocked.hpp"
00014 #else
00015 #include "BufferLockFree.hpp"
00016 #endif
00017
00018 namespace RTT
00019 {
00024 template< class T, class ReadPolicy = NonBlockingPolicy, class WritePolicy = NonBlockingPolicy >
00025 class Buffer
00026 #if defined(OROBLD_OS_NO_ASM)
00027 : public BufferLocked<T,ReadPolicy,WritePolicy>
00028 #else
00029 : public BufferLockFree<T,ReadPolicy,WritePolicy>
00030 #endif
00031 {
00032 public:
00033 typedef typename ReadInterface<T>::reference_t reference_t;
00034 typedef typename WriteInterface<T>::param_t param_t;
00035 typedef typename BufferInterface<T>::size_type size_type;
00036 typedef T value_t;
00037
00038 public:
00044 Buffer( int qsize, const T& initial_value = T())
00045 #if defined(OROBLD_OS_NO_ASM)
00046 : BufferLocked<T,ReadPolicy,WritePolicy>(qsize, initial_value)
00047 #else
00048 : BufferLockFree<T,ReadPolicy,WritePolicy>(qsize, initial_value)
00049 #endif
00050 {}
00051 };
00052 }
00053
00054
00055 #endif