Up: UC++: The Language
Previous: Creating Active Objects
There are several restriction made of clases that are activatable.
The parser will generally give warnings if these are broken:
- all public member functions must be virtual (except of course
- there must be a default constructor that takes no arguments, and
that has no side effects. This is used for constructing the
proxies (and would of course also be used for constructing arrays).
- as far as possible statically allocated data member should be
avoided in Activatable classes, as space for them will be allocated
- there must be no public data members. Generally all access to
activatable objects must come through member functions: direct
access of data members from an object of the same class or from a
friend is an error.
Points to note:
- all void functions are asynchronous and non-void functions
asynchronous at present. (this will change soon)
- parameters for remote method invocations, between one active
object and another, are passed in and out by copy, except for
pointers to active objects where the pointers themselves are
conceptually passed---though these aren't standard C++ pointers but
rather global references.
- choice of processor to allocate the object on cannot be chosen
by the programmer at the moment: it is chosen by PVM
- the generated header file ``proxy.h'' defines the functions
activenew_ A, and so must be included in any file using
- the generated source file ``proxy.c'' contains the definitions
of the proxy classes, and must be compiled and linked to the user code.
send comments or suggestions to J.Poole@cs.ucl.ac.uk
Click here for more information on UCL-CS.