Class l2df.manager.factory

Last updated 2021-05-28 15:24:22

Factory manager.

Info:

Functions

Manager:init([kwargs]) Configure FactoryManager.
Manager:create([class[, kwargs[, ...]]]) Create entity instance of the specified class.
Manager:scan(path) Method for loading markup elements' classes.
Manager:add(element) Method for adding new element to factory's engine.


Functions

Methods
Manager:init([kwargs])
Configure FactoryManager.

Parameters:

Returns:

    l2df.manager.factory
Manager:create([class[, kwargs[, ...]]])
Create entity instance of the specified class.

Parameters:

  • class string or table Lower-case class name. If table is passed instead of string, class argument would be skipped and passed table would be used as kwargs argument. (optional)
  • kwargs string or table Could be a string containing path to the .dat file to parse or a table with keyword arguments that would be passed to the creating object constructor. (optional)
  • ... Would be passed to Entity:new() after kwargs array-part elements. (optional)

Returns:

    l2df.class.entity
Manager:scan(path)
Method for loading markup elements' classes.

Parameters:

Manager:add(element)
Method for adding new element to factory's engine.

Parameters:

Returns:

    boolean true if the specified element is valid and false otherwise.