Update der Doku fuer 3.6.4 + LWO
... aus den Driversourcen 3.6.4 + LWO
Change-Id: I9226bb373436d5b05828f89c7da26df39aa45af7
diff --git a/doc/concepts/hooks b/doc/concepts/hooks
index aada84e..ed5af81 100644
--- a/doc/concepts/hooks
+++ b/doc/concepts/hooks
@@ -22,18 +22,21 @@
H_LOAD_UIDS
H_CLONE_UIDS
- Mandatory hooks to determine the uid and euid of loaded or cloned
- objects.
+ H_LWOBJECT_UIDS
+ Mandatory hooks to determine the uid and euid of loaded,
+ cloned or lightweight objects.
H_CREATE_SUPER
H_CREATE_OB
H_CREATE_CLONE
+ H_CREATE_LWOBJECT
Optional hooks to initialize an object after creation.
H_CREATE_SUPER is called for blueprints implicitly loaded
by inheritance, H_CREATE_OB for explicitely loaded
- blueprints/objects, and H_CREATE_CLONE for cloned objects.
+ blueprints/objects, H_CREATE_CLONE for cloned objects, and
+ H_CREATE_LWOBJECT for lightweight objects.
H_RESET
@@ -149,6 +152,7 @@
H_SEND_NOTIFY_FAIL and H_AUTO_INCLUDE were introduced in 3.2.9.
H_DEFAULT_METHOD was introduced in 3.3.113.
H_DEFAULT_PROMPT and H_PRINT_PROMPT were introduced in 3.3.163.
+ H_CREATE_LWOBJECT and H_LWOBJECT_UIDS were introduced in 3.6.5.
SEE ALSO
native(C), set_driver_hook(E), all in (H)
diff --git a/doc/concepts/python b/doc/concepts/python
index 0fe48b7..c8a09e5 100644
--- a/doc/concepts/python
+++ b/doc/concepts/python
@@ -60,6 +60,11 @@
Called just before an object will be destructed,
with the object as its first and only argument.
+ ON_CHILD_PROCESS_TERMINATED
+ Called without any arguments whenever a SIGCHLD signal
+ was received. This could also happen for processes
+ spawned by the driver itself (eg. erq).
+
- unregister_hook(hook, function) -> None
Removes a hook function.
@@ -79,6 +84,84 @@
On instantiation a filename for an object
to search or load is required.
+ Has the following members:
+
+ name
+ The object name
+
+ functions
+ Contains all the visible functions (private functions
+ are excluded) as attributes. They support the call
+ operator and contain the following attributes:
+
+ name
+ The name of the function
+
+ file_name
+ The file that contains the function's definition
+
+ line_number
+ The starting line number of the function's definition
+
+ arguments
+ A list of all arguments with their type, flags
+ (combination of LA_* constants) and position.
+
+ return_type
+ The return type as Python object (maybe missing if
+ unknown or mixed).
+
+ flags
+ A combination of the following flags:
+ LF_STATIC, LF_NOMASK, LF_VARARGS, LF_VIRTUAL and
+ LF_DEPRECATED
+
+ visibility:
+ One of the following:
+ VIS_PRIVATE, VIS_PROTECTED, VIS_VISIBLE, VIS_PUBLIC
+
+ variables
+ Contains all variables as attributes. They contain the
+ following attributes:
+
+ name
+ The name of the variable
+
+ value
+ The value of the variable. This attribute is writable
+ to assign a new value.
+
+ type
+ The type as a Python object (maybe missing if
+ unknown or mixed).
+
+ flags
+ A combination of the following flags:
+ VF_NOSAVE, VF_NOMASK, VF_VIRTUAL and VF_DEPRECATED
+
+ visibility:
+ One of the following:
+ VIS_PRIVATE, VIS_PROTECTED, VIS_VISIBLE, VIS_PUBLIC
+
+ - LWObject(filename)
+ Corresponds to the LPC lwobject type.
+ On instantiation a filename of a blueprint to create
+ a lightweight object from is required.
+
+ Has the following members:
+
+ program_name
+ The program name (file name it was created from)
+
+ functions
+ Contains all the visible functions (private functions
+ are excluded) as attributes. They are similar to the
+ same member of the Object type.
+
+ variables
+ Contains all variables as attributes. They are similar
+ to the same member of the Object type.
+
- Array([values | size])
Corresponds to an LPC array.
Can either be initialized with a list of values
@@ -95,12 +178,33 @@
and has a width member.
- Struct(object, name [, values])
- Corresponds to an LPC struct.
- On initialization the name of the struct definition and
- the correspopnding object is required. It can be initialized
- with a list of values or dict.
+ Corresponds to an LPC struct.
+ On initialization the name of the struct definition and
+ the correspopnding object is required. It can be initialized
+ with a list of values or dict.
- Supports member access as regular python members.
+ Has the following members:
+
+ name
+ The name of the struct
+
+ program_name
+ The name of the program that defined the struct.
+
+ members
+ Contains all members as attributes. They contain the
+ following attributes:
+
+ name
+ The name of the member
+
+ value
+ The value of the member. This attribute is writable
+ to assign a new value.
+
+ type
+ The type as a Python object (maybe missing if
+ unknown or mixed).
- Closure(object [,name [, lfun_object]])
Corresponds to an LPC closure.
@@ -123,6 +227,18 @@
Has two members: array and quotes.
+ - Lvalue(value)
+ Creates an lvalue reference for the given value.
+
+ Has two member: value and members.
+
+ If the value is an array, mapping or string, then lvalues
+ to its elements can be created with [].
+
+ If the value is a struct, then lvalues to its members can
+ be created with the members attribute. It contains all
+ the struct members as attributes and will return an Lvalue
+ object to the struct member.
This module contains the following sub-namespaces:
@@ -132,6 +248,17 @@
as a regular function.
+ There is mapping of LPC values to Python values for the following types:
+ int <-> int(, bool)
+ float <-> float
+ string <-> str
+ bytes <-> bytes
+
+ Type definitions are translated in a similar fashion, additionally the
+ following mappings are done:
+ void <-> None
+ union <-> tuple of types
+
EXAMPLE
import ldmud