Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Private Attributes
MoinMoin.parser._ParserBase.FormatTextID Class Reference
Inheritance diagram for MoinMoin.parser._ParserBase.FormatTextID:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.parser._ParserBase.FormatTextID:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def setDefaultFormat
def addFormat
def formatString

Public Attributes

 fmt

Private Attributes

 _ignore_case
 _def_fmt

Detailed Description

Definition at line 58 of file _ParserBase.py.


Constructor & Destructor Documentation

def MoinMoin.parser._ParserBase.FormatTextID.__init__ (   self,
  fmt,
  icase = False 
)

Definition at line 60 of file _ParserBase.py.

00060 
00061     def __init__(self, fmt, icase=False):
00062         if not isinstance(fmt, FormatText):
00063             fmt = FormatText(fmt)
00064         self.setDefaultFormat(fmt)
00065         self._ignore_case = icase
00066         self.fmt = {}

Here is the call graph for this function:


Member Function Documentation

def MoinMoin.parser._ParserBase.FormatTextID.addFormat (   self,
  word,
  fmt 
)

Definition at line 70 of file _ParserBase.py.

00070 
00071     def addFormat(self, word, fmt):
00072         if self._ignore_case:
00073             word = word.lower()
00074         self.fmt[word] = fmt

def MoinMoin.parser._ParserBase.FormatTextID.formatString (   self,
  formatter,
  word 
)

Definition at line 75 of file _ParserBase.py.

00075 
00076     def formatString(self, formatter, word):
00077         if self._ignore_case:
00078             sword = word.lower()
00079         else:
00080             sword = word
00081         return self.fmt.get(sword, self._def_fmt).formatString(formatter, word)
00082 

Definition at line 67 of file _ParserBase.py.

00067 
00068     def setDefaultFormat(self, fmt):
00069         self._def_fmt = fmt

Here is the caller graph for this function:


Member Data Documentation

Definition at line 68 of file _ParserBase.py.

Definition at line 64 of file _ParserBase.py.

Definition at line 65 of file _ParserBase.py.


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