Back to index

nordugrid-arc-nox  1.1.0~rc6
translator.cpp
Go to the documentation of this file.
00001 #include <iostream>
00002 #include <arc/client/JobDescription.h>
00003 
00004 int main() {
00005   std::cout << " [ JobDescription tester ] " << std::endl;
00006   std::cout << std::endl << " [ Parsing ] " << std::endl << std::endl;
00007 
00008   Arc::JobDescription jd;
00009   std::string xrsl_string = "&(executable=\"test.sh\") \
00010   (arguments=\"pal\") \
00011   (stdout=\"stdout.txt\") \
00012   (join=\"yes\") \
00013   (inputfiles=(\"myjob.sh\" \"test.sh\")) \
00014   (outputfiles=(\"stdout.txt\" \"download.txt\")) \
00015   (CPUtime=10) \
00016   (environment=(\"ATLAS\" \"/opt/atlas\") (\"CERN\" \"/cern\")) \
00017   (jobName=\"MyTestJob\")";
00018   jd.Parse( xrsl_string );
00019 
00020   jd.Print();
00021 
00022   std::string jobdescstring = jd.UnParse("JDL");
00023   std::cout << std::endl << " [ jd.UnParse(\"JDL\") ] " << std::endl << std::endl << jobdescstring << std::endl;
00024 }