How to implement state-dependent behavior Icon

How to implement state-dependent behavior

How to implement state-dependent behavior script demonstrates a networkcard

How to implement state-dependent behaviorOverview

An object in a program frequently has an internal "state", and the behavior of the object needs to change when its state changes. As someone who tends to think of objects as "data structures on steroids", it came as quite a shock when Netscape's Steve Abell pointed out that an object need not contain any values at all -- it can exist merely to provide behaviors, in the form of methods. This recipe demonstrates a networkcard that depends on its internal state connected/disconnected - to send/receive data.

NEW

Fixed some bugs.

How to implement state-dependent behaviorInformation

Version
1.2
Date
04.16.10
License
Language
English
File Size
N/A
Category
SubCategory
Operating Systems
Windows ,Linux,Mac OS,BSD,Solaris
System Requirements
No additional system requirements.
Event driven programming Icon
This small code demonstrates how state driven programming can be done in python.
More
Principal Component Analysis (PCA) Icon
A class that carries out Principal Component Analysis (PCA).
Free
SRCDS Icon
A library to interface with Half-Life2 Dedicated Servers
Free
Complex Boolean Regular Expression Class Icon
Need to look for the occurence of words in a string or group of words
Free
Display an Image from a specified file Icon
Reads an image file from the filename specified as the 1st parameter
Free
Quickslice decorator Icon
Quickslice decorator script defines a decorator that allows for an abbreviated
Free
mx.ODBC example Icon
mx.ODBC example script shows you how to get the columns of a table and get data.
Free
Python replacement for java.util.Properties Icon
Quick and easy way to process Java properties files using pure Python
Free
Merging two sorted iterators Icon
Provide a mergeiter() function that can merge two iterators into single iterator
Free
More