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

Diff of /trunk/ascxx/ascpy.i

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

revision 3105 by jpye, Thu Jul 10 03:28:36 2014 UTC revision 3106 by jpye, Wed Jun 1 03:27:36 2016 UTC
# Line 201  class UnitsM; Line 201  class UnitsM;
201  %rename(__str__) Dimensions::toString;  %rename(__str__) Dimensions::toString;
202    
203  %extend Dimensions{  %extend Dimensions{
204      %pythoncode {      %pythoncode %{
205                    
206          def __str__(self):          def __str__(self):
207              return self.toString()              return self.toString()
# Line 245  class UnitsM; Line 245  class UnitsM;
245    
246              return Units(str)              return Units(str)
247    
248      }      %}
249  }  }
250    
251  /*  /*
# Line 308  public: Line 308  public:
308          return self->getName().toString();          return self->getName().toString();
309      }      }
310    
311      %pythoncode{      %pythoncode %{
312          def getPreferredUnits(self):          def getPreferredUnits(self):
313              """Return preferred units for an instance, which is done by lookup per atom type."""              """Return preferred units for an instance, which is done by lookup per atom type."""
314              if not self.isRefinedReal():              if not self.isRefinedReal():
# Line 327  public: Line 327  public:
327                  return None                  return None
328    
329              return _units;              return _units;
330      }      %}
331  }  }
332    
333  typedef enum{  typedef enum{
# Line 429  public: Line 429  public:
429          }          }
430      }      }
431                    
432      %pythoncode {      %pythoncode %{
433          def getSetValue(self):          def getSetValue(self):
434              """Return the value of a set, as a integer or string Python sequence."""              """Return the value of a set, as a integer or string Python sequence."""
435              if self.isSetInt():              if self.isSetInt():
# Line 528  public: Line 528  public:
528          def __radd__(self,other):          def __radd__(self,other):
529              a,b = self.__coerce__(other)              a,b = self.__coerce__(other)
530              return b + a              return b + a
531      }      %}
532  }  }
533    
534  /*  /*

Legend:
Removed from v.3105  
changed lines
  Added in v.3106

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