PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/away3d/tools/serialize/SerializerBase.as

http://github.com/away3d/away3d-core-fp11
ActionScript | 111 lines | 48 code | 11 blank | 52 comment | 0 complexity | d10a4a3038689e73031fd237343fd173 MD5 | raw file
  1package away3d.tools.serialize
  2{
  3	import away3d.core.math.Quaternion;
  4	import away3d.errors.AbstractMethodError;
  5	
  6	import flash.geom.Vector3D;
  7	
  8	/**
  9	 * SerializerBase is the abstract class for all Serializers. It provides an interface for basic data type writing.
 10	 * It is not intended for reading.
 11	 *
 12	 * @see away3d.tools.serialize.Serialize
 13	 */
 14	public class SerializerBase
 15	{
 16		/**
 17		 * Creates a new SerializerBase object.
 18		 */
 19		public function SerializerBase()
 20		{
 21		}
 22		
 23		/**
 24		 * Begin object serialization. Output className and instanceName.
 25		 * @param className name of class being serialized
 26		 * @param instanceName name of instance being serialized
 27		 */
 28		public function beginObject(className:String, instanceName:String):void
 29		{
 30			throw new AbstractMethodError();
 31		}
 32		
 33		/**
 34		 * Serialize int
 35		 * @param name name of value being serialized
 36		 * @param value value being serialized
 37		 */
 38		public function writeInt(name:String, value:int):void
 39		{
 40			throw new AbstractMethodError();
 41		}
 42		
 43		/**
 44		 * Serialize uint
 45		 * @param name name of value being serialized
 46		 * @param value value being serialized
 47		 */
 48		public function writeUint(name:String, value:uint):void
 49		{
 50			throw new AbstractMethodError();
 51		}
 52		
 53		/**
 54		 * Serialize Boolean
 55		 * @param name name of value being serialized
 56		 * @param value value being serialized
 57		 */
 58		public function writeBoolean(name:String, value:Boolean):void
 59		{
 60			throw new AbstractMethodError();
 61		}
 62		
 63		/**
 64		 * Serialize String
 65		 * @param name name of value being serialized
 66		 * @param value value being serialized
 67		 */
 68		public function writeString(name:String, value:String):void
 69		{
 70			throw new AbstractMethodError();
 71		}
 72		
 73		/**
 74		 * Serialize Vector3D
 75		 * @param name name of value being serialized
 76		 * @param value value being serialized
 77		 */
 78		public function writeVector3D(name:String, value:Vector3D):void
 79		{
 80			throw new AbstractMethodError();
 81		}
 82		
 83		/**
 84		 * Serialize Transform, in the form of Vector.<Number>
 85		 * @param name name of value being serialized
 86		 * @param value value being serialized
 87		 */
 88		public function writeTransform(name:String, value:Vector.<Number>):void
 89		{
 90			throw new AbstractMethodError();
 91		}
 92		
 93		/**
 94		 * Serialize Quaternion
 95		 * @param name name of value being serialized
 96		 * @param value value being serialized
 97		 */
 98		public function writeQuaternion(name:String, value:Quaternion):void
 99		{
100			throw new AbstractMethodError();
101		}
102		
103		/**
104		 * End object serialization
105		 */
106		public function endObject():void
107		{
108			throw new AbstractMethodError();
109		}
110	}
111}