/*
 * $Id: Generator_getLink.cpp 88 2008-12-10 18:31:39Z rosiere $
 *
 * [ Description ]
 * 
 */

#include "Behavioural/Configuration/include/Generator.h"

namespace morpheo {
namespace behavioural {
namespace configuration {

#undef  FUNCTION
#define FUNCTION "Generator::getLink"
  Link_definition * Generator::getLink (std::string name)
  {
    log_begin(Configuration,FUNCTION);

    std::map<std::string, Link_definition *>::iterator it_link = _array_link->find(name);
    
    if (it_link == _array_link->end())
      {
        throw (ERRORMORPHEO(FUNCTION,toString(_("Link \"%s\" is unknow.\n"),name.c_str())));
      }

    log_end(Configuration,FUNCTION);

    return it_link->second;
  };

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