//char* ParseParameters(const char* theParameters);
const std::vector< int >& GetLastParamIndices() const { return myLastParamIndex; }
const std::vector< std::string >& GetLastParameters() const { return myLastParameters; }
+ const std::string & GetLastObjEntry() const { return myLastObj; }
std::vector< std::string > GetAllParameters(const std::string& theObjectEntry) const;
private:
bool myIsHistoricalPythonDump;
std::vector< int > myLastParamIndex;
std::vector< std::string > myLastParameters;
+ std::string myLastObj;
};
// find variable names within theParameters
+ myLastObj.clear();
myLastParameters.clear();
myLastParamIndex.clear(); /* vector holding indices of virables within the string
of all varibles used for theObject */
// (1) variable names in the string of all varibles used for theObject and
// (2) indices of found variables in myLastParamIndex.
+ // remember theObject
SALOMEDS::SObject_wrap aSObj = ObjectToSObject(aStudy,theObject);
if ( aSObj->_is_nil() )
return;
+ CORBA::String_var anObjEntry = aSObj->GetID();
+ myLastObj = anObjEntry.in();
// get a string of variable names
SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
while ( pos < varStr.size() )
{
// skip separators
- while ( separators.find( varStr[ pos ]) != std::string::npos )
- if ( ++pos >= varStr.size() )
- break;
+ pos = varStr.find_first_not_of( separators, pos );
+ // while ( separators.find( varStr[ pos ]) != std::string::npos )
+ // if ( ++pos >= varStr.size() )
+ // break;
// skip repetition number following '='
if ( varStr[ pos-1 ] == '=' )
{
if ( pos < varStr.size() )
{
size_t pos2 = varStr.find_first_of( separators, pos );
- varNames.push_back( varStr.substr( pos, pos2-1 ));
+ varNames.push_back( varStr.substr( pos, pos2 - pos));
pos = pos2;
}
}