Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Static Public Attributes

# CArchive Class Reference

Inheritance diagram for CArchive:

List of all members.

## Public Member Functions
def | __init__
def | checkmagic
| Sub-methods of __init__ - override as needed #############.
def | contents
| Informational methods.
def | extract
| Core method - Override as needed #########.
def | loadtoc
## Public Attributes
| len
| pkgstart
| toc
| toclen
## Static Public Attributes
int | HDRLEN = 0
int | LEVEL = 9
string | MAGIC = 'MEI\014\013\012\013\015'
| TOCTMPLT = CTOC
int | TRLLEN = 20
string | TRLSTRUCT = '8siii'

## Constructor & Destructor Documentation

def __init__ | ( |  | self,
|  |  | path = `None`,
|  |  | start = `0`,
|  |  | len = `0`
| ) |  |

## Member Function Documentation

def checkmagic | ( |  | self | ) |

Sub-methods of __init__ - override as needed #############.

    Overridable.
    Check to see if the file object self.lib actually has a file
    we understand.

Reimplemented from Archive.

def contents | ( |  | self | ) |

Informational methods.

    Return a list of the contents
       Default implementation assumes self.toc is a dict like object.
       Not required by ArchiveImporter.

Reimplemented from Archive.

def extract | ( |  | self,
|  |  | name
| ) |  |

Core method - Override as needed #########.

    Get the object corresponding to name, or None.
    For use with imputil ArchiveImporter, object is a python code object.
    'name' is the name as specified in an 'import name'.
    'import a.b' will become:
    extract('a') (return None because 'a' is not a code object)
    extract('a.__init__') (return a code object)
    extract('a.b') (return a code object)
    Default implementation:
      self.toc is a dict
      self.toc[name] is pos
      self.lib has the code object marshal-ed at pos

Reimplemented from Archive.

def loadtoc | ( |  | self | ) |

    Overridable.
    Default: After magic comes an int (4 byte native) giving the
    position of the TOC within self.lib.
    Default: The TOC is a marshal-able string.

Reimplemented from Archive.

## Member Data Documentation

int HDRLEN = 0`[static]`

Reimplemented from Archive.

len

int LEVEL = 9`[static]`

string MAGIC = 'MEI\014\013\012\013\015'`[static]`

Reimplemented from Archive.

pkgstart

toc

Reimplemented from Archive.

toclen

TOCTMPLT = CTOC`[static]`

Reimplemented from Archive.

int TRLLEN = 20`[static]`

Reimplemented from Archive.

string TRLSTRUCT = '8siii'`[static]`

All Classes Namespaces Functions Variables Enumerations Enumerator Properties