/[ascend]/trunk/pygtk/ascpy.i
ViewVC logotype

Diff of /trunk/pygtk/ascpy.i

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

revision 874 by johnpye, Thu Oct 5 09:30:08 2006 UTC revision 875 by johnpye, Sat Oct 7 06:26:34 2006 UTC
# Line 426  public: Line 426  public:
426                  raise RuntimeError("getSetValue: unknown set type");                  raise RuntimeError("getSetValue: unknown set type");
427    
428          def getValue(self):          def getValue(self):
429              # print "GETTING VALUE OF %s" % self.getName()              #print "GETTING VALUE OF %s" % self.getName()
430              if self.isCompound():              if self.isCompound():
431                  return ""                  return ""
432              elif self.isRelation():              elif self.isRelation():
# Line 450  public: Line 450  public:
450              elif self.isSymbol():              elif self.isSymbol():
451                  return self.getSymbolValue()                  return self.getSymbolValue()
452              else:              else:
453                  return "UNKNOWN TYPE" #raise RuntimeError("Unknown value model type="+self.getType().getName().toString()+", instance kind=".getKindStr())                  return "UNKNOWN TYPE"
454                    #raise RuntimeError("Unknown value model type="+self.getType().getName().toString()+", instance kind=".getKindStr())
455    
456          def getRealValueAndUnits(self):          def getRealValueAndUnits(self):
457              if not self.isReal():              if not self.isReal():
# Line 470  public: Line 471  public:
471      }      }
472  }  }
473    
474    /*
475        This 'registry' thing is a bit of a hack that allows interface pointers to
476        be registered with libascend so that they can be accessed from external
477        script methods
478    */
479  %include "registry.h"  %include "registry.h"
480  %extend Registry{  %extend Registry{
481      void set(const char *key, PyObject *obj){      void set(const char *key, PyObject *obj){
# Line 491  public: Line 497  public:
497  %include "plot.i"  %include "plot.i"
498    
499  class Curve : public Instanc{  class Curve : public Instanc{
   
500  public:  public:
501      std::vector<double> x;      std::vector<double> x;
502      std::vector<double> y;      std::vector<double> y;
503      const std::string getLegend() const;      const std::string getLegend() const;
   
504  };  };
   

Legend:
Removed from v.874  
changed lines
  Added in v.875

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