TePDIMixModel.cpp

Go to the documentation of this file.
00001 #include "TePDIMixModel.hpp"
00002 #include "TePDIMixModelStratFactory.hpp"
00003 
00004 TePDIMixModel::TePDIMixModel()
00005 {
00006 }
00007 
00008 
00009 TePDIMixModel::~TePDIMixModel()
00010 {
00011 }
00012 
00013 void TePDIMixModel::ResetState(const TePDIParameters& params)
00014 {
00015         TePDIParameters dummy_params = params;
00016 }
00017 
00018 
00019 bool TePDIMixModel::CheckParameters(const TePDIParameters& parameters) const
00020 {
00021         std::string mixmodel_type;
00022         TEAGN_TRUE_OR_RETURN(parameters.GetParameter("mixmodel_type", mixmodel_type), "Missing parameter : mixmodel_type");
00023 
00024         TePDIMixModelStrategy::pointer mixmodel_strategy(TePDIMixModelStratFactory::make(mixmodel_type, parameters));
00025         
00026         TEAGN_TRUE_OR_RETURN(mixmodel_strategy.isActive(), "Invalid strategy");
00027 
00028         return mixmodel_strategy->CheckParameters(parameters);
00029 }
00030 
00031 
00032 bool TePDIMixModel::RunImplementation()
00033 {
00034         std::string mixmodel_type;
00035         TEAGN_TRUE_OR_RETURN(params_.GetParameter("mixmodel_type", mixmodel_type), "Missing parameter : mixmodel_type");
00036         
00037         TePDIMixModelStrategy::pointer mixmodel_strategy(TePDIMixModelStratFactory::make(mixmodel_type, params_));
00038         
00039         TEAGN_TRUE_OR_RETURN(mixmodel_strategy.isActive(), "Invalid strategy");
00040         
00041         return mixmodel_strategy->Apply(params_);
00042 }

Generated on Sun Jul 29 04:01:24 2012 for TerraLib - Development Source by  doxygen 1.5.3