Package lyntin :: Module history :: Class HistoryManager
[show private | hide private]
[frames | no frames]

Class HistoryManager

Manager --+
          |
         HistoryManager


Manages user data history.

This manages the user input history by storing the commands the user entered. This module also handles manipulating that history letting the user to recall and edit those commands to fix mistakes they may have typed.
Method Summary
  __init__(self, e)
list of strings getHistory(self, count)
Returns everything in the history buffer as a list of strings
  getHistoryItem(self, userinput)
This retrieves the item (if it exists) and performs the substitutions (if we need to).
  recordHistory(self, input)
Records an item in the history (which is a queue).
    Inherited from Manager
  addSession(self, newsession, basesession)
Tells the manager to create a new session based on another session.
  clear(self, ses)
Removes everything the manager was managing--essentially reinitializes it.
string getInfo(self, ses, text)
Returns information managed by this class.
list of mappings getInfoMappings(self, item, ses)
Returns a list of maps of parameter name -> value that represents all the info this manager is managing for this session.
list of strings getItems(self)
Returns a list of the items that this manager manages.
list of tuples getParameters(self, item)
Returns a list of tuples of the parameters we're storing in this manager and the description of each parameter.
string getStatus(self, ses)
Returns a one-liner status of the state of this manager for a given session.
  removeSession(self, ses)
Tells the manager to remove information regarding the session.

Method Details

getHistory(self, count)

Returns everything in the history buffer as a list of strings
Returns:
everything in the history buffer
           (type=list of strings)

getHistoryItem(self, userinput)

This retrieves the item (if it exists) and performs the substitutions (if we need to).
Parameters:
userinput - what the user typed--we'll use this to figure out which item they're referring to and whether to apply a substitution
           (type=string)
Returns:
None if we didn't discover anything or the command string at the history index

recordHistory(self, input)

Records an item in the history (which is a queue).
Parameters:
input - the line to record
           (type=string)

Generated by Epydoc 2.1 on Mon Aug 9 09:17:41 2004 http://epydoc.sf.net