3 #ifndef __ARC_JOBDESCRIPTIONPARSERPLUGIN_H__
4 #define __ARC_JOBDESCRIPTIONPARSERPLUGIN_H__
13 #include <arc/loader/Loader.h>
14 #include <arc/loader/Plugin.h>
36 operator bool(
void) {
return (v_ == Success); };
37 bool operator!(
void) {
return (v_ != Success); };
38 bool operator==(
bool v) {
return ((v_ == Success) == v); };
39 bool operator==(Result v) {
return (v_ == v); };
59 virtual JobDescriptionParserPluginResult Parse(
const std::string& source, std::list<JobDescription>& jobdescs,
const std::string& language =
"",
const std::string& dialect =
"")
const = 0;
61 const std::list<std::string>& GetSupportedLanguages()
const {
return supportedLanguages; }
62 bool IsLanguageSupported(
const std::string& language)
const {
return std::find(supportedLanguages.begin(), supportedLanguages.end(), language) != supportedLanguages.end(); }
63 const std::string& GetError(
void) {
return error; };
70 std::list<std::string> supportedLanguages;
72 mutable std::string error;
123 operator bool() {
return !jdpl->jdpDescs.empty() || current != jdpl->jdps.end(); }
129 std::list<JobDescriptionParserPlugin*>::iterator current;
136 std::list<JobDescriptionParserPlugin*> jdps;
137 std::list<ModuleDesc> jdpDescs;
144 #endif // __ARC_JOBDESCRIPTIONPARSERPLUGIN_H__