1 """Instantiate a forward declaration.""" 
    9     Instantiate typedefs of forward declarations. 
   10     This is useful when we wish to typedef a templated class 
   11     which is not defined in the current project. 
   14         class FactorFromAnotherMother; 
   16         typedef FactorFromAnotherMother<gtsam::Pose3> FactorWeCanUse; 
   18     def __init__(self, original, instantiations=(), new_name=
''):
 
   22                          parent=original.parent)
 
   29             original.name, instantiations) 
if not new_name 
else new_name
 
   32         """Generate the C++ code for wrapping.""" 
   33         instantiated_names = [
 
   37                                ",".join(instantiated_names))
 
   38         namespaces_name = self.namespaces()
 
   39         namespaces_name.append(name)
 
   41         return parser.Typename(namespaces_name).
to_cpp()
 
   44         return "Instantiated {}".
format(
 
   45             super(InstantiatedDeclaration, self).
__repr__())