Class engine.class

Base class used by pretty much everything

Local Functions

Methods

engine.class:make (c)

Calls init() for module and sets up some variables

engine.class:inherit (...)

Inherit

engine.class:cloneFull (self, post_copy)

Clones the object, and all subobjects without cloning a subobject twice

engine.class:cloneCustom (self, alt_nodes, post_copy)

Clones the object, with custom logic Based on cloneFull(), with added functionality to skip/replace specified nodes.

engine.class:cloneForSave ()

Clones the object, and all subobjects without cloning a subobject twice Does not invoke clone methods as this is not for reloading, just for saving

engine.class:replaceWith (t)

Replaces the object with an other, by copying (not deeply)

engine.class:cloneReloaded ()

"Reloads" a cloneFull result object This will make sure each object and subobject method :loaded() is called



Local Functions

Methods
engine.class.search (k, plist)
Search

Parameters:

  • k
  • plist
engine.class.clonerecursfull (clonetable, d, noclonecall, use_saveinstead)
Automatically called by cloneFull()

Parameters:

  • clonetable
  • d
  • noclonecall
  • use_saveinstead
engine.class.cloneCustomRecurs (clonetable, d, noclonecall, use_saveinstead, alt_nodes)
Automatically called by cloneCustom()

Parameters:

  • clonetable
  • d
  • noclonecall
  • use_saveinstead
  • alt_nodes

Methods

engine.class:make (c)
Calls init() for module and sets up some variables

Parameters:

Returns:

    class
engine.class:inherit (...)
Inherit

Parameters:

  • ...

Returns:

    function(c)
engine.class:cloneFull (self, post_copy)
Clones the object, and all subobjects without cloning a subobject twice

Parameters:

  • self table Object to be cloned.
  • post_copy table Optional, a table to be merged with the new object after cloning.

Returns:

    a reference to the clone
engine.class:cloneCustom (self, alt_nodes, post_copy)
Clones the object, with custom logic Based on cloneFull(), with added functionality to skip/replace specified nodes.

Parameters:

  • self table Object to be cloned.
  • alt_nodes table Optional, these nodes will use a specified key/value on the clone instead of copying from the target. @ Table keys should be the nodes to skip/replace (field name or object reference). @ Each key should be set to false (to skip assignment entirely) or a table with up to two nodes: @ k = a name/ref to substitute for instances of this field, @ or nil to use the default name/ref as keys on the clone @ v = the value to assign for instances of this node, @ or nil to use the default assignment value
  • post_copy table Optional, a table to be merged with the new object after cloning.

Returns:

    a reference to the clone
engine.class:cloneForSave ()
Clones the object, and all subobjects without cloning a subobject twice Does not invoke clone methods as this is not for reloading, just for saving

Returns:

    the clone and the number of cloned objects
engine.class:replaceWith (t)
Replaces the object with an other, by copying (not deeply)

Parameters:

  • t
engine.class:cloneReloaded ()
"Reloads" a cloneFull result object This will make sure each object and subobject method :loaded() is called
generated by LDoc 1.4.3