CoreLinux++
Functional Requirement Document Revision $Revision: 1.2 $ Last
Modified : Tuesday, February 1, 2000
Title : Flyweight Pattern
1. Introduction
Flyweights model concepts or entities that are normally too
plentiful to represent with objects. Often times a system is built
without realizing the scaleability and performance issues with a
proliferation of fine grained object instances.
A Flyweight is a shared object that can be used in multiple
contexts simultaneously, acting as a independent object in each
context, it is indistinguishable from an instance of the object
that's not shared.
1.1 Deliverables Overview
The participants in the Flyweight pattern include:
- Flyweight
-
Declares an interface through which flyweights can receive and act
on extrinsic states.
-
ConcreteFlyweight
-
Implements the Flyweight interface and adds storage for intrinsic
state. A ConcreteFlyweight object must be shareable. Any state it
stores must be intrinsic; that is, it must be independent of the
ConcreteFlyweight object's context.
-
UnsharedConcreteFlyweight
-
Not all Flyweight subclasses need to be shared. The Flyweight
interface enables sharing; it doesn't enforce it.
-
FlyweightFactory
-
Creates and manages flyweight objects. Ensures that flyweights are
shared properly. When a client requests a flyweight, the
FlyweightFactory object supplies an existing instance or creates
one, if none exists.
The deliverable is mostly vacuous, with the exception of the
FlyweightFactory, in that we want to capture the participants
abstractions.
The CoreLinux++ team will deliver Flyweight implementations for
specific cases as needed.
Users can utilize the participant abstractions as a basis for
creating their own Flyweight implementation outside of the
libcorelinux++ library.
2. Functional Requirements
Flyweight and participants will be publicly available for
extension.
2.1 User Interface Specifications
NA
2.2 Product Services
NA
2.3 External Interfaces and Database Requirements
NA
2.4 Error Handling
NA
2.5 Foreseeable Functional Changes and Enhancements
NA.
3. Non-Functional Requirements
Precondition constraints: None
Postcondition constraints: None
Invarient constraints: None
3.1 Performance Requirements
NA
3.2 User Documentation and Other User Aids
This Document
Analysis Use-Case diagrams
Design class diagrams
3.3 Development Requirements
Standards: CoreLinux++ C++ Standards and
Guidelines
Will be part of the libcorelinux++ shared library.
3.4 Foreseeable Non-Functional Changes
NA
4. Remarks and Guidelines for Later Life Cycle Phases
TBD
5. Term Glossary
TBD
Copyright © 1999, 2000 by CoreLinux Consortium
This material may be distributed only subject to the terms and conditions set forth in the
Open Publication License
|