00001 #ifndef QPID_FRAMING_BODYFACTORY_H
00002 #define QPID_FRAMING_BODYFACTORY_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <boost/intrusive_ptr.hpp>
00026
00027 namespace qpid {
00028 namespace framing {
00029
00034 class BodyFactory {
00035 public:
00036 template <class BodyType> static boost::intrusive_ptr<BodyType> create() {
00037 return new BodyType;
00038 }
00039
00040 template <class BodyType> static boost::intrusive_ptr<BodyType> copy(const BodyType& body) {
00041 return new BodyType(body);
00042 }
00043 };
00044
00045 }}
00046
00047 #endif