webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
def | __init__ (self, version, file, include_files, tokens, compile_params, debug=0) |
def | is_uptodate (self, compile_params=None) |
def | tokens (self) |
def | file (self) |
def | debug (self, debug) |
def | __getstate__ (self) |
PRIVATE METHODS #. More... | |
def | __setstate__ (self, dict) |
def | DEB (self, str) |
This class represents a compiled template. This class provides storage and methods for the compiled template and associated metadata. It's serialized by pickle if we need to save the compiled template to disk in a precompiled form. You should never instantiate this class directly. Always use the <em>TemplateManager</em> or <em>TemplateCompiler</em> classes to create the instances of this class. The only method which you can directly use is the <em>is_uptodate</em> method.
def htmltmpl.Template.__init__ | ( | self, | |
version, | |||
file, | |||
include_files, | |||
tokens, | |||
compile_params, | |||
debug = 0 |
|||
) |
Constructor. @hidden
def htmltmpl.Template.__getstate__ | ( | self | ) |
PRIVATE METHODS #.
Used by pickle when the class is serialized. Remove the 'debug' attribute before serialization. @hidden
def htmltmpl.Template.__setstate__ | ( | self, | |
dict | |||
) |
Used by pickle when the class is unserialized. Add the 'debug' attribute. @hidden
def htmltmpl.Template.DEB | ( | self, | |
str | |||
) |
Print debugging message to stderr. @hidden
def htmltmpl.Template.debug | ( | self, | |
debug | |||
) |
Get debugging state. @hidden
def htmltmpl.Template.file | ( | self | ) |
Get filename of the main file of this template. @hidden
def htmltmpl.Template.is_uptodate | ( | self, | |
compile_params = None |
|||
) |
Check whether the compiled template is uptodate. Return true if this compiled template is uptodate. Return false, if the template source file was changed on the disk since it was compiled. Works by comparison of modification times. Also takes modification times of all included templates into account. @header is_uptodate(compile_params=None) @return True if the template is uptodate, false otherwise. @param compile_params Only for internal use. Do not use this optional parameter. It's intended only for internal use by the <em>TemplateManager</em>.
def htmltmpl.Template.tokens | ( | self | ) |
Get tokens of this template. @hidden