/** Insert inherited methods into method table */ void MethodTable::insertInheritedMethods( const MethodTable& inheritedMethods ) { for ( MethodTable::const_iterator it = inheritedMethods.begin(); it != inheritedMethods.end(); ++it ) { Function* theFunction = (*it).second->clone(); try { addFunction( (*it).first, theFunction ); } catch ( RbException ) { // Exception if we cannot overload. We do not worry about that // but need to delete the superfluous function delete theFunction; } } }
/** Insert inherited methods into method table */ void MethodTable::insertInheritedMethods( const MethodTable& inheritedMethods ) { for ( MethodTable::const_iterator it = inheritedMethods.begin(); it != inheritedMethods.end(); ++it ) { Function* theFunction = (*it).second->clone(); try { addFunction( theFunction ); } catch ( RbException ) { } } }