Back: Class reference
Up: Class reference
Forward: AlternativeObjectProxy class-instance creation
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.1 AlternativeObjectProxy

Defined in namespace Smalltalk
Category: Streams-Files
I am a proxy that uses the same ObjectDumper to store an object which is not the object to be dumped, but from which the dumped object can be reconstructed. I am an abstract class, using me would result in infinite loops because by default I try to store the same object again and again. See the method comments for more information

6.1.1 AlternativeObjectProxy class: instance creation  (class)
6.1.2 AlternativeObjectProxy: accessing  (instance)


6.1.1 AlternativeObjectProxy class: instance creation

acceptUsageForClass: aClass
The receiver was asked to be used as a proxy for the class aClass. Answer whether the registration is fine. By default, answer true except if AlternativeObjectProxy itself is being used.

on: anObject
Answer a proxy to be used to save anObject. IMPORTANT: this method MUST be overridden so that the overridden version sends #on: to super passing an object that is NOT the same as anObject (alternatively, you can override #dumpTo:, which is what NullProxy does), because that would result in an infinite loop! This also means that AlternativeObjectProxy must never be used directly -- only as a superclass.


6.1.2 AlternativeObjectProxy: accessing

object
Reconstruct the object stored in the proxy and answer it. A subclass will usually override this

object: theObject
Set the object to be dumped to theObject. This should not be overridden.

primObject
Reconstruct the object stored in the proxy and answer it. This method must not be overridden




This document was generated on May, 12 2002 using texi2html