NI State Pattern Actor
No ratings yet
Version 1.1.0.10
Description
The state pattern is a behavioral design pattern that ?allow[s] an object to alter its behavior when its internal state changes.  The object will appear to change its class.?[1]  Use this pattern if an object must change its behavior based on its internal state (i.e. if the class has two or more modes of operation such that the mode change alters the behavior of most of the class methods).  This pattern lets you avoid adding case structures that test for mode to all of your VIs, generally making for more maintainable code. This package demonstrates a straightforward way to create a family of actors that together implement the state pattern. We refer to this collection of actors as a State Pattern Actor.

This package adds a new actor, called State Actor, to your user.lib folder. It also adds the State Pattern Actor project to your list of available sample projects.

[1] Gamma, Helm, Johnson, and Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software, 1994, p. 305
Release Notes
                    Two changes to State Actor.lvclass.

Entry.vi and Exit.vi are no longer marked "child class must override". That proved to be overly restrictive.

Actor Core.vi now calls Exit.vi just before exiting.
Downloads
0
Categories
 
Tags
 
Release date
August 25, 2016
Version history
1.1.0.10