Package plugins :: Package core :: Package complete :: Module domain_base

[hide private]
[frames] | no frames]

# Source Code for Module plugins.core.complete.domain_base

     1  #-*- coding: utf8 -*
     2  #
     3  # Max E. Kuznecov ~syhpoon <mek@mek.uz.ua> 2008-2009
     4  #
     5  # This file is part of XYZCommander.
     6  # XYZCommander is free software: you can redistribute it and/or modify
     7  # it under the terms of the GNU Lesser Public License as published by
     8  # the Free Software Foundation, either version 3 of the License, or
     9  # (at your option) any later version.
    10  # XYZCommander is distributed in the hope that it will be useful,
    11  # but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    13  # GNU Lesser Public License for more details.
    14  # You should have received a copy of the GNU Lesser Public License
    15  # along with XYZCommander. If not, see <http://www.gnu.org/licenses/>.
    16
    17 -class BaseDomain(object):
    18      """
    19      Base abstract domain class
    20      """
    21
    22 -    def __init__(self):
    23          self._data = set()
    24
    25      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    26
    27 -    def prepare(self):
    28          """
    29          Preparation stuff
    30          """
    31
    32          return
    33
    34      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    35
    36 -    def finalize(self):
    37          """
    38          Finalization stuff
    39          """
    40
    41          return
    42
    43      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    44
    45 -    def complete(self, buf):
    46          """
    47          Take current buffer and return list-generator of all
    48                  matched entries in current domain.
    49
    50          @param buf: List of comma-separated strings from initial buffer
    51          @return: list-generator
    52          """
    53
    54          raise NotImplementedError()
    55