
/\_*_/\_*_/\_*_/\ -- DelaysManager2 ReadMe -- /\_*_/\_*_/\_*_/\

Addon type: Library
Libraries used:
	none



-- == -- == -- Description of Functionality -- == -- == --

This embeddable addon is a library that allows for timed delays. It is intended for use
by developers to increase efficiency by sharing a single time-delaying architecture.



-- == -- == -- History of Changes -- == -- == --

2.1.0 (Jul 30, 2008):
	- Now uses a method of managing timers that involves only one comparison per
		OnUpdate call to determine whether any handlers need to be dispatched,
		drastically increasing efficiency.
	
	- Added :[Get/Set]SendFuncObj() methods. If true, the funcObj will be sent as the
		first argument to the function.


2.0.4 (May 13, 2008):
	- Now uses a more efficient method of iterating over all active delay handlers.


2.0.3 (May 6, 2008):
	- Now uses LibStub as a load manager.


2.0.2 (Mar 5, 2008):
	- Miscellaneous code style updates.


2.0.1 (Feb 25, 2008):
	- Fixed a bug where, if a handler's :Start() method was called twice with no call to :Stop()
		in between, the handler's countdown would reset.


2.0.0 (Jan 16, 2008):
	- Now works in a fully object-oriented manner, creating its own DelayHandler class.


1.1.0 (Dec 2, 2007):
	- Added SetHandlerFrequency().


1.0.0 (Nov 13, 2007):
	- Initial release.



-- == -- == -- Developer Notes -- == -- == --

API:
	delayHandler = DelaysManager2.CreateDelayHandler(funcObj[, funcKey], delay, repeating, sendHandler, ...)
		Args:
			funcObj - A table (if funcKey is present) or a function. This is the main handler
				for the delayed code, and is what will be called to propagate.
			funcKey - If present, a key with which to index the funcObj table, to find the
				function to call for propagation.
			delay - The time, in seconds (with possible precision to about the hundredths
				decimal place), to delay from the time Schedule() is called before propagating.
			repeating - If true after propagating, the delay will automatically reschedule itself.
				Since this is checked after propagating, you can change the value of this entry in the
				handler from within your function and be able to affect whether or not the delay reschedules
				itself.
			sendHandler - If true, the DelayHandler itself will be the first argument to the function, or the
				second argument if the funcObj is also being sent.
			... - Any additional args to provide to the function when propagating. These are simply stored
				in sequential integer indexes in the DelayHandler and can be modified freely.
		Description:
			This creates an instance of the DelayHandler class, the details of which can be found below.
	
	DelayHandler class:
		:Start()
			Starts the countdown for this DelayHandler.
		:Stop(pauseOnly)
			Stops the countdown for this DelayHandler. If pauseOnly is true, then the DelayHandler will
			resume its countdown from where it was stopped when :Start() is next called, instead of
			resetting the countdown to :GetDelay().
		timeLeft = :GetTimeLeft()
		:SetTimeLeft(timeLeft)
		funcObj, funcKey = :GetFunc()
		:SetFunc(funcObj[, funcKey])
		delay = :GetDelay()
		:SetDelay(delay)
		repeating = :GetRepeating()
		:SetRepeating(shouldRepeat)
		sendHandler = :GetSendHandler()
		:SetSendHandler(shouldSendHandler)
		sendFuncObj = :GetSendFuncObj()
		:SetSendFuncObj(shouldSendFuncObj)
			If this is true, the funcObj will be sent as the first argument to the function.



-- == -- == -- License and Contact Information -- == -- == --


This addon may be used or modified in any way which exhibits full compliance with the
World of Warcraft Terms of Service (TOS) and End User License Agreement (EULA), as well
as the rules of the website from which the files were downloaded. You may redistribute this
addon, but only if it is completely unchanged from the way it was found in the zip file. If you
wish to distribute a modified version, you must first obtain permission directly from me.

If you found a bug in this addon, want to provide feedback, want to help translate it, or even
just want to ask a question, please contact me using one of these methods:

Email address: saeris.sanoora@gmail.com
ICQ number: 119161819
AIM screenname: SaerisSanoora
Penny Arcade forums name: Saeris

If you use any other method, it might take me significantly longer to see your message and reply.

If you wish to support my efforts, you can donate via PayPal by following this link:
http://tinyurl.com/yo4asg



-- == -- == -- Addon Type System -- == -- == --

This addon uses a system in which there are three distinct types:
	Interface - These addons actually provide functionality to the user. They may be entirely self-
		contained, or they may make use of Library-type and Plugin-type. They are always top-level,
		meaning that they appear in the addons configuration menu at the character selection screen.
	
	Library - These addons exist simply to provide functionality to other addons of any type, and
		as their type name suggests, they may be shared between multiple other addons as a single,
		efficient source of the aforementioned functionality. A Library type addon may be embedded
		(included in a subdirectory folder with the client addon, usually "\libraries\" or something similar)
		or non-embedded (existing as a top-level addon, such that it appears in the addons configuration
		menu at the character selection screen). Both types have their advantages, but if you wish to
		reduce login time and monitor memory and CPU usage properly, you must use non-embedded
		Libraries. To do this, simply ensure that only a single copy of the Library is present in the entirety
		of the "Interface\AddOns" directory structure, and that this single copy is at the top level, as
		explained before. For convenience, all Library-type addons are prefixed with "Lib-" to identify
		them from the other types of addons.
	
	Plugin - These addons are generally optional, and "plug in" to Interface-type addons to provide
		additional functionality. They are always top-level, meaning that they appear in the addons
		configuration menu at the character selection screen. Most Interface-type addons which use
		plugins will not actually provide any significant functionality on their own. Generally, Plugins
		will include the name of their parent Interface addon in their own name to help identify them.

An addon's type and any libraries it uses are listed at the top of its readme file.



-- == -- == -- Versioning System -- == -- == --

This addon adheres to a #.#.# versioning format:

The first number (the 1 in 1.2.3) denotes the current major version. This number is
incremented when the addon's functionality or style of code changes so significantly
as to barely resemble previous versions. For Library-type addons, which provide
functionality to client addons, this number is also a guarantee that every release
within this major version will be backwards compatible with previous releases that
are also within this major version. In these cases, this number is actually a suffix on the
library's name. This is done so newer major versions of libraries will not overwrite
older ones, since those may still be in use by other clients.

The second number (the 2 in 1.2.3) denotes the current minor version. This number
is incremented when functionality is added, modified, or removed.

The third number (the 3 in 1.2.3) denotes the current subminor version. This number is
incremented when a release's purpose is to fix bugs or errors, or to increase efficiency
in some way, or to make a minor cosmetic adjustment.
