/[ascend]/trunk/pygtk/interface/instance.cpp
ViewVC logotype

Diff of /trunk/pygtk/interface/instance.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 174 by johnpye, Sat Jan 7 10:06:13 2006 UTC revision 175 by johnpye, Tue Jan 10 04:27:34 2006 UTC
# Line 370  Instanc::getSymbolValue() const{ Line 370  Instanc::getSymbolValue() const{
370      return SCP(GetSymbolAtomValue(i));      return SCP(GetSymbolAtomValue(i));
371  }  }
372    
373    const string
374    Instanc::getValueAsString() const{
375        stringstream ss;
376        if(isAssigned()){
377            if(isReal()){
378                ss << getRealValue();
379            }else if(isInt()){
380                ss << getIntValue();
381            }else if(isSymbol()){
382                ss << getSymbolValue();
383            }else if(isBool()){
384                ss << getBoolValue();
385            }else{
386                throw runtime_error("Invalid type in Instanc::getValueAsString");
387            }
388        }else{
389            ss << "undefined";
390        }
391        return ss.str();
392    }
393    
394  const bool  const bool
395  Instanc::isPlottable() const{  Instanc::isPlottable() const{
396      if(plot_allowed(i)){      if(plot_allowed(i)){

Legend:
Removed from v.174  
changed lines
  Added in v.175

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22