This extension of State only provides the isProxy method, which allows one to discern between proxy and non-proxy objects.
methods
boolean
isProxy;
|
Undocumented.
State replacementForPortCoder PortEncoder coder; |
Return the object to be encoded by the coder instead of the receiving object. This method is repeatedly invoked until an object returns self. The default implementation retrieves a proxy from the coder's connection.
inherits
State supers: State
variables
The Connection to which we belong.
Our identity with our connection.
methods
id initWithConnection Connection c identity int ident; |
Undocumented.
Connection proxy_connection; |
Undocumented.
int
proxy_identity;
|
Undocumented.
State replacementForPortCoder PortEncoder coder; |
Return self, since we know how to be sent over the wire.
void encodeUsingCoder Encoder coder; |
Have the coder encode us as a proxy; otherwise fail (which is the case when archiving instead of wiring).
inherits
State supers: Proxy
variables
The object for which we stand.
methods
id initWithConnection Connection c identity int i for All object; |
Designated initializer.
inherits
State supers: Proxy
variables
Our connection is connected.
methods
boolean
isProxy;
|
Undocumented.
InvocationResult forwardSelector selector sel arguments pointer args; |
The low-level forwarding method. This method is invoked for forwarding a invocation completing method and this is used by the Proxy.
void
dealloc;
|
Inform our connection from our death. This messages the Connection class, since messaging objects from dealloc methods is not allowed. We identify ourselves by our identity since passing around a dead object (which we are) is asking for trouble.
Instances of (subclasses of) NonProxy are never proxies. They always send a copy over the wire.
inherits
State supers: State
methods
id (self) replacementForPortCoder PortEncoder c; |
Return self as we do not want to be proxied.
inherits
State supers: NonProxy
inherits
State supers: NonProxy
inherits
State supers: NonProxy
inherits
State supers: NonProxy
inherits
State supers: NonProxy
inherits
State supers: State
methods
id replacementForPortCoder PortEncoder c; |
This is naughty: a Collection, through its inheritance of NonProxy returns self when asked its replacementForPortCoder. However, a MutableCollection must be proxied for maintaining the right semantics. Hence, we redirect the method to our direct (though repeated) superclass, State.