annotate LibModuleDBShare-1.0/LibModuleDBShare-1.0.lua @ 11:35159f132552 master

added initialProfile parameter to NewGroup
author Andrew Knoll <andrewtknoll@gmail.com>
date Sat, 09 Mar 2013 21:50:36 -0500
parents 4366f51a7069
children 5947b9721b9c
rev   line source
>@5 1 --- **LibModuleDBShare-1.0**\\
>@5 2 -- A description will eventually be here.
>@5 3 --
>@5 4 -- @usage
>@5 5 -- Also coming soon.
>@5 6 -- @class file
>@5 7 -- @name LibModuleDBShare-1.0.lua
>@3 8 local MAJOR, MINOR = "LibModuleDBShare-1.0", 1
>@3 9 local LibModuleDBShare, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
>@3 10
>@4 11 if not LibModuleDBShare then return end -- No upgrade needed
>@4 12
>@4 13 LibModuleDBShare.groups = LibModuleDBShare.groups or {};
>@4 14
>@5 15 local DBGroup = {};
>@5 16
>@5 17 --- Creates a new DB group.
>@5 18 -- @param groupName The name of the new DB group.
>@5 19 -- @param usesDualSpec True if this group should use LibDualSpec, false otherwise.
andrewtknoll@11 20 -- @param initialProfile The name of the profile to start with.
>@5 21 -- @usage
>@5 22 -- local myAddonDBGroup = LibStub("LibModuleDBShare-1.0"):NewGroup("MyAddonGroupName", true)
>@5 23 -- @return the new DB group object
andrewtknoll@11 24 function LibModuleDBShare:NewGroup(groupName, usesDualSpec, initialProfile)
>@4 25
>@4 26 end
>@4 27
>@5 28 --- Retrieves an existing DB group.
>@5 29 -- @param groupName The name of the DB group to retrieve.
>@5 30 -- @usage
>@5 31 -- local myAddonDBGroup = LibStub("LibModuleDBShare-1.0"):GetGroup("MyAddonGroupName")
>@5 32 -- @return the DB group object, or nil if not found
>@5 33 function LibModuleDBShare:GetGroup(groupName)
>@4 34
>@4 35 end
>@5 36
>@5 37 --- Adds a database to the group.
>@5 38 -- @param db The name of the new DB group.
>@5 39 -- @usage
>@5 40 -- myAddonDBGroup:AddDB(MyAddon.db)
>@5 41 function DBGroup:AddDB(db)
>@5 42
>@5 43 end