예제 #1
0
		const std::string key(std::string comp){
			kul::String::replaceAll(comp, ".exe", "");
			if(cs.count(comp) > 0)return comp;
			if(comp.find(" ") != std::string::npos)
				for(const std::string& s :kul::String::split(comp, ' ')){
					if(cs.count(s) > 0) return s;
					if(std::string(kul::Dir(s).locl()).find(kul::Dir::SEP()) != std::string::npos)
						if(cs.count(s.substr(s.rfind(kul::Dir::SEP()) + 1)) > 0)
							return s.substr(s.rfind(kul::Dir::SEP()) + 1);
				}
			if(std::string(kul::Dir(comp).locl()).find(kul::Dir::SEP()) != std::string::npos)
				if(cs.count(comp.substr(comp.rfind(kul::Dir::SEP()) + 1)) > 0)
					return comp.substr(comp.rfind(kul::Dir::SEP()) + 1);
			KEXCEPT(CompilerNotFoundException, "Compiler for " + comp + " is not implemented");
		}
예제 #2
0
파일: man.hpp 프로젝트: mkn/mkn.kul
 const SCM& get(const std::string& s) throw(NotFoundException){
     if(SCMs.count(s) > 0) return *(*SCMs.find(s)).second;
     KEXCEPT(NotFoundException, "Source Control Management for " + s + " is not implemented");
 }