File hp/lang/class.lua

Functions

M:__call (...) Class definition is a function.
M:getPrivate (name) Returns the private variable.
Encapsulates the variables in a pseudo manner.
Since this function intended to be used internally, please do not reference user.
M:getPrivates () Returns a list of variables that are private from metatable.
Encapsulates the variables in a pseudo manner.
Since this function intended to be used internally, please do not reference user.
M:new (...) Instance generating functions.
The user can use this function.
Calling this function, init function will be called internally.
M:setPrivate (name, value) Set the private variable.
Encapsulates the variables in a pseudo manner.
Since this function intended to be used internally, please do not reference user.

Tables

class Class that enable you to easily object-oriented.


Functions

M:__call (...)
Class definition is a function.

Parameters

  • ...: Base class list.

Return value:

class
M:getPrivate (name)
Returns the private variable.
Encapsulates the variables in a pseudo manner.
Since this function intended to be used internally, please do not reference user.

Parameters

  • name: Private variable name

Return value:

Private variable
M:getPrivates ()
Returns a list of variables that are private from metatable.
Encapsulates the variables in a pseudo manner.
Since this function intended to be used internally, please do not reference user.

Return value:

mt.__privates
M:new (...)
Instance generating functions.
The user can use this function.
Calling this function, init function will be called internally.

Parameters

  • ...:

Return value:

Instance
M:setPrivate (name, value)
Set the private variable.
Encapsulates the variables in a pseudo manner.
Since this function intended to be used internally, please do not reference user.

Parameters

  • name: Private variable name
  • value:

Return value:

value Private variable

Tables

class
Class that enable you to easily object-oriented.
Provide the basic functionality of the class.

class does not perform inheritance setmetatable.
The inheritance by copying it to the table.
Will consume a little more memory, the performance does not deteriorate if the inheritance is deep.

Valid XHTML 1.0!