| Home | Trees | Index | Help |
|
|---|
| Package lyntin :: Module manager :: Class Manager |
|
CommandManager,
ConfigManager,
HelpManager,
HistoryManager| Method Summary | |
|---|---|
__init__(self)
| |
Tells the manager to create a new session based on another session. | |
Removes everything the manager was managing--essentially reinitializes it. | |
| string |
Returns information managed by this class. |
| list of mappings |
Returns a list of maps of parameter name -> value that represents all the info this manager is managing for this session. |
| list of strings |
Returns a list of the items that this manager manages. |
| list of tuples |
Returns a list of tuples of the parameters we're storing in this manager and the description of each parameter. |
| string |
Returns a one-liner status of the state of this manager for a given session. |
Tells the manager to remove information regarding the session. | |
| Method Details |
|---|
addSession(self, newsession, basesession=None)Tells the manager to create a new session based on another session. For example, when we connected to the 3k mud, we would tell all the managers to clone the common session to the new session created thus populating the new session.
|
clear(self, ses=None)Removes everything the manager was managing--essentially reinitializes it. Override this to clear out the data your manager is managing. This is typically session oriented and gets called by the "#clear" command.
|
getInfo(self, ses, text='')Returns information managed by this class. This is mostly for display to the user--we shouldn't be using this method for Lyntin introspection.
|
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. For example, an AliasManager manages aliases and their expansions. Say it had three aliases a, b, and c which expand to "smile %1", "frown %1", and "kick %1". It would return:
[
{ "alias": "a", "expansion": "smile %1" },
{ "alias": "b", "expansion": "frown %1" },
{ "alias": "c", "expansion": "kick %1" }
]
|
getItems(self)Returns a list of the items that this manager manages. So the gag manager manages gags as well as antigags and would return:[ "gag", "antigag" ] These items are used in getInfoMappings as well as getParameters. If this manager doesn't manage anything, then it'll return an empty list.
|
getParameters(self, item)Returns a list of tuples of the parameters we're storing in this manager and the description of each parameter. If this manager does not manage this item, it should raise a ValueError.
|
getStatus(self, ses)Returns a one-liner status of the state of this manager for a given session. If this manager does not apply to sessions then it should return an empty string. For example, the SubstituteManager which is holding 5 substitutes and 2 gags for a session named "3k" would return the string:"5 substitute(s). 2 gag(s)."But the ThreadManager which is a globally scoped manager and doesn't apply to the "3k" session would return an empty string.
|
removeSession(self, ses)Tells the manager to remove information regarding the session.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Aug 9 09:17:41 2004 | http://epydoc.sf.net |