Permalink
Browse files

renamed ResourceLoader into AbstractResourceLoader and move it to abs…

…tract folder
  • Loading branch information...
1 parent d10f8c4 commit 20d1c59cc306e30f65d4a6b78bb8889214b5a110 @yanhick yanhick committed Sep 15, 2011
@@ -11,6 +11,7 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
package cocktail.resource;
+import cocktail.resource.abstract.AbstractResourceLoader;
import haxe.Log;
import cocktail.domElement.ContainerDOMElement;
import cocktail.domElement.DOMElement;
@@ -44,12 +45,12 @@ import cocktail.resource.php.AnimationLoader;
import cocktail.resource.php.LibraryLoader;
#elseif doc
-class StringLoader extends ResourceLoader {}
-class ImageLoader extends ResourceLoader {}
-class TextLoader extends ResourceLoader {}
-class ContainerLoader extends ResourceLoader {}
-class AnimationLoader extends ResourceLoader {}
-class LibraryLoader extends ResourceLoader {}
+class StringLoader extends AbstractResourceLoader {}
+class ImageLoader extends AbstractResourceLoader {}
+class TextLoader extends AbstractResourceLoader {}
+class ContainerLoader extends AbstractResourceLoader {}
+class AnimationLoader extends AbstractResourceLoader {}
+class LibraryLoader extends AbstractResourceLoader {}
#end
@@ -240,7 +241,7 @@ class ResourceLoaderManager
/**
* Set isLoading to true or false depending on the content of filesArray.
* Retrieve the next ResourceData object.
- * Create the corresponding ResourceLoader
+ * Create the corresponding AbstractResourceLoader
* Actually start loading the resource.
*/
private static function loadNextResource():Void
@@ -258,7 +259,7 @@ class ResourceLoaderManager
var resourceDataToLoad:ResourceData = _resourceDataArray[0];
- var resourceLoader:ResourceLoader;
+ var resourceLoader:AbstractResourceLoader;
switch (resourceDataToLoad.loadingType)
{
case data:
@@ -9,7 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
-package cocktail.resource;
+package cocktail.resource.abstract;
import cocktail.domElement.DOMElement;
import haxe.Http;
import haxe.Log;
@@ -19,7 +19,7 @@ import haxe.Log;
* class which will be implemented for each file types.
* @author Yannick DOMINGUEZ
*/
-class ResourceLoader
+class AbstractResourceLoader
{
/**
@@ -11,7 +11,7 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
package cocktail.resource.as3;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
/**
* This is the Animation loader implementation for the Flash runtime. It is used to
@@ -21,7 +21,7 @@ import cocktail.resource.ResourceLoader;
*
* @author Yannick DOMINGUEZ
*/
-class AnimationLoader extends ResourceLoader
+class AnimationLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -19,7 +19,7 @@ import flash.system.ApplicationDomain;
import flash.system.LoaderContext;
import cocktail.domElement.ContainerDOMElement;
import cocktail.domElement.DOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -28,7 +28,7 @@ import cocktail.resource.ResourceData;
*
* @author Yannick DOMINGUEZ
*/
-class ContainerLoader extends ResourceLoader
+class ContainerLoader extends AbstractResourceLoader
{
/**
* The native flash skin loader
@@ -21,7 +21,7 @@ import haxe.Log;
import cocktail.domElement.DOMElement;
import cocktail.domElement.ImageDOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -32,7 +32,7 @@ import cocktail.resource.ResourceData;
*
* @author Yannick DOMINGUEZ
*/
-class ImageLoader extends ResourceLoader
+class ImageLoader extends AbstractResourceLoader
{
/**
* The native flash skin loader
@@ -14,7 +14,7 @@ package cocktail.resource.as3;
import flash.system.ApplicationDomain;
import flash.system.LoaderContext;
import haxe.Log;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import flash.events.IOErrorEvent;
import flash.net.URLRequest;
@@ -27,7 +27,7 @@ import flash.events.Event;
* the Flash DOM
* @author Yannick DOMINGUEZ
*/
-class LibraryLoader extends ResourceLoader
+class LibraryLoader extends AbstractResourceLoader
{
/**
* The native flash library loader
@@ -11,15 +11,15 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
package cocktail.resource.as3;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
/**
* Implementation of StringLoader for the Flash AVM2 runtime, used to load resource
* such as ax XML or JSON file using ActionScript3 URLLoader. It used the default implementation, found in
* it's parent class, the haxe.Http class acting as an abstraction layer
* @author Yannick DOMINGUEZ
*/
-class StringLoader extends ResourceLoader
+class StringLoader extends AbstractResourceLoader
{
public function new()
@@ -16,7 +16,7 @@ import cocktail.nativeElement.NativeElementData;
import flash.display.Sprite;
import cocktail.domElement.DOMElement;
import cocktail.domElement.TextDOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -28,7 +28,7 @@ import cocktail.resource.ResourceData;
*
* @author Yannick DOMINGUEZ
*/
-class TextLoader extends ResourceLoader
+class TextLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -11,7 +11,7 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
package cocktail.resource.js;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
/**
* This is the Animation loader implementation for the JavaScript runtime. It is used to
@@ -21,7 +21,7 @@ import cocktail.resource.ResourceLoader;
*
* @author Yannick DOMINGUEZ
*/
-class AnimationLoader extends ResourceLoader
+class AnimationLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -19,7 +19,7 @@ import js.Lib;
import js.Dom.HtmlDom;
import cocktail.domElement.ContainerDOMElement;
import cocktail.domElement.DOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -29,7 +29,7 @@ import cocktail.resource.ResourceData;
*
* @author Yannick DOMINGUEZ
*/
-class ContainerLoader extends ResourceLoader
+class ContainerLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -18,7 +18,7 @@ import js.Lib;
import js.Dom.HtmlDom;
import cocktail.domElement.DOMElement;
import cocktail.domElement.ImageDOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
import cocktail.nativeElement.NativeElementData;
@@ -29,7 +29,7 @@ import cocktail.nativeElement.NativeElementData;
* It instantiate and returns an Image DOMElement.
* @author Yannick DOMINGUEZ
*/
-class ImageLoader extends ResourceLoader
+class ImageLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -12,7 +12,7 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
package cocktail.resource.js;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import js.Dom.HtmlDom;
import js.Lib;
@@ -21,7 +21,7 @@ import js.Lib;
* is a .js file. This class is in charge of adding a script tag to the HTML DOM with the new script to add
* @author Yannick DOMINGUEZ
*/
-class LibraryLoader extends ResourceLoader
+class LibraryLoader extends AbstractResourceLoader
{
/**
@@ -11,15 +11,15 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
package cocktail.resource.js;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
/**
* Implementation of StringLoader for the JavaScript runtime, used to load resource
* such as ax XML or JSON file using AJAX. It used the default implementation, found in
* it's parent class, the haxe.Http class acting as an abstraction layer
* @author Yannick DOMINGUEZ
*/
-class StringLoader extends ResourceLoader
+class StringLoader extends AbstractResourceLoader
{
public function new()
{
@@ -17,7 +17,7 @@ import haxe.Http;
import js.Lib;
import cocktail.domElement.DOMElement;
import cocktail.domElement.TextDOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -28,7 +28,7 @@ import cocktail.resource.ResourceData;
*
* @author Yannick DOMINGUEZ
*/
-class TextLoader extends ResourceLoader
+class TextLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -11,7 +11,7 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
package cocktail.resource.php;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
/**
* This is the Animation loader implementation for the PHP runtime. It can be used to
@@ -22,7 +22,7 @@ import cocktail.resource.ResourceLoader;
* @author Raphael HARMEL
* @date 2011-08-03
*/
-class AnimationLoader extends ResourceLoader
+class AnimationLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -16,7 +16,7 @@ import haxe.Log;
import php.Web;
import cocktail.domElement.ContainerDOMElement;
import cocktail.domElement.DOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -27,7 +27,7 @@ import cocktail.resource.ResourceData;
* @author Raphael HARMEL
* @date 2011-08-03
*/
-class ContainerLoader extends ResourceLoader
+class ContainerLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -16,7 +16,7 @@ import haxe.Log;
import php.Web;
import cocktail.domElement.DOMElement;
import cocktail.domElement.ImageDOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -28,7 +28,7 @@ import cocktail.resource.ResourceData;
* @author Raphael HARMEL
* @date 2011-08-03
*/
-class ImageLoader extends ResourceLoader
+class ImageLoader extends AbstractResourceLoader
{
/**
* class constructor
@@ -13,7 +13,7 @@ package cocktail.resource.php;
import php.Web;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
/**
* This is the implementation of the library loader for the PHP runtime. A library in PHP
@@ -22,7 +22,7 @@ import cocktail.resource.ResourceLoader;
* @author Raphael HARMEL
* @date 2011-08-03
*/
-class LibraryLoader extends ResourceLoader
+class LibraryLoader extends AbstractResourceLoader
{
/**
@@ -12,7 +12,7 @@ To read the license please visit http://www.gnu.org/copyleft/gpl.html
package cocktail.resource.php;
import haxe.Http;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import php.FileSystem;
import php.Web;
@@ -24,7 +24,7 @@ import php.Web;
* @author Raphael HARMEL
* @date 2011-08-03
*/
-class StringLoader extends ResourceLoader
+class StringLoader extends AbstractResourceLoader
{
public function new()
{
@@ -15,7 +15,7 @@ import haxe.Http;
import php.Web;
import cocktail.domElement.DOMElement;
import cocktail.domElement.TextDOMElement;
-import cocktail.resource.ResourceLoader;
+import cocktail.resource.abstract.AbstractResourceLoader;
import cocktail.resource.ResourceData;
/**
@@ -27,7 +27,7 @@ import cocktail.resource.ResourceData;
* @author Raphael HARMEL
* @date 2011-08-03
*/
-class TextLoader extends ResourceLoader
+class TextLoader extends AbstractResourceLoader
{
/**
* class constructor

0 comments on commit 20d1c59

Please sign in to comment.