Index: doc/Object.man =================================================================== diff -u -N -r882ce0d599f066c5b163f482dfe0876d5552ce7f -r0e2b458907c9d725c3c473197d5a15d0f47f1fe0 --- doc/Object.man (.../Object.man) (revision 882ce0d599f066c5b163f482dfe0876d5552ce7f) +++ doc/Object.man (.../Object.man) (revision 0e2b458907c9d725c3c473197d5a15d0f47f1fe0) @@ -25,19 +25,52 @@ [term baseclass] are available to all objects and to all classes defined in NX. +[example { + +---------+ + | ::nx::* | + +---------+--------------------------------------Y + | | + | +---------+ instance of +----------+ | + | | |<....................| | | + | | Class | | Object | | + | | |....................>| | | + | +----+----+ subclass of +-----+----+ | + | ^ ^ ^ | + `.......|...........................|....|......./ + | | | + +-----+-----+ subclass of | | instance + | |.....................| | of + | cls | | + | | | + +-----------+ | + ^ | +instance |.............(xor)..............| + of | +-----------+ | + |.........| |..........| + | obj | + | | + +-----------+ +}] + +[term NX] allows for creating and for using objects (e.g. [emph obj]) which are +instantiated from the [term baseclass] [cmd nx::Object] +directly. Typical use cases are singeltons and anonymous, inline +objects. In such use cases, [term NX] does not require creating an +intermediate application class (e.g. [emph cls]), which specializes the [term baseclass] +[cmd nx::Object] by default, beforehand. + [para] -[comment {Hier wäre eine Stellung der jeweiligen Klasse als UML-Diagramm in der Klassenhierarchie nett.}] -[term NX] allows for creating and for using objects which are not -derived from any application class (see [cmd ::nx::Class]), that is, -as direct instances of the [term baseclass] [cmd nx::Object]. Typical use cases are -singeltons and anonymous, inline objects. In such use cases, [term NX] -does not require creating an intermediate application class, which -specializes the [term baseclass] [cmd nx::Object], beforehand. +Objects (e.g. [emph obj]) which are creating by instantiating a +previously defined application class (e.g. [emph cls]) are indirect +instances of [cmd nx::Object]. +[para] +Direct instances of nx::Object can be created as follows: + [list_begin definitions] -[call [cmd nx::Object] [method create] [arg objectName] [opt "[option -object-mixins] [arg mixinSpec]"] [opt "[option -class] [arg newClassName]"] [opt "[option -object-filters] [arg filterSpec]"] [opt [arg initBlock]]] +[call [cmd nx::Object] [method create] [arg obj] [opt "[option -object-mixins] [arg mixinSpec]"] [opt "[option -class] [arg newClassName]"] [opt "[option -object-filters] [arg filterSpec]"] [opt [arg initBlock]]] [para] @@ -57,8 +90,8 @@ [list_end] -The configuration options for direct instances of [cmd nx::Object], -which can be passed when calling [method create] and [method new], are +The configuration options for direct and indirect instances of [cmd nx::Object], which +can be passed when calling [method create] and [method new], are documented in the subsequent section. [section {Configuration Options for Instances of nx::Object}]