/*
 * $Id: Model_get_type.cpp 118 2009-05-20 22:01:32Z 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              
