Panda3D
|
Public Member Functions | |
def | __init__ |
def | __getitem__ |
def | add |
def | find |
def | frombinary |
def | get |
def | tobinary |
Public Attributes | |
data | |
Static Public Attributes | |
string | ENTRYSTRUCT = 'iiiibc' |
A class encapsulating the table of contents of a CArchive. When written to disk, it is easily read from C.
def __init__ | ( | self | ) |
def __getitem__ | ( | self, | |
ndx | |||
) |
def add | ( | self, | |
dpos, | |||
dlen, | |||
ulen, | |||
flag, | |||
typcd, | |||
nm | |||
) |
Add an entry to the table of contents. DPOS is data position. DLEN is data length. ULEN is the uncompressed data len. FLAG says if the data is compressed. TYPCD is the "type" of the entry (used by the C code) NM is the entry's name.
def find | ( | self, | |
name | |||
) |
Return the index of the toc entry with name NAME. Return -1 for failure.
def frombinary | ( | self, | |
s | |||
) |
Decode the binary string into an in memory list. S is a binary string.
def get | ( | self, | |
ndx | |||
) |
return the toc entry (tuple) at index NDX
def tobinary | ( | self | ) |
Return self as a binary string.
string ENTRYSTRUCT = 'iiiibc' [static] |