Quantcast
Download
(37 Kb)
Download
Updated: 10-08-19 12:33 PM
Compatibility:
Visions of N'Zoth (8.3.0)
BfA content patch (8.2.5)
WoW Classic (1.13.2)
Rise of Azshara (8.2.0)
Updated:10-08-19 12:33 PM
Created:08-23-17 03:23 PM
Downloads:1,006
Favorites:2
MD5:
8.2.5

LibMayronObjects

Version: 3.0.1
by: Mayron [More]

About LibMayronObjects

  • LibMayronObjects is a framework intended on making object-oriented programming easier for Lua developers.
  • The framework is designed for World of Warcraft AddOn development and supports both Classic and Retail editions (just make sure that you update the `toc` version number appropriately for whichever edition you require it for).
  • You can create classes and call them to instantiate new instances/objects modeled from those classes.
  • You can create interfaces that enforce functions to be implemented by classes.
  • You can enforce strict typing rules to class and interface function parameters and return values.
  • You can define default parameter value including both primitive types (strings and numbers) and complex types (tables, functions, Blizzard widgets and other classes and interfaces).
  • Each class can inherit from at most one parent class. All classes either directly, or indirectly, inherit from the Object class.
  • Each class can implement multiple interfaces.
  • You can create generic types, such as a list that only works with tables, and another list that only works for numbers.
  • You can define custom attributes for class functions to apply pre-execution logic and control how the function should be called.
  • There are many useful Object functions that all classes inherit and can use.
  • You can create and export packages, and import packages or separate classes and interfaces.
  • The framework also comes with some standard collection classes (List, Stack, Map, LinkedList).

There is a Test.lua file to see other working examples of how to use the Library!

Full Documentation

For the full maintained documentation, please refer to the GitHub homepage:

https://github.com/Mayron/LibMayronObjects

3.0:
-- Added ability to add default parameters
-- Added new "attributes" feature
-- Fixed bug with UnpackTable method

2.8:
-- Added more helper Lib functions for memory performance
-- Restructured metatable functions and worked on memory optimization

2.7:
-- Fixed memory leak
-- Improved error handling

2.5:
-- Reduced more memory usage
-- Removed the "Implements" function: Implementing interface functions work the same way as implementing interface properties - If not implemented, after constructing an object from the class that implements the interface, an error will be thrown.

2.4.1:
-- Restructured code
-- Made defined properties strongly typed after constructor executes

2.4:
-- Added support for Defining Properties in Interfaces (must be implemented in constructors)
-- Added support for generic types
-- Updated toc for BFA expansion
-- Added more classes and added test lua file to see examples of how the library works

2.3:
-- Merged everything into 1 Lua file so that it is far easier to use

2.1:
-- Export function parameters changed
-- Export can only export 1 package at a time

2.0:
-- Added Package Class
-- Can only export packages!
-- Removed Import modifiers (*, +, -)
-- Added Object:Parent()
Optional Files (0)


Post A Reply Comment Options
Unread 10-06-19, 10:43 AM  
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view AddOns

Forum posts: 260
File comments: 1281
Uploads: 9
3.0:
-- Added ability to add default parameters
-- Added new "attributes" feature
-- Fixed bug with UnpackTable method

I have updated the documentation and the LibMayronObjects.Test.lua file to include better examples!
__________________
Visit the MayronUI Discord server to contribute towards our community and say hello!
I am usually much more active on discord so it's a good place to get in contact with me if I don't reply to you on wowinterface.
Report comment to moderator  
Reply With Quote
Unread 12-16-18, 05:09 AM  
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view AddOns

Forum posts: 260
File comments: 1281
Uploads: 9
2.8:
-- Added more helper Lib functions for memory performance
-- Restructured metatable functions and worked on memory optimization
__________________
Visit the MayronUI Discord server to contribute towards our community and say hello!
I am usually much more active on discord so it's a good place to get in contact with me if I don't reply to you on wowinterface.
Report comment to moderator  
Reply With Quote
Unread 08-27-18, 03:20 AM  
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view AddOns

Forum posts: 260
File comments: 1281
Uploads: 9
2.5:
-- Reduced more memory usage
-- Removed the "Implements" function: Implementing interface functions work the same way as implementing interface properties - If not implemented, after constructing an object from the class that implements the interface, an error will be thrown.
__________________
Visit the MayronUI Discord server to contribute towards our community and say hello!
I am usually much more active on discord so it's a good place to get in contact with me if I don't reply to you on wowinterface.
Report comment to moderator  
Reply With Quote
Unread 08-25-18, 07:40 AM  
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view AddOns

Forum posts: 260
File comments: 1281
Uploads: 9
Updated to version 2.4:

2.4:
-- Added support for Defining Properties in Interfaces (must be implemented in constructors)
-- Added support for generic types
-- Updated toc for BFA expansion
-- Added more classes and added test lua file to see examples of how the library works
__________________
Visit the MayronUI Discord server to contribute towards our community and say hello!
I am usually much more active on discord so it's a good place to get in contact with me if I don't reply to you on wowinterface.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: