mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 00:28:23 +01:00
alalphabetized routines
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8640 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
c097d609bd
commit
8bef87f09d
50
R/R.cpp
50
R/R.cpp
@ -408,7 +408,31 @@ getSelectedOutputFileName(void)
|
||||
}
|
||||
|
||||
SEXP
|
||||
getSelectedOutputStringLst(void)
|
||||
getSelectedOutputStrings(void)
|
||||
{
|
||||
SEXP ans = R_NilValue;
|
||||
const char* cstr = R::singleton().GetSelectedOutputString();
|
||||
if (cstr && cstr[0]) {
|
||||
std::string str(cstr);
|
||||
std::istringstream iss(str);
|
||||
std::string line;
|
||||
std::vector< std::string > lines;
|
||||
while (std::getline(iss, line))
|
||||
{
|
||||
lines.push_back(line);
|
||||
}
|
||||
PROTECT(ans = allocVector(STRSXP, lines.size()));
|
||||
for (size_t i = 0; i < lines.size(); ++i)
|
||||
{
|
||||
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
|
||||
}
|
||||
UNPROTECT(1);
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
SEXP
|
||||
getSelectedOutputStringsLst(void)
|
||||
{
|
||||
SEXP list;
|
||||
SEXP attr;
|
||||
@ -440,30 +464,6 @@ getSelectedOutputStringLst(void)
|
||||
return list;
|
||||
}
|
||||
|
||||
SEXP
|
||||
getSelectedOutputStrings(void)
|
||||
{
|
||||
SEXP ans = R_NilValue;
|
||||
const char* cstr = R::singleton().GetSelectedOutputString();
|
||||
if (cstr && cstr[0]) {
|
||||
std::string str(cstr);
|
||||
std::istringstream iss(str);
|
||||
std::string line;
|
||||
std::vector< std::string > lines;
|
||||
while (std::getline(iss, line))
|
||||
{
|
||||
lines.push_back(line);
|
||||
}
|
||||
PROTECT(ans = allocVector(STRSXP, lines.size()));
|
||||
for (size_t i = 0; i < lines.size(); ++i)
|
||||
{
|
||||
SET_STRING_ELT(ans, i, mkChar(lines[i].c_str()));
|
||||
}
|
||||
UNPROTECT(1);
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
SEXP
|
||||
getSelOut(void)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user