TuttleOFX
1
|
00001 #include "pointerParam.hpp" 00002 00003 #include <boost/lexical_cast.hpp> 00004 00005 #include <string> 00006 00007 namespace tuttle { 00008 namespace plugin { 00009 namespace memoryBuffer { 00010 00011 void* stringToPointer( const std::string& value ) 00012 { 00013 if( value.empty() ) 00014 return NULL; 00015 std::ptrdiff_t p = boost::lexical_cast<std::ptrdiff_t>( value ); 00016 return reinterpret_cast<void*>( p ); 00017 } 00018 00019 } 00020 } 00021 } 00022