Added more detailed documentation regarding the class_instance object
parent
e03c081cfd
commit
984a14b087
19
lib/class.js
19
lib/class.js
|
@ -39,10 +39,23 @@ var class_meta = {};
|
||||||
/**
|
/**
|
||||||
* Stores class instance visibility object
|
* Stores class instance visibility object
|
||||||
*
|
*
|
||||||
* For each instance id, an object exists that contains the private and
|
* An entry in this table exists for each instance, with the instance id (iid)
|
||||||
* protected members.
|
* as the key. For each instance, there is always a base. The base will contain
|
||||||
|
* a proxy to the public members on the instance itself. The base will also
|
||||||
|
* contain all protected members.
|
||||||
*
|
*
|
||||||
* @type {Object.<number, Object>}
|
* Atop the base object is a private member object, with the base as its
|
||||||
|
* prototype. There exists a private member object for the instance itself and
|
||||||
|
* one for each supertype. This is stored by the class id (cid) as the key. This
|
||||||
|
* permits the private member object associated with the class of the method
|
||||||
|
* call to be bound to that method. For example, if a parent method is called,
|
||||||
|
* that call must be invoked in the context of the parent, so the private
|
||||||
|
* members of the parent must be made available.
|
||||||
|
*
|
||||||
|
* The resulting structure looks something like this:
|
||||||
|
* class_instance = { iid: { cid: {} } }
|
||||||
|
*
|
||||||
|
* @type {Object.<number, Object<number, Object>>}
|
||||||
*/
|
*/
|
||||||
var class_instance = {};
|
var class_instance = {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue