Logo Search packages:      
Sourcecode: zim version File versions  Download package

zim::notebook::Page Class Reference

Inheritance diagram for zim::notebook::Page:

zim::notebook::Path zim::notebook::IndexPage

List of all members.


Detailed Description

Class to represent a single page in the notebook.

Page objects inherit from Path but have internal state reflecting content
in the notebook. We try to keep Page objects unique
by hashing them in notebook.get_page(), Path object on the other hand
are cheap and can have multiple instances for the same logical path.
We ask for a path object instead of a name in the constructore to
encourage the use of Path objects over passsing around page names as
string. Also this allows some optimalizations by addind index pointers
to the Path instances.

You can use a Page object instead of a Path anywhere in the APIs where
a path is needed as argument etc.

Page objects have an attribute 'valid' which should evaluate True. If for
some reason this object is abandoned by the notebook, this attribute will
be set to False. Once the page object is invalidated you can no longer use
it's internal state. However in that case the object can still be used as
a regular Path object to point to the location of a page. The way replace
an invalid page object is by calling `notebook.get_page(invalid_page)`.

Definition at line 1318 of file notebook.py.


Public Member Functions

def __add__
def __eq__
def __ge__
def __gt__
def __init__
def __init__
def __le__
def __lt__
def __ne__
def __repr__
def basename
def child
def commonparent
def dump
def get_links
def get_parsetree
def hascontent
def isroot
def namespace
def parent
def parents
def parse
def parts
def relname
def set_parsetree
def set_ui_object

Public Attributes

 haschildren
 modified
 name
 properties
 readonly
 valid

Private Member Functions

def _fetch_parsetree
def _source_hascontent

Private Attributes

 _parsetree
 _ui_object

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index