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

Initializer.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00004 //                                                                     //
00005 //  This library is free software; you can redistribute it and/or      //
00006 //  modify it under the terms of the GNU Lesser General Public         //
00007 //  License as published by the Free Software Foundation; either       //
00008 //  version 2.1 of the License, or (at your option) any later version. //
00009 //                                                                     //
00010 //  This library is distributed in the hope that it will be useful,    //
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of     //
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   //
00013 //  Lesser General Public License for more details.                    //
00014 //                                                                     //
00015 //  You should have received a copy of the GNU Lesser General Public   //
00016 //  License along with this library (see file COPYING); if not, write  //
00017 //  to the Free Software Foundation, Inc., 59 Temple Place, Suite      //
00018 //  330, Boston, MA 02111-1307 USA, or contact the author.             //
00019 //                                                                     //
00021 
00032 #include "Initializer.h"
00033 #include "AIDA_Dev/IDevAnalysisFactory.h"
00034 #include "AIDA_Dev/IPlotterFactoryProvider.h"
00035 #include "AIDA_PlotterFactoryProvider.h"
00036 #include <iostream>
00037 
00038 
00039 
00040 namespace Anaphe {
00041 namespace AIDA_Plotter_Grace {
00042 
00043 
00044 
00045 Initializer::Initializer(AIDA_PlotterFactoryProvider* provider) 
00046 {
00047   if (provider != 0) {
00048     AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
00049     if (af) {
00050       AIDA::Dev::IDevAnalysisFactory* daf = 
00051         dynamic_cast<AIDA::Dev::IDevAnalysisFactory*>(af);
00052       AIDA::Dev::IPlotterFactoryProvider* dprov = 
00053         dynamic_cast<AIDA::Dev::IPlotterFactoryProvider*>(provider);
00054       if (daf != 0 && dprov != 0) {
00055         daf->registerPlotterFactoryProvider(dprov);
00056       }
00057       delete af;
00058     }
00059   }
00060 }
00061 
00062 
00063 
00064 
00065 } // end of namespace AIDA_Plotter_Grace
00066 } // end of namespace Anaphe

Generated on Tue Jan 28 13:30:45 2003 for Anaphe_AIDA_Plotter_Grace by doxygen1.2.16