コード例 #1
0
ファイル: MethodTable.cpp プロジェクト: wrightaprilm/revbayes
/** 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;
        }
    }
}
コード例 #2
0
ファイル: MethodTable.cpp プロジェクト: hscarter/revbayes
/** 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 )
        {
            
        }
        
    }
    
}