/*
 * $Id: Model_get_type.cpp 129 2009-06-29 16:38:40Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/include/Model.h"
#include "Common/include/Debug.h"

namespace morpheo              {
namespace behavioural          {

#undef  FUNCTION
#define FUNCTION "Model::get_type"
  model_type_t Model::get_type (std::string component)
  {
//     log_begin(Behavioural,FUNCTION);

    model_type_t _return;

    std::map<std::string,model_t>::iterator it = models.find(component);

    if (it != models.end())
      _return = it->second.type;
    else
      _return = default_type;

//     log_end(Behavioural,FUNCTION);

    return _return;
  }

}; // end namespace behavioural          
}; // end namespace morpheo              
