Method ProxyFactory()
- Method
ProxyFactory
program
ProxyFactory(program
p
)- Description
Create a class that acts as a proxy for the specified program.
- Parameter
p
Program to generate a proxy for.
The generated class will have the same symbols (public and private) with the same types as in
p
, where accesses to these will proxy the access to the same symbol in the proxied (aka wrapped) object. With the following exceptions:protected void create(object(p) obj)
Initialize the object to act as a proxy for
obj
._sprintf(int c, mapping|void params)
Special case for
c
=='O'
, where it will returnsprintf("%O(%O)", this_program, obj)
, and otherwise proxy the call.void _destruct()
/void destroy()
These lfuns will not be present as the act of them being proxied would likely confuse the proxied object.
- Note
The same proxy class will be returned if this function is called with the same program multiple times.