Table of Contents

Module: interfaces interfaces.py

This module should contain all interfaces for pub. An interface is a class which documents how other classes or class instances should work. For instance the interface IOpenL documents functions that must be supported by objects like doors and books to be funtional. The interfaces are in alphabetical order.

We use interfaces by using advise to make an object support the protocol. like so:

class Test(pub.core.Component): advise(instancesProvide=[IOpenL])

This makes a component which we can add as a part of gameobjects.

Interfaces have a very basic set of methods, these MUST be provided in components. They don't have to do anything more than just calling chain.next(). You can also have methods raising specific errors depending on what you want to do.

Other methods are component specific. All methods that a component provides on behalf of an interface must be callable with the minimum of (chain). This ensures that invoke works with all these methods.

Imported modules   
from protocols import Interface, advise
Classes   

IAskL

provides an interface to asking the components owner.

ICloseL

Provides the close method.

IContainer

IContainer is an interface package. It sets some extra methods that should

IDescribable

Classes that provide IDescribable can be given descriptions and have

IDrinkL

Used for things you could drink.

IDropL

Provides the drop method.

IEatL

Used for things you could eat.

IEnglish

IEnglish doesn't ask anything of it's users.

IExamineL

Provides an interface for examining.

IFollowL

Provides an interface for following.

IGetL

Provides the get method.

IGiveL

Provides the give method.

IGoL

Something that can be entered like a door, a portal or something

ILang

ILang documents what a language module needs to be accepted as such

ILocatable

Classes that provide ILocatable are used to show where an item is situated

ILockL

Used on objects which wish to be lockable.

ILookL

provides the look method

IOpenL

Serves as a way of effecting things which can be opened.

IParser

All IParser providers should provide the Parse() method.

IPullL

Provides an interface to pulling for components

IPushL

Provides an interface to pushing for components.

IPutL

Provides the put method.

IReceiveL

Provides receive method.

IRemoveL

Provides an interface for removing.

ISymbol

Interface for Symbol and classes that need to provide component handling.

ISyntax

Classes that provide ISyntax are the base of an objects language related

ITalkL

Provides the talk method.

ITangible

Classes that provide ITangible have size and weight and ways to deal with

ITellL

provides tell method.

ITest

A Test Interface Facilit, use where you deem fit.

IThing

Interface for Things.

ITurnL

Provides an interface for turning.

IUnlockL

provides Unlock method

IWearL

Provides an interface for wearing.


Table of Contents

This document was automatically generated on Mon Aug 8 17:04:06 2005 by HappyDoc version 2.1