Back to index

nordugrid-arc-nox  1.1.0~rc6
JobDescriptionParser.cpp
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifdef HAVE_CONFIG_H
00004 #include <config.h>
00005 #endif
00006 
00007 #include <arc/Logger.h>
00008 
00009 #include "JobDescriptionParser.h"
00010 
00011 namespace Arc {
00012 
00013   Logger JobDescriptionParser::logger(Logger::getRootLogger(),
00014                                       "JobDescriptionParser");
00015 
00016   JobDescriptionParser::JobDescriptionParser() {}
00017 
00018   JobDescriptionParser::~JobDescriptionParser() {}
00019 
00020   void JobDescriptionParser::AddHint(const std::string& key,const std::string& value) {
00021     if(key.empty()) return;
00022     hints[key] = value;
00023   }
00024  
00025   std::string JobDescriptionParser::GetHint(const std::string& key) const {
00026     std::map<std::string,std::string>::const_iterator h = hints.find(key);
00027     if(h == hints.end()) return "";
00028     return h->second;
00029   }
00030 
00031   void JobDescriptionParser::SetHints(const std::map<std::string,std::string>& hints) {
00032     this->hints = hints;
00033   }
00034 
00035 
00036 } // namespace Arc