00001 #ifndef AppInfoHolder_HPP 00002 #define AppInfoHolder_HPP 00003 00004 #include <vector> 00005 #include <string> 00006 00007 using std::string; 00008 using std::vector; 00009 00010 #include <iostream> //FIXME REMOVE: For debugging only 00011 using std::cout; 00012 using std::endl; 00013 00014 class AppInfoHolder{ 00015 00016 private: 00017 00018 //FIXME: Check if we need requesting ASCT IOR here 00019 unsigned int pid_; 00020 string remoteId_; 00021 string asctIor_; 00022 vector<string> outputFiles_; 00023 bool returnedFinished_; 00024 00025 public: 00026 00027 AppInfoHolder(){} 00028 AppInfoHolder(unsigned int aPid, 00029 const string & remoteId, 00030 const string & asctIor, 00031 const vector<string> & outputFiles):pid_(aPid), 00032 remoteId_(remoteId), 00033 asctIor_(asctIor), 00034 outputFiles_(outputFiles), 00035 returnedFinished_(false){} 00036 00037 void addOutputFile(string filename){ outputFiles_.push_back(filename); } 00038 00039 const vector<string> & outputFiles() const{ return outputFiles_; } 00040 00041 const string & remoteId() const{ return remoteId_; } 00042 const string & asctIor() const{ return asctIor_; } 00043 int pid() const{ return pid_; } 00044 bool returnedFinished() const{ return returnedFinished_; } 00045 void returnedFinished(bool value){ returnedFinished_ = value; } 00046 00047 void dump() const{ 00048 cout << "Dumping AppInfoHolder: " << endl 00049 << "remoteId: " << remoteId_ << endl 00050 << "asctIor: " << asctIor_ << endl 00051 << "pid: " << pid_ << endl << endl 00052 << "output files: "; 00053 for(unsigned int i = 0; i < outputFiles_.size(); i ++) 00054 cout << outputFiles_[i] << " "; 00055 cout << endl; 00056 00057 } 00058 };//class 00059 00060 #endif//AppInfoHolder_HPP 00061