Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

MemoryFunctionCopier.cpp

Go to the documentation of this file.
00001 #include "MemoryFunctionCopier.h"
00002 #include "AIDA_Dev/IDevAnalysisFactory.h"
00003 #include "AIDA_Dev/IFunctionFactoryProvider.h"
00004 #include "AIDA_Dev/IDevFunctionFactory.h"
00005 #include "AIDA_Dev/IDevFunction.h"
00006 #include <typeinfo>
00007 
00008 
00009 Anaphe::AIDA_MemoryStore::MemoryFunctionCopier::MemoryFunctionCopier( AIDA::Dev::IDevAnalysisFactory& af ):
00010   m_af( af )
00011 {}
00012 
00013 
00014 AIDA::Dev::IDevManagedObject*
00015 Anaphe::AIDA_MemoryStore::MemoryFunctionCopier::createCopy( const AIDA::IManagedObject& dataObject )
00016 {
00017   AIDA::Dev::IFunctionFactoryProvider* hfp = m_af.functionFactoryProvider();
00018   AIDA::Dev::IDevFunctionFactory& factory = hfp->devFunctionFactory();
00019 
00020   try {
00021     const AIDA::IFunction& function = dynamic_cast< const AIDA::IFunction& >( dataObject );
00022     return factory.cloneFunction( &( const_cast< AIDA::IFunction& >( function ) ) );
00023   }
00024   catch( std::bad_cast ) {
00025   }                   
00026   return 0;
00027 }

Generated on Tue May 20 14:49:33 2003 for AIDA_MemoryStore by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002