diff -r 015c4b6a0e07 -r 71b642707bef src/core/model/pointer.cc --- a/src/core/model/pointer.cc Tue Apr 17 11:26:31 2012 +0100 +++ b/src/core/model/pointer.cc Wed Apr 18 09:35:58 2012 -0700 @@ -18,6 +18,8 @@ * Authors: Mathieu Lacage */ #include "pointer.h" +#include "object-factory.h" +#include namespace ns3 { @@ -59,8 +61,19 @@ bool PointerValue::DeserializeFromString (std::string value, Ptr checker) { - NS_FATAL_ERROR ("It is not possible to deserialize a pointer."); - return false; + // We assume that the string you want to deserialize contains + // a description for an ObjectFactory to create an object and then assign it to the + // member variable. + ObjectFactory factory; + std::istringstream iss; + iss.str(value); + iss >> factory; + if (iss.fail()) + { + return false; + } + m_value = factory.Create (); + return true; } } // namespace ns3