Back: SharedQueue-accessing Up: Base classes Forward: SingletonProxy class-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.152 SingletonProxy

Defined in namespace Smalltalk
Superclass: AlternativeObjectProxy
Category: Streams-Files
I am a proxy that stores the class of an object rather than the object itself, and pretends that a registered instance (which most likely is a singleton instance of the stored class) was stored instead.

1.152.1 SingletonProxy class: accessing  (class)
1.152.2 SingletonProxy class: instance creation  (class)
1.152.3 SingletonProxy: saving and restoring  (instance)


1.152.1 SingletonProxy class: accessing

acceptUsageForClass: aClass
The receiver was asked to be used as a proxy for the class aClass. The registration is fine if the class is actually a singleton.


1.152.2 SingletonProxy class: instance creation

on: anObject
Answer a proxy to be used to save anObject. The proxy stores the class and restores the object by looking into a dictionary of class -> singleton objects.


1.152.3 SingletonProxy: saving and restoring

object
Reconstruct the object stored in the proxy and answer it; the binaryRepresentationObject is sent the #reconstructOriginalObject message, and the resulting object is sent the #postLoad message.



Back: SingletonProxy class-instance creation Up: SingletonProxy Forward: SmallInteger   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on August, 19 2010 using texi2html