#include "LH_OLE_Communicator.H" #include "ATOOLS/Org/Message.H" #include "ATOOLS/Org/MyStrStream.H" #include "ATOOLS/Org/Exception.H" #include using namespace OLE; using namespace ATOOLS; using namespace std; LH_OLE_Communicator::LH_OLE_Communicator(string name) : m_filestatus(0), m_name(name) { ifstream ifile; ifile.open(m_name.c_str()); if (ifile) { ifile.close(); m_filestatus=1; return; } ofstream ofile; ofile.open(m_name.c_str(),ios::trunc); ofile<<"# "<0 && s1[0]==' ') s1.erase(0,1); while (s2.length()>0 && s2[0]==' ') s2.erase(0,1); return 1; } void LH_OLE_Communicator::AddParameter(string param) { ofstream ofile; ofile.open(m_name.c_str(),ios::app); ofile<0&&s2.length()>0) if (s1.find("->")==string::npos) if (s2.find("OK")==string::npos) { cout<0) { s2=s2.substr(0,s2.find(" ")); status=ToType(s2); if (ToString(status)!=s2) { cout<0) { string hstr=s2.substr(0,s2.find(" ")); int nb=ToType(hstr); if (n0 && s2[0]==' ') s2.erase(0,1); } s2=s2.substr(0,s2.find(" ")); id=ToType(s2); } } break; } } ifile.close(); return id; }