smart_ptr.cpp
Go to the documentation of this file.
00001 /* Generated from orogen/lib/orogen/templates/typekit/smart_ptr.cpp */
00002 
00003 <%= into.arg_type %> orogen_typekits::toIntermediate(<%= from.arg_type %> real_type)
00004 {
00005     if (!real_type.get())
00006         throw std::runtime_error("trying access the value inside an unset smart pointer");
00007     return *real_type;
00008 }
00009 bool orogen_typekits::fromIntermediate(<%= from.ref_type %> real_type, <%= into.cxx_name %>* intermediate)
00010 {
00011     if (real_type.get() != intermediate)
00012         real_type.reset(intermediate);
00013     return true; // the smart pointer took ownership of the pointer
00014 }


orogen
Author(s): Sylvain Joyeux/sylvain.joyeux@m4x.org
autogenerated on Sat Jun 8 2019 19:52:17