00001 #ifndef FASTSHOWER_PTRADAPTER_H 00002 #define FASTSHOWER_PTRADAPTER_H 00003 00004 00005 #ifndef FASTSHOWER_IPTRADAPTER_H 00006 #include "FastShowerUtils/IPtrAdapter.h" 00007 #endif 00008 00009 #ifndef STD_STRING_H 00010 #define STD_STRING_H 00011 #include <string> 00012 #endif 00013 00014 namespace FastShower{ 00015 00016 template<class Type, class InterfacePtr> 00017 class PtrAdapter: public IPtrAdapter<Type>{ 00018 public: 00019 Type* adapt(Type* ptr, const std::string& name) const{ 00020 Type* interfacePtr = new InterfacePtr(ptr, name); 00021 return interfacePtr; 00022 } 00023 }; 00024 } 00025 #endif 00026 00027 00028 00029