Example #1
0
/** 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;
        }
    }
}
Example #2
0
/** 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 )
        {
            
        }
        
    }
    
}