Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SeqValue Class Reference

## Public Member Functions
| __init__ (self, value=None)
| __add__ (self, inc)
| __bool__ (self)
| __cmp__ (self, other)
| __gt__ (self, other)
| __lt__ (self, other)
| __str__ (self)
| loadXml (self, xelement, attribute='seq')
| set (self, value)
| setFromString (self, value)
| setFromTuple (self, value)
| storeXml (self, xelement, attribute='seq')

## Public Attributes
tuple | value = ()

## Detailed Description

     This represents a sequence value read from a contents.xml
    file, either from the <contents> or the <package> section.  It's
    represented as series of dotted integers in the xml file, and
    stored internally as a tuple of integers.

    It may be incremented, which increments only the last integer in
    the series; or it may be compared with another SeqValue, which
    compares all of the integers componentwise.

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | value = None )

## Member Function Documentation

## ◆ __add__()

__add__ | ( |  | self,
|  |  | inc )

     Increments the seq value, returning the new value.

## ◆ __bool__()

__bool__ | ( |  | self | ) |

## ◆ __cmp__()

__cmp__ | ( |  | self,
|  |  | other )

     Compares to another seq value.

## ◆ __gt__()

__gt__ | ( |  | self,
|  |  | other )

## ◆ __lt__()

__lt__ | ( |  | self,
|  |  | other )

## ◆ __str__()

__str__ | ( |  | self | ) |

## ◆ loadXml()

loadXml | ( |  | self,
|  |  | xelement,
|  |  | attribute = 'seq' )

     Reads the seq from the indicated XML element.  Returns
    true if loaded, false if not given or if there was an
    error.

## ◆ set()

set | ( |  | self,
|  |  | value )

     Sets the seq from the indicated value of unspecified
    type.

## ◆ setFromString()

setFromString | ( |  | self,
|  |  | value )

     Sets the seq from the indicated string of dot-separated
    integers.  Raises ValueError on error.

## ◆ setFromTuple()

setFromTuple | ( |  | self,
|  |  | value )

     Sets the seq from the indicated tuple of integers.

## ◆ storeXml()

storeXml | ( |  | self,
|  |  | xelement,
|  |  | attribute = 'seq' )

     Adds the seq to the indicated XML element.

## Member Data Documentation

## ◆ value

value = ()