RectangleFactory

This class is a producer of Rectangle3 object all of which are constrained to have the same Shape. This class illustrates the "factory" concept - an object that manufactures other objects as its output.

[ Index | Source | Summary | Member Functions ]

Quick Index


Class Summary

class RectangleFactory

{

public:
RectangleFactory(Shape shapeForAll);
Rectangle3* New(Location location);
~RectangleFactory();
}; // RectangleFactory

Back to the top of RectangleFactory


RectangleFactory(Shape shapeForAll);

Construct the factory specifying the Shape that all Rectangles produced by the factory are to have.

	RectangleFactory(Shape shapeForAll);

Back to the top of RectangleFactory


Rectangle3* New(Location location);

Produce a new Rectangle3 object with the Shape common to all Rectangle3 objects produced by this RectangleFactory and a specified Location. The pointer to the new Rectangle3 object is returned.

	Rectangle3* New(Location location);

Back to the top of RectangleFactory


~RectangleFactory();

Destruct the factory.

	~RectangleFactory();

Back to the top of RectangleFactory


Member Functions

public:
Rectangle3* New(Location location);

Back to the top of RectangleFactory


Generated from source by the Cocoon utilities on Thu Apr 02 12:40:36 1998 .

Report problems to jkotula@unimax.com