| 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(): |
| 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(): |
| 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){ |
| 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 |
}; |
}; |
|
|
|