StdPrimitiveTypeInfo.hpp
Go to the documentation of this file.
00001 #ifndef ORO_STD_PRIMITIVE_TYPE_INFO_HPP
00002 #define ORO_STD_PRIMITIVE_TYPE_INFO_HPP
00003 
00004 #include "../rtt-config.h"
00005 #include "../types/Types.hpp"
00006 #include "../types/PrimitiveTypeInfo.hpp"
00007 
00008 namespace RTT
00009 {
00010     namespace types {
00011 
00020         template<class T>
00021         struct StdPrimitiveTypeInfo
00022         : public PrimitiveTypeInfo<T,true>
00023         {
00024             StdPrimitiveTypeInfo(const char* type)
00025             : PrimitiveTypeInfo<T,true>(type)
00026               {}
00027 
00028             virtual bool composeType( base::DataSourceBase::shared_ptr source, base::DataSourceBase::shared_ptr result) const {
00029                 // First, try a plain update.
00030                 if ( result->update( source.get() ) )
00031                     return true;
00032                 return false;
00033             }
00034 
00038             virtual base::DataSourceBase::shared_ptr decomposeType(base::DataSourceBase::shared_ptr source) const {
00039                 return source;
00040             }
00041         };
00042     }
00043 }
00044 
00045 #endif


rtt
Author(s): RTT Developers
autogenerated on Thu Jan 2 2014 11:35:39