Changeset 21819 in vbox for trunk/src/VBox/Main/webservice/websrv-python.xsl
- Timestamp:
- Jul 27, 2009 3:59:56 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50433
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/websrv-python.xsl
r21640 r21819 53 53 <xsl:when test="$type='unsigned long long'">UnsignedLong</xsl:when> 54 54 <xsl:when test="$type='result'">UnsignedInt</xsl:when> 55 <xsl:when test="$type='uuid'">UUID</xsl:when>56 55 <xsl:when test="$type='$unknown'">IUnknown</xsl:when> 57 56 <xsl:when test="$type='$dispatched'">IUnknown</xsl:when> … … 538 537 539 538 540 class UUID:541 def __init__(self, mgr, handle, isarray = False):542 self.handle = handle543 self.mgr = mgr544 self.isarray = isarray545 546 def __next(self):547 if self.isarray:548 return self.handle.__next()549 raise TypeError, "iteration over non-sequence"550 551 def __size(self):552 if self.isarray:553 return self.handle.__size()554 raise TypeError, "iteration over non-sequence"555 556 def __len__(self):557 if self.isarray:558 return self.handle.__len__()559 raise TypeError, "iteration over non-sequence"560 561 def __getitem__(self, index):562 if self.isarray:563 return UUID(self.mgr, self.handle[index])564 raise TypeError, "iteration over non-sequence"565 566 def __str__(self):567 return self.handle568 569 def __eq__(self,other):570 if self.isarray:571 return isinstance(other,UUID) and self.handle == other.handle572 if isinstance(other,UUID):573 return self.handle == other.handle574 if isinstance(other,basestring):575 return self.handle == other576 return False577 578 def __ne__(self,other):579 if self.isarray:580 return not isinstance(other,UUID) or self.handle == other.handle581 if isinstance(other,UUID):582 return self.handle != other.handle583 if isinstance(other,basestring):584 return self.handle != other585 return True586 587 539 class Boolean: 588 540 def __init__(self, mgr, handle, isarray = False):
Note:
See TracChangeset
for help on using the changeset viewer.