Panda3D
Public Member Functions | Public Attributes | Static Public Attributes

CTOC Class Reference

List of all members.

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'

Detailed Description

A class encapsulating the table of contents of a CArchive.

   When written to disk, it is easily read from C.

Constructor & Destructor Documentation

def __init__ (   self)

Member Function Documentation

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.

Member Data Documentation

string ENTRYSTRUCT = 'iiiibc' [static]
 All Classes Namespaces Functions Variables Properties