Changeset 1262 in Sophya for trunk/SophyaPI/PIext/cxxexecutor.cc
- Timestamp:
- Oct 27, 2000, 6:30:28 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/cxxexecutor.cc
r1247 r1262 96 96 mpiac->RegisterCommand(kw, usage, this, hgrp); 97 97 98 99 100 //// A VIRER quand variable de objmanager OK --> Pour Reza101 kw = "c++setvar";102 usage = "c++setvar: Setting test variable \n";103 usage+= "Usage: c++setvar varname varcontent ";104 mpiac->RegisterCommand(kw, usage, this, hgrp);105 106 kw = "c++getvar";107 usage = "c++getvar: Getting test variable content\n";108 usage+= "Usage: c++getvar varname ";109 mpiac->RegisterCommand(kw, usage, this, hgrp);110 111 kw = "c++varlist";112 usage = "c++getvar: Printing test variable list\n";113 usage+= "Usage: c++varlist ";114 mpiac->RegisterCommand(kw, usage, this, hgrp);115 //// A VIRER quand variable de objmanager OK --> Pour Reza116 98 117 99 } … … 222 204 223 205 /* --Methode-- */ 206 int CxxExecutor::ExecuteCxx(string const & code) 207 { 208 int rc; 209 210 mUserCodeFn = ""; 211 mUserCodeFn = "cxx_spiapp.h"; 212 ofstream os(mUserCodeFn.c_str(),ios::out); 213 if(!os) {cout<<"CxxExecutor::ExecuteCxx(): unable to open " 214 <<mUserCodeFn<<endl; mUserCodeFn = ""; return 1;} 215 216 os << code ; 217 os << endl ; 218 219 cout<<"CxxExecutor: User code filled from standard input into " 220 <<mUserCodeFn<<endl; 221 222 rc = CrFile(); if(rc) return(1); 223 rc = Compile(); if(rc) return(1); 224 rc = Link(); if(rc) return(1); 225 rc = Call(); if(rc) return(1); 226 return(rc); 227 } 228 229 /* --Methode-- */ 224 230 int CxxExecutor::CrFile(string cfilename,string func) 225 231 { … … 362 368 for(it=varlist.Begin(); it!=varlist.End(); it++) { 363 369 string key = (*it).first; 364 os<<"___nomobj = \""<<key<<"\";"<<endl; 365 os<<"MuTyV & $"<<key<<" = omg.GetVarList().Get(___nomobj);"<<endl; 370 if (isalpha(key[0]) ) { 371 os<<"___nomobj = \""<<key<<"\";"<<endl; 372 os<<"MuTyV & $"<<key<<" = omg.GetVarList().Get(___nomobj);"<<endl; 373 } 366 374 } 367 375
Note:
See TracChangeset
for help on using the changeset viewer.