Add Alternativa3D 8.32 and use its libraries

This commit is contained in:
Pyogenics
2025-05-13 21:27:03 +01:00
parent 533220281f
commit e2f159fe56
272 changed files with 14 additions and 22761 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "external/Alternativa3D"]
path = external/Alternativa3D
url = https://github.com/AlternativaPlatform/Alternativa3D

View File

@@ -4,6 +4,9 @@
"source-path": [ "source-path": [
"src" "src"
], ],
"library-path": [
"external/Alternativa3D/libs"
],
"output": "bin/tanki2.swf", "output": "bin/tanki2.swf",
"default-background-color": "#333333", "default-background-color": "#333333",
"default-frame-rate": 100, "default-frame-rate": 100,

View File

@@ -4,6 +4,9 @@
"source-path": [ "source-path": [
"src" "src"
], ],
"library-path": [
"external/Alternativa3D/libs"
],
"output": "bin/tanki2.swf", "output": "bin/tanki2.swf",
"default-background-color": "#333333", "default-background-color": "#333333",
"default-frame-rate": 60, "default-frame-rate": 60,

1
external/Alternativa3D vendored Submodule

Submodule external/Alternativa3D added at 91927dff32

View File

@@ -39,7 +39,7 @@ package
import flash.events.FullScreenEvent; import flash.events.FullScreenEvent;
import flash.events.KeyboardEvent; import flash.events.KeyboardEvent;
import flash.ui.Keyboard; import flash.ui.Keyboard;
import platform.client.a3d.osgi.Activator; import platform.client.formats.a3d.osgi.Activator;
import platform.clients.fp10.libraries.alternativaprotocol.Activator; import platform.clients.fp10.libraries.alternativaprotocol.Activator;
import tankshudDemo.TanksHudDemo; import tankshudDemo.TanksHudDemo;
@@ -186,7 +186,7 @@ package
this.name_nZ.start(this,new Properties(loaderInfo.parameters),new Vector.<LibraryInfo>(),new ConnectionParameters(null,null,null),new Vector.<String>()); this.name_nZ.start(this,new Properties(loaderInfo.parameters),new Vector.<LibraryInfo>(),new ConnectionParameters(null,null,null),new Vector.<String>());
new ProtocolActivator().start(OSGi.getInstance()); new ProtocolActivator().start(OSGi.getInstance());
new platform.clients.fp10.libraries.alternativaprotocol.Activator().start(OSGi.getInstance()); new platform.clients.fp10.libraries.alternativaprotocol.Activator().start(OSGi.getInstance());
new platform.client.a3d.osgi.Activator().start(OSGi.getInstance()); new platform.client.formats.a3d.osgi.Activator().start(OSGi.getInstance());
} }
private function initConsole() : void private function initConsole() : void

View File

@@ -1,58 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodecStringLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecStringLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(String,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<String> = new Vector.<String>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = String(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<String> = Vector.<String>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,88 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodecStringLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecStringLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(String,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<String> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<String>> = new Vector.<Vector.<String>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<String>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = String(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<String> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<String>> = Vector.<Vector.<String>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,118 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodecStringLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecStringLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(String,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<String>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<String> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<String>>> = new Vector.<Vector.<Vector.<String>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<String>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<String>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = String(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<String>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<String> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<String>>> = Vector.<Vector.<Vector.<String>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Byte;
public class VectorCodecbyteLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecbyteLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Byte,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<int> = new Vector.<int>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = int(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<int> = Vector.<int>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Byte;
public class VectorCodecbyteLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecbyteLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Byte,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<int> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<int>> = new Vector.<Vector.<int>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<int>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = int(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<int> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<int>> = Vector.<Vector.<int>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Byte;
public class VectorCodecbyteLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecbyteLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Byte,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<int>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<int> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<int>>> = new Vector.<Vector.<Vector.<int>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<int>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<int>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = int(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<int>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<int> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<int>>> = Vector.<Vector.<Vector.<int>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,60 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
public class VectorCodecfloatLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecfloatLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Float,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Number> = new Vector.<Number>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = Number(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var value:Number = NaN;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Number> = Vector.<Number>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
public class VectorCodecfloatLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecfloatLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Float,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Number> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Number>> = new Vector.<Vector.<Number>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Number>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = Number(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Number> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Number>> = Vector.<Vector.<Number>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
public class VectorCodecfloatLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecfloatLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Float,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<Number>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<Number> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<Number>>> = new Vector.<Vector.<Vector.<Number>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<Number>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<Number>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = Number(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<Number>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<Number> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<Number>>> = Vector.<Vector.<Vector.<Number>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,58 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodecintLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecintLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(int,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<int> = new Vector.<int>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = int(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<int> = Vector.<int>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,88 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodecintLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecintLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(int,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<int> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<int>> = new Vector.<Vector.<int>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<int>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = int(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<int> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<int>> = Vector.<Vector.<int>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,118 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodecintLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecintLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(int,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<int>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<int> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<int>>> = new Vector.<Vector.<Vector.<int>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<int>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<int>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = int(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<int>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<int> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<int>>> = Vector.<Vector.<Vector.<int>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
public class VectorCodeclongLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodeclongLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Long,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Long> = new Vector.<Long>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = Long(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Long> = Vector.<Long>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
public class VectorCodeclongLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodeclongLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Long,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Long> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Long>> = new Vector.<Vector.<Long>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Long>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = Long(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Long> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Long>> = Vector.<Vector.<Long>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
public class VectorCodeclongLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodeclongLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Long,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<Long>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<Long> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<Long>>> = new Vector.<Vector.<Vector.<Long>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<Long>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<Long>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = Long(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<Long>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<Long> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<Long>>> = Vector.<Vector.<Vector.<Long>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Short;
public class VectorCodecshortLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecshortLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Short,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<int> = new Vector.<int>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = int(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<int> = Vector.<int>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Short;
public class VectorCodecshortLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecshortLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Short,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<int> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<int>> = new Vector.<Vector.<int>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<int>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = int(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<int> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<int>> = Vector.<Vector.<int>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Short;
public class VectorCodecshortLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecshortLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Short,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<int>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<int> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<int>>> = new Vector.<Vector.<Vector.<int>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<int>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<int>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = int(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<int>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<int> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<int>>> = Vector.<Vector.<Vector.<int>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,113 +0,0 @@
package _codec.commons
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import commons.A3DMatrix;
public class CodecA3DMatrix implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_Bx:ICodec;
private var name_Qh:ICodec;
private var name_ir:ICodec;
private var name_p:ICodec;
private var name_Kw:ICodec;
private var name_PP:ICodec;
private var name_e7:ICodec;
private var name_QE:ICodec;
private var name_SL:ICodec;
private var name_for:ICodec;
private var name_Hb:ICodec;
private var name_3B:ICodec;
public function CodecA3DMatrix()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_Bx = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_Qh = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_ir = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_p = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_Kw = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_PP = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_e7 = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_QE = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_SL = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_for = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_Hb = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_3B = protocol.getCodec(new TypeCodecInfo(Float,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_a:Number = Number(this.name_Bx.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","a",value_a);
var value_b:Number = Number(this.name_Qh.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","b",value_b);
var value_c:Number = Number(this.name_ir.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","c",value_c);
var value_d:Number = Number(this.name_p.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","d",value_d);
var value_e:Number = Number(this.name_Kw.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","e",value_e);
var value_f:Number = Number(this.name_PP.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","f",value_f);
var value_g:Number = Number(this.name_e7.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","g",value_g);
var value_h:Number = Number(this.name_QE.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","h",value_h);
var value_i:Number = Number(this.name_SL.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","i",value_i);
var value_j:Number = Number(this.name_for.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","j",value_j);
var value_k:Number = Number(this.name_Hb.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","k",value_k);
var value_l:Number = Number(this.name_3B.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","commons.A3DMatrix","l",value_l);
return new A3DMatrix(value_a,value_b,value_c,value_d,value_e,value_f,value_g,value_h,value_i,value_j,value_k,value_l);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DMatrix = A3DMatrix(object);
this.name_Bx.encode(protocolBuffer,struct.a);
this.name_Qh.encode(protocolBuffer,struct.b);
this.name_ir.encode(protocolBuffer,struct.c);
this.name_p.encode(protocolBuffer,struct.d);
this.name_Kw.encode(protocolBuffer,struct.e);
this.name_PP.encode(protocolBuffer,struct.f);
this.name_e7.encode(protocolBuffer,struct.g);
this.name_QE.encode(protocolBuffer,struct.h);
this.name_SL.encode(protocolBuffer,struct.i);
this.name_for.encode(protocolBuffer,struct.j);
this.name_Hb.encode(protocolBuffer,struct.k);
this.name_3B.encode(protocolBuffer,struct.l);
}
}
}

View File

@@ -1,46 +0,0 @@
package _codec.commons
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
public class CodecId implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_2o:ICodec;
public function CodecId()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_2o = protocol.getCodec(new TypeCodecInfo(uint,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_id:uint = uint(this.name_2o.decode(protocolBuffer) as uint);
log.log("codec","struct %1 field %2 value %3","commons.Id","id",value_id);
return new Id(value_id);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:Id = Id(object);
this.name_2o.encode(protocolBuffer,struct.id);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.commons
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import commons.A3DMatrix;
public class VectorCodecA3DMatrixLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMatrixLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMatrix,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DMatrix> = new Vector.<A3DMatrix>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DMatrix(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DMatrix> = Vector.<A3DMatrix>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.commons
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import commons.A3DMatrix;
public class VectorCodecA3DMatrixLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMatrixLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMatrix,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DMatrix> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DMatrix>> = new Vector.<Vector.<A3DMatrix>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DMatrix>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DMatrix(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DMatrix> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DMatrix>> = Vector.<Vector.<A3DMatrix>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.commons
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import commons.A3DMatrix;
public class VectorCodecA3DMatrixLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMatrixLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMatrix,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DMatrix>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DMatrix> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DMatrix>>> = new Vector.<Vector.<Vector.<A3DMatrix>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DMatrix>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DMatrix>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DMatrix(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DMatrix>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DMatrix> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DMatrix>>> = Vector.<Vector.<Vector.<A3DMatrix>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.commons
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
public class VectorCodecIdLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecIdLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Id,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Id> = new Vector.<Id>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = Id(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Id> = Vector.<Id>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.commons
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
public class VectorCodecIdLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecIdLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Id,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Id> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Id>> = new Vector.<Vector.<Id>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Id>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = Id(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Id> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Id>> = Vector.<Vector.<Id>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.commons
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
public class VectorCodecIdLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecIdLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(Id,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<Id>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<Id> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<Id>>> = new Vector.<Vector.<Vector.<Id>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<Id>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<Id>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = Id(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<Id>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<Id> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<Id>>> = Vector.<Vector.<Vector.<Id>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.UShort;
public class VectorCodecintLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecintLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(UShort,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<uint> = new Vector.<uint>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = uint(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<uint> = Vector.<uint>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.UShort;
public class VectorCodecintLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecintLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(UShort,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<uint> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<uint>> = new Vector.<Vector.<uint>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<uint>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = uint(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<uint> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<uint>> = Vector.<Vector.<uint>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.UShort;
public class VectorCodecintLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecintLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(UShort,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<uint>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<uint> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<uint>>> = new Vector.<Vector.<Vector.<uint>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<uint>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<uint>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = uint(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<uint>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<uint> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<uint>>> = Vector.<Vector.<Vector.<uint>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,58 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodeclongLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodeclongLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(uint,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<uint> = new Vector.<uint>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = uint(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<uint> = Vector.<uint>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,88 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodeclongLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodeclongLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(uint,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<uint> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<uint>> = new Vector.<Vector.<uint>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<uint>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = uint(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<uint> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<uint>> = Vector.<Vector.<uint>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,118 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
public class VectorCodeclongLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodeclongLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(uint,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<uint>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<uint> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<uint>>> = new Vector.<Vector.<Vector.<uint>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<uint>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<uint>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = uint(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<uint>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<uint> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<uint>>> = Vector.<Vector.<Vector.<uint>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.UByte;
public class VectorCodecshortLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecshortLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(UByte,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<uint> = new Vector.<uint>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = uint(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<uint> = Vector.<uint>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.UByte;
public class VectorCodecshortLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecshortLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(UByte,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<uint> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<uint>> = new Vector.<Vector.<uint>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<uint>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = uint(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<uint> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<uint>> = Vector.<Vector.<uint>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.unsigned
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.UByte;
public class VectorCodecshortLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecshortLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(UByte,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<uint>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<uint> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<uint>>> = new Vector.<Vector.<Vector.<uint>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<uint>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<uint>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = uint(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<uint>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<uint> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<uint>>> = Vector.<Vector.<Vector.<uint>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,83 +0,0 @@
package _codec.versions.version1.a3d
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.A3D;
import versions.version1.a3d.geometry.A3DGeometry;
import versions.version1.a3d.materials.A3DImage;
import versions.version1.a3d.materials.A3DMap;
import versions.version1.a3d.materials.A3DMaterial;
import versions.version1.a3d.objects.A3DBox;
import versions.version1.a3d.objects.A3DObject;
public class CodecA3D implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_EA:ICodec;
private var name_PA:ICodec;
private var name_Sd:ICodec;
private var name_dB:ICodec;
private var name_77:ICodec;
private var name_1x:ICodec;
public function CodecA3D()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_EA = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DBox,false),true,1));
this.name_PA = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DGeometry,false),true,1));
this.name_Sd = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DImage,false),true,1));
this.name_dB = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DMap,false),true,1));
this.name_77 = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DMaterial,false),true,1));
this.name_1x = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DObject,false),true,1));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_boxes:Vector.<A3DBox> = this.name_EA.decode(protocolBuffer) as Vector.<A3DBox>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","boxes",value_boxes);
var value_geometries:Vector.<A3DGeometry> = this.name_PA.decode(protocolBuffer) as Vector.<A3DGeometry>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","geometries",value_geometries);
var value_images:Vector.<A3DImage> = this.name_Sd.decode(protocolBuffer) as Vector.<A3DImage>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","images",value_images);
var value_maps:Vector.<A3DMap> = this.name_dB.decode(protocolBuffer) as Vector.<A3DMap>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","maps",value_maps);
var value_materials:Vector.<A3DMaterial> = this.name_77.decode(protocolBuffer) as Vector.<A3DMaterial>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","materials",value_materials);
var value_objects:Vector.<A3DObject> = this.name_1x.decode(protocolBuffer) as Vector.<A3DObject>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.A3D","objects",value_objects);
return new A3D(value_boxes,value_geometries,value_images,value_maps,value_materials,value_objects);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3D = A3D(object);
this.name_EA.encode(protocolBuffer,struct.boxes);
this.name_PA.encode(protocolBuffer,struct.geometries);
this.name_Sd.encode(protocolBuffer,struct.images);
this.name_dB.encode(protocolBuffer,struct.maps);
this.name_77.encode(protocolBuffer,struct.materials);
this.name_1x.encode(protocolBuffer,struct.objects);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.A3D;
public class VectorCodecA3DLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3D> = new Vector.<A3D>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3D(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3D> = Vector.<A3D>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.A3D;
public class VectorCodecA3DLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3D> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3D>> = new Vector.<Vector.<A3D>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3D>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3D(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3D> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3D>> = Vector.<Vector.<A3D>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.A3D;
public class VectorCodecA3DLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3D>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3D> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3D>>> = new Vector.<Vector.<Vector.<A3D>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3D>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3D>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3D(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3D>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3D> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3D>>> = Vector.<Vector.<Vector.<A3D>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,62 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
import versions.version1.a3d.geometry.A3DGeometry;
import versions.version1.a3d.geometry.A3DIndexBuffer;
import versions.version1.a3d.geometry.A3DVertexBuffer;
public class CodecA3DGeometry implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_2o:ICodec;
private var name_XF:ICodec;
private var name_U9:ICodec;
public function CodecA3DGeometry()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_2o = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_XF = protocol.getCodec(new TypeCodecInfo(A3DIndexBuffer,true));
this.name_U9 = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DVertexBuffer,false),true,1));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_id:Id = this.name_2o.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DGeometry","id",value_id);
var value_indexBuffer:A3DIndexBuffer = this.name_XF.decode(protocolBuffer) as A3DIndexBuffer;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DGeometry","indexBuffer",value_indexBuffer);
var value_vertexBuffers:Vector.<A3DVertexBuffer> = this.name_U9.decode(protocolBuffer) as Vector.<A3DVertexBuffer>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DGeometry","vertexBuffers",value_vertexBuffers);
return new A3DGeometry(value_id,value_indexBuffer,value_vertexBuffers);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DGeometry = A3DGeometry(object);
this.name_2o.encode(protocolBuffer,struct.id);
this.name_XF.encode(protocolBuffer,struct.indexBuffer);
this.name_U9.encode(protocolBuffer,struct.vertexBuffers);
}
}
}

View File

@@ -1,53 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import flash.utils.ByteArray;
import versions.version1.a3d.geometry.A3DIndexBuffer;
public class CodecA3DIndexBuffer implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_GN:ICodec;
private var name_mz:ICodec;
public function CodecA3DIndexBuffer()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_GN = protocol.getCodec(new TypeCodecInfo(ByteArray,true));
this.name_mz = protocol.getCodec(new TypeCodecInfo(int,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_byteBuffer:ByteArray = this.name_GN.decode(protocolBuffer) as ByteArray;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DIndexBuffer","byteBuffer",value_byteBuffer);
var value_indexCount:int = int(this.name_mz.decode(protocolBuffer) as int);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DIndexBuffer","indexCount",value_indexCount);
return new A3DIndexBuffer(value_byteBuffer,value_indexCount);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DIndexBuffer = A3DIndexBuffer(object);
this.name_GN.encode(protocolBuffer,struct.byteBuffer);
this.name_mz.encode(protocolBuffer,struct.indexCount);
}
}
}

View File

@@ -1,62 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Byte;
import alternativa.types.UShort;
import flash.utils.ByteArray;
import versions.version1.a3d.geometry.A3DVertexBuffer;
public class CodecA3DVertexBuffer implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_Lj:ICodec;
private var name_GN:ICodec;
private var name_hc:ICodec;
public function CodecA3DVertexBuffer()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_Lj = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Byte,false),true,1));
this.name_GN = protocol.getCodec(new TypeCodecInfo(ByteArray,true));
this.name_hc = protocol.getCodec(new TypeCodecInfo(UShort,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_attributes:Vector.<int> = this.name_Lj.decode(protocolBuffer) as Vector.<int>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DVertexBuffer","attributes",value_attributes);
var value_byteBuffer:ByteArray = this.name_GN.decode(protocolBuffer) as ByteArray;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DVertexBuffer","byteBuffer",value_byteBuffer);
var value_vertexCount:uint = uint(this.name_hc.decode(protocolBuffer) as uint);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.geometry.A3DVertexBuffer","vertexCount",value_vertexCount);
return new A3DVertexBuffer(value_attributes,value_byteBuffer,value_vertexCount);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DVertexBuffer = A3DVertexBuffer(object);
this.name_Lj.encode(protocolBuffer,struct.attributes);
this.name_GN.encode(protocolBuffer,struct.byteBuffer);
this.name_hc.encode(protocolBuffer,struct.vertexCount);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DGeometry;
public class VectorCodecA3DGeometryLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DGeometryLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DGeometry,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DGeometry> = new Vector.<A3DGeometry>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DGeometry(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DGeometry> = Vector.<A3DGeometry>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DGeometry;
public class VectorCodecA3DGeometryLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DGeometryLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DGeometry,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DGeometry> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DGeometry>> = new Vector.<Vector.<A3DGeometry>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DGeometry>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DGeometry(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DGeometry> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DGeometry>> = Vector.<Vector.<A3DGeometry>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DGeometry;
public class VectorCodecA3DGeometryLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DGeometryLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DGeometry,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DGeometry>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DGeometry> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DGeometry>>> = new Vector.<Vector.<Vector.<A3DGeometry>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DGeometry>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DGeometry>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DGeometry(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DGeometry>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DGeometry> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DGeometry>>> = Vector.<Vector.<Vector.<A3DGeometry>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DIndexBuffer;
public class VectorCodecA3DIndexBufferLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DIndexBufferLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DIndexBuffer,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DIndexBuffer> = new Vector.<A3DIndexBuffer>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DIndexBuffer(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DIndexBuffer> = Vector.<A3DIndexBuffer>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DIndexBuffer;
public class VectorCodecA3DIndexBufferLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DIndexBufferLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DIndexBuffer,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DIndexBuffer> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DIndexBuffer>> = new Vector.<Vector.<A3DIndexBuffer>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DIndexBuffer>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DIndexBuffer(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DIndexBuffer> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DIndexBuffer>> = Vector.<Vector.<A3DIndexBuffer>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DIndexBuffer;
public class VectorCodecA3DIndexBufferLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DIndexBufferLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DIndexBuffer,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DIndexBuffer>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DIndexBuffer> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DIndexBuffer>>> = new Vector.<Vector.<Vector.<A3DIndexBuffer>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DIndexBuffer>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DIndexBuffer>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DIndexBuffer(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DIndexBuffer>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DIndexBuffer> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DIndexBuffer>>> = Vector.<Vector.<Vector.<A3DIndexBuffer>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DVertexBuffer;
public class VectorCodecA3DVertexBufferLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DVertexBufferLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DVertexBuffer,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DVertexBuffer> = new Vector.<A3DVertexBuffer>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DVertexBuffer(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DVertexBuffer> = Vector.<A3DVertexBuffer>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DVertexBuffer;
public class VectorCodecA3DVertexBufferLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DVertexBufferLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DVertexBuffer,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DVertexBuffer> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DVertexBuffer>> = new Vector.<Vector.<A3DVertexBuffer>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DVertexBuffer>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DVertexBuffer(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DVertexBuffer> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DVertexBuffer>> = Vector.<Vector.<A3DVertexBuffer>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.geometry
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.geometry.A3DVertexBuffer;
public class VectorCodecA3DVertexBufferLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DVertexBufferLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DVertexBuffer,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DVertexBuffer>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DVertexBuffer> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DVertexBuffer>>> = new Vector.<Vector.<Vector.<A3DVertexBuffer>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DVertexBuffer>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DVertexBuffer>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DVertexBuffer(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DVertexBuffer>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DVertexBuffer> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DVertexBuffer>>> = Vector.<Vector.<Vector.<A3DVertexBuffer>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,46 +0,0 @@
package _codec.versions.version1.a3d.id
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.id.ParentId;
public class CodecParentId implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_2o:ICodec;
public function CodecParentId()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_2o = protocol.getCodec(new TypeCodecInfo(uint,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_id:uint = uint(this.name_2o.decode(protocolBuffer) as uint);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.id.ParentId","id",value_id);
return new ParentId(value_id);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:ParentId = ParentId(object);
this.name_2o.encode(protocolBuffer,struct.id);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.id
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.id.ParentId;
public class VectorCodecParentIdLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecParentIdLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(ParentId,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<ParentId> = new Vector.<ParentId>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = ParentId(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<ParentId> = Vector.<ParentId>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.id
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.id.ParentId;
public class VectorCodecParentIdLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecParentIdLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(ParentId,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<ParentId> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<ParentId>> = new Vector.<Vector.<ParentId>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<ParentId>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = ParentId(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<ParentId> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<ParentId>> = Vector.<Vector.<ParentId>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.id
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.id.ParentId;
public class VectorCodecParentIdLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecParentIdLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(ParentId,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<ParentId>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<ParentId> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<ParentId>>> = new Vector.<Vector.<Vector.<ParentId>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<ParentId>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<ParentId>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = ParentId(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<ParentId>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<ParentId> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<ParentId>>> = Vector.<Vector.<Vector.<ParentId>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,53 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
import versions.version1.a3d.materials.A3DImage;
public class CodecA3DImage implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_2o:ICodec;
private var name_aV:ICodec;
public function CodecA3DImage()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_2o = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_aV = protocol.getCodec(new TypeCodecInfo(String,true));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_id:Id = this.name_2o.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DImage","id",value_id);
var value_url:String = this.name_aV.decode(protocolBuffer) as String;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DImage","url",value_url);
return new A3DImage(value_id,value_url);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DImage = A3DImage(object);
this.name_2o.encode(protocolBuffer,struct.id);
this.name_aV.encode(protocolBuffer,struct.url);
}
}
}

View File

@@ -1,85 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import alternativa.types.UShort;
import commons.Id;
import versions.version1.a3d.materials.A3DMap;
public class CodecA3DMap implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_mC:ICodec;
private var name_2o:ICodec;
private var name_2N:ICodec;
private var name_K5:ICodec;
private var name_Q5:ICodec;
private var name_WH:ICodec;
private var name_kh:ICodec;
public function CodecA3DMap()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_mC = protocol.getCodec(new TypeCodecInfo(UShort,false));
this.name_2o = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_2N = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_K5 = protocol.getCodec(new TypeCodecInfo(Float,true));
this.name_Q5 = protocol.getCodec(new TypeCodecInfo(Float,true));
this.name_WH = protocol.getCodec(new TypeCodecInfo(Float,true));
this.name_kh = protocol.getCodec(new TypeCodecInfo(Float,true));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_channel:uint = uint(this.name_mC.decode(protocolBuffer) as uint);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMap","channel",value_channel);
var value_id:Id = this.name_2o.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMap","id",value_id);
var value_imageId:Id = this.name_2N.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMap","imageId",value_imageId);
var value_uOffset:Number = Number(this.name_K5.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMap","uOffset",value_uOffset);
var value_uScale:Number = Number(this.name_Q5.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMap","uScale",value_uScale);
var value_vOffset:Number = Number(this.name_WH.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMap","vOffset",value_vOffset);
var value_vScale:Number = Number(this.name_kh.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMap","vScale",value_vScale);
return new A3DMap(value_channel,value_id,value_imageId,value_uOffset,value_uScale,value_vOffset,value_vScale);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DMap = A3DMap(object);
this.name_mC.encode(protocolBuffer,struct.channel);
this.name_2o.encode(protocolBuffer,struct.id);
this.name_2N.encode(protocolBuffer,struct.imageId);
this.name_K5.encode(protocolBuffer,struct.uOffset);
this.name_Q5.encode(protocolBuffer,struct.uScale);
this.name_WH.encode(protocolBuffer,struct.vOffset);
this.name_kh.encode(protocolBuffer,struct.vScale);
}
}
}

View File

@@ -1,83 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
import versions.version1.a3d.materials.A3DMaterial;
public class CodecA3DMaterial implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_9A:ICodec;
private var name_hw:ICodec;
private var name_2o:ICodec;
private var name_Hu:ICodec;
private var name_GK:ICodec;
private var name_LZ:ICodec;
private var name_FU:ICodec;
public function CodecA3DMaterial()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_9A = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_hw = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_2o = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_Hu = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_GK = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_LZ = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_FU = protocol.getCodec(new TypeCodecInfo(Id,true));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_diffuseMapId:Id = this.name_9A.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMaterial","diffuseMapId",value_diffuseMapId);
var value_glossinessMapId:Id = this.name_hw.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMaterial","glossinessMapId",value_glossinessMapId);
var value_id:Id = this.name_2o.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMaterial","id",value_id);
var value_lightMapId:Id = this.name_Hu.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMaterial","lightMapId",value_lightMapId);
var value_normalMapId:Id = this.name_GK.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMaterial","normalMapId",value_normalMapId);
var value_opacityMapId:Id = this.name_LZ.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMaterial","opacityMapId",value_opacityMapId);
var value_specularMapId:Id = this.name_FU.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.materials.A3DMaterial","specularMapId",value_specularMapId);
return new A3DMaterial(value_diffuseMapId,value_glossinessMapId,value_id,value_lightMapId,value_normalMapId,value_opacityMapId,value_specularMapId);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DMaterial = A3DMaterial(object);
this.name_9A.encode(protocolBuffer,struct.diffuseMapId);
this.name_hw.encode(protocolBuffer,struct.glossinessMapId);
this.name_2o.encode(protocolBuffer,struct.id);
this.name_Hu.encode(protocolBuffer,struct.lightMapId);
this.name_GK.encode(protocolBuffer,struct.normalMapId);
this.name_LZ.encode(protocolBuffer,struct.opacityMapId);
this.name_FU.encode(protocolBuffer,struct.specularMapId);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DImage;
public class VectorCodecA3DImageLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DImageLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DImage,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DImage> = new Vector.<A3DImage>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DImage(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DImage> = Vector.<A3DImage>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DImage;
public class VectorCodecA3DImageLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DImageLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DImage,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DImage> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DImage>> = new Vector.<Vector.<A3DImage>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DImage>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DImage(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DImage> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DImage>> = Vector.<Vector.<A3DImage>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DImage;
public class VectorCodecA3DImageLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DImageLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DImage,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DImage>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DImage> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DImage>>> = new Vector.<Vector.<Vector.<A3DImage>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DImage>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DImage>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DImage(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DImage>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DImage> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DImage>>> = Vector.<Vector.<Vector.<A3DImage>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DMap;
public class VectorCodecA3DMapLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMapLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMap,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DMap> = new Vector.<A3DMap>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DMap(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DMap> = Vector.<A3DMap>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DMap;
public class VectorCodecA3DMapLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMapLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMap,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DMap> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DMap>> = new Vector.<Vector.<A3DMap>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DMap>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DMap(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DMap> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DMap>> = Vector.<Vector.<A3DMap>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DMap;
public class VectorCodecA3DMapLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMapLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMap,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DMap>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DMap> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DMap>>> = new Vector.<Vector.<Vector.<A3DMap>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DMap>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DMap>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DMap(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DMap>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DMap> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DMap>>> = Vector.<Vector.<Vector.<A3DMap>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DMaterial;
public class VectorCodecA3DMaterialLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMaterialLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMaterial,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DMaterial> = new Vector.<A3DMaterial>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DMaterial(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DMaterial> = Vector.<A3DMaterial>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DMaterial;
public class VectorCodecA3DMaterialLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMaterialLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMaterial,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DMaterial> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DMaterial>> = new Vector.<Vector.<A3DMaterial>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DMaterial>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DMaterial(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DMaterial> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DMaterial>> = Vector.<Vector.<A3DMaterial>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.materials
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.materials.A3DMaterial;
public class VectorCodecA3DMaterialLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DMaterialLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DMaterial,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DMaterial>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DMaterial> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DMaterial>>> = new Vector.<Vector.<Vector.<A3DMaterial>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DMaterial>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DMaterial>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DMaterial(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DMaterial>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DMaterial> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DMaterial>>> = Vector.<Vector.<Vector.<A3DMaterial>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,55 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import commons.Id;
import versions.version1.a3d.objects.A3DBox;
public class CodecA3DBox implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_pM:ICodec;
private var name_2o:ICodec;
public function CodecA3DBox()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_pM = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Float,false),true,1));
this.name_2o = protocol.getCodec(new TypeCodecInfo(Id,true));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_box:Vector.<Number> = this.name_pM.decode(protocolBuffer) as Vector.<Number>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DBox","box",value_box);
var value_id:Id = this.name_2o.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DBox","id",value_id);
return new A3DBox(value_box,value_id);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DBox = A3DBox(object);
this.name_pM.encode(protocolBuffer,struct.box);
this.name_2o.encode(protocolBuffer,struct.id);
}
}
}

View File

@@ -1,93 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
import versions.version1.a3d.id.ParentId;
import versions.version1.a3d.objects.A3DObject;
import versions.version1.a3d.objects.A3DSurface;
import versions.version1.a3d.objects.A3DTransformation;
public class CodecA3DObject implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_Dh:ICodec;
private var name_e:ICodec;
private var name_2o:ICodec;
private var name_XW:ICodec;
private var name_jk:ICodec;
private var name_Qr:ICodec;
private var name_9u:ICodec;
private var name_h9:ICodec;
public function CodecA3DObject()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_Dh = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_e = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_2o = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_XW = protocol.getCodec(new TypeCodecInfo(String,true));
this.name_jk = protocol.getCodec(new TypeCodecInfo(ParentId,true));
this.name_Qr = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3DSurface,false),true,1));
this.name_9u = protocol.getCodec(new TypeCodecInfo(A3DTransformation,true));
this.name_h9 = protocol.getCodec(new TypeCodecInfo(Boolean,true));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_boundBoxId:Id = this.name_Dh.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","boundBoxId",value_boundBoxId);
var value_geometryId:Id = this.name_e.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","geometryId",value_geometryId);
var value_id:Id = this.name_2o.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","id",value_id);
var value_name:String = this.name_XW.decode(protocolBuffer) as String;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","name",value_name);
var value_parentId:ParentId = this.name_jk.decode(protocolBuffer) as ParentId;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","parentId",value_parentId);
var value_surfaces:Vector.<A3DSurface> = this.name_Qr.decode(protocolBuffer) as Vector.<A3DSurface>;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","surfaces",value_surfaces);
var value_transformation:A3DTransformation = this.name_9u.decode(protocolBuffer) as A3DTransformation;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","transformation",value_transformation);
var value_visible:Boolean = Boolean(this.name_h9.decode(protocolBuffer) as Boolean);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DObject","visible",value_visible);
return new A3DObject(value_boundBoxId,value_geometryId,value_id,value_name,value_parentId,value_surfaces,value_transformation,value_visible);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DObject = A3DObject(object);
this.name_Dh.encode(protocolBuffer,struct.boundBoxId);
this.name_e.encode(protocolBuffer,struct.geometryId);
this.name_2o.encode(protocolBuffer,struct.id);
this.name_XW.encode(protocolBuffer,struct.name);
this.name_jk.encode(protocolBuffer,struct.parentId);
this.name_Qr.encode(protocolBuffer,struct.surfaces);
this.name_9u.encode(protocolBuffer,struct.transformation);
this.name_h9.encode(protocolBuffer,struct.visible);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import commons.Id;
import versions.version1.a3d.objects.A3DSurface;
public class CodecA3DSurface implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_AL:ICodec;
private var name_Av:ICodec;
private var name_pJ:ICodec;
public function CodecA3DSurface()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_AL = protocol.getCodec(new TypeCodecInfo(int,false));
this.name_Av = protocol.getCodec(new TypeCodecInfo(Id,true));
this.name_pJ = protocol.getCodec(new TypeCodecInfo(int,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_indexBegin:int = int(this.name_AL.decode(protocolBuffer) as int);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DSurface","indexBegin",value_indexBegin);
var value_materialId:Id = this.name_Av.decode(protocolBuffer) as Id;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DSurface","materialId",value_materialId);
var value_numTriangles:int = int(this.name_pJ.decode(protocolBuffer) as int);
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DSurface","numTriangles",value_numTriangles);
return new A3DSurface(value_indexBegin,value_materialId,value_numTriangles);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DSurface = A3DSurface(object);
this.name_AL.encode(protocolBuffer,struct.indexBegin);
this.name_Av.encode(protocolBuffer,struct.materialId);
this.name_pJ.encode(protocolBuffer,struct.numTriangles);
}
}
}

View File

@@ -1,47 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import commons.A3DMatrix;
import versions.version1.a3d.objects.A3DTransformation;
public class CodecA3DTransformation implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_dG:ICodec;
public function CodecA3DTransformation()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_dG = protocol.getCodec(new TypeCodecInfo(A3DMatrix,true));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_matrix:A3DMatrix = this.name_dG.decode(protocolBuffer) as A3DMatrix;
log.log("codec","struct %1 field %2 value %3","versions.version1.a3d.objects.A3DTransformation","matrix",value_matrix);
return new A3DTransformation(value_matrix);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3DTransformation = A3DTransformation(object);
this.name_dG.encode(protocolBuffer,struct.matrix);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DBox;
public class VectorCodecA3DBoxLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DBoxLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DBox,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DBox> = new Vector.<A3DBox>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DBox(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DBox> = Vector.<A3DBox>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DBox;
public class VectorCodecA3DBoxLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DBoxLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DBox,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DBox> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DBox>> = new Vector.<Vector.<A3DBox>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DBox>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DBox(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DBox> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DBox>> = Vector.<Vector.<A3DBox>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DBox;
public class VectorCodecA3DBoxLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DBoxLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DBox,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DBox>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DBox> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DBox>>> = new Vector.<Vector.<Vector.<A3DBox>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DBox>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DBox>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DBox(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DBox>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DBox> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DBox>>> = Vector.<Vector.<Vector.<A3DBox>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DObject;
public class VectorCodecA3DObjectLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DObjectLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DObject,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DObject> = new Vector.<A3DObject>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DObject(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DObject> = Vector.<A3DObject>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DObject;
public class VectorCodecA3DObjectLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DObjectLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DObject,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DObject> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DObject>> = new Vector.<Vector.<A3DObject>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DObject>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DObject(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DObject> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DObject>> = Vector.<Vector.<A3DObject>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DObject;
public class VectorCodecA3DObjectLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DObjectLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DObject,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DObject>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DObject> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DObject>>> = new Vector.<Vector.<Vector.<A3DObject>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DObject>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DObject>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DObject(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DObject>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DObject> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DObject>>> = Vector.<Vector.<Vector.<A3DObject>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DSurface;
public class VectorCodecA3DSurfaceLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DSurfaceLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DSurface,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DSurface> = new Vector.<A3DSurface>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DSurface(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DSurface> = Vector.<A3DSurface>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DSurface;
public class VectorCodecA3DSurfaceLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DSurfaceLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DSurface,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DSurface> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DSurface>> = new Vector.<Vector.<A3DSurface>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DSurface>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DSurface(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DSurface> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DSurface>> = Vector.<Vector.<A3DSurface>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DSurface;
public class VectorCodecA3DSurfaceLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DSurfaceLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DSurface,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DSurface>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DSurface> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DSurface>>> = new Vector.<Vector.<Vector.<A3DSurface>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DSurface>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DSurface>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DSurface(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DSurface>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DSurface> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DSurface>>> = Vector.<Vector.<Vector.<A3DSurface>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DTransformation;
public class VectorCodecA3DTransformationLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DTransformationLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DTransformation,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3DTransformation> = new Vector.<A3DTransformation>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3DTransformation(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3DTransformation> = Vector.<A3DTransformation>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DTransformation;
public class VectorCodecA3DTransformationLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DTransformationLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DTransformation,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3DTransformation> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3DTransformation>> = new Vector.<Vector.<A3DTransformation>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3DTransformation>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3DTransformation(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3DTransformation> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3DTransformation>> = Vector.<Vector.<A3DTransformation>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version1.a3d.objects
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version1.a3d.objects.A3DTransformation;
public class VectorCodecA3DTransformationLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3DTransformationLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3DTransformation,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3DTransformation>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3DTransformation> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3DTransformation>>> = new Vector.<Vector.<Vector.<A3DTransformation>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3DTransformation>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3DTransformation>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3DTransformation(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3DTransformation>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3DTransformation> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3DTransformation>>> = Vector.<Vector.<Vector.<A3DTransformation>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,174 +0,0 @@
package _codec.versions.version2.a3d
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.A3D2;
import versions.version2.a3d.animation.A3D2AnimationClip;
import versions.version2.a3d.animation.A3D2Track;
import versions.version2.a3d.geometry.A3D2IndexBuffer;
import versions.version2.a3d.geometry.A3D2VertexBuffer;
import versions.version2.a3d.materials.A3D2CubeMap;
import versions.version2.a3d.materials.A3D2Image;
import versions.version2.a3d.materials.A3D2Map;
import versions.version2.a3d.materials.A3D2Material;
import versions.version2.a3d.objects.A3D2AmbientLight;
import versions.version2.a3d.objects.A3D2Box;
import versions.version2.a3d.objects.A3D2Decal;
import versions.version2.a3d.objects.A3D2DirectionalLight;
import versions.version2.a3d.objects.A3D2Joint;
import versions.version2.a3d.objects.A3D2Mesh;
import versions.version2.a3d.objects.A3D2Object;
import versions.version2.a3d.objects.A3D2OmniLight;
import versions.version2.a3d.objects.A3D2Skin;
import versions.version2.a3d.objects.A3D2SpotLight;
import versions.version2.a3d.objects.A3D2Sprite;
public class CodecA3D2 implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_8X:ICodec;
private var name_Fa:ICodec;
private var name_Aj:ICodec;
private var name_EA:ICodec;
private var name_lJ:ICodec;
private var name_9f:ICodec;
private var name_GC:ICodec;
private var name_Sd:ICodec;
private var name_76:ICodec;
private var name_3f:ICodec;
private var name_dB:ICodec;
private var name_77:ICodec;
private var name_PJ:ICodec;
private var name_1x:ICodec;
private var name_aP:ICodec;
private var name_e9:ICodec;
private var name_3y:ICodec;
private var name_E2:ICodec;
private var name_U9:ICodec;
public function CodecA3D2()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_8X = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2AmbientLight,false),true,1));
this.name_Fa = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2AnimationClip,false),true,1));
this.name_Aj = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Track,false),true,1));
this.name_EA = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Box,false),true,1));
this.name_lJ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2CubeMap,false),true,1));
this.name_9f = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Decal,false),true,1));
this.name_GC = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2DirectionalLight,false),true,1));
this.name_Sd = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Image,false),true,1));
this.name_76 = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2IndexBuffer,false),true,1));
this.name_3f = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Joint,false),true,1));
this.name_dB = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Map,false),true,1));
this.name_77 = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Material,false),true,1));
this.name_PJ = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Mesh,false),true,1));
this.name_1x = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Object,false),true,1));
this.name_aP = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2OmniLight,false),true,1));
this.name_e9 = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Skin,false),true,1));
this.name_3y = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2SpotLight,false),true,1));
this.name_E2 = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Sprite,false),true,1));
this.name_U9 = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2VertexBuffer,false),true,1));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_ambientLights:Vector.<A3D2AmbientLight> = this.name_8X.decode(protocolBuffer) as Vector.<A3D2AmbientLight>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","ambientLights",value_ambientLights);
var value_animationClips:Vector.<A3D2AnimationClip> = this.name_Fa.decode(protocolBuffer) as Vector.<A3D2AnimationClip>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","animationClips",value_animationClips);
var value_animationTracks:Vector.<A3D2Track> = this.name_Aj.decode(protocolBuffer) as Vector.<A3D2Track>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","animationTracks",value_animationTracks);
var value_boxes:Vector.<A3D2Box> = this.name_EA.decode(protocolBuffer) as Vector.<A3D2Box>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","boxes",value_boxes);
var value_cubeMaps:Vector.<A3D2CubeMap> = this.name_lJ.decode(protocolBuffer) as Vector.<A3D2CubeMap>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","cubeMaps",value_cubeMaps);
var value_decals:Vector.<A3D2Decal> = this.name_9f.decode(protocolBuffer) as Vector.<A3D2Decal>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","decals",value_decals);
var value_directionalLights:Vector.<A3D2DirectionalLight> = this.name_GC.decode(protocolBuffer) as Vector.<A3D2DirectionalLight>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","directionalLights",value_directionalLights);
var value_images:Vector.<A3D2Image> = this.name_Sd.decode(protocolBuffer) as Vector.<A3D2Image>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","images",value_images);
var value_indexBuffers:Vector.<A3D2IndexBuffer> = this.name_76.decode(protocolBuffer) as Vector.<A3D2IndexBuffer>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","indexBuffers",value_indexBuffers);
var value_joints:Vector.<A3D2Joint> = this.name_3f.decode(protocolBuffer) as Vector.<A3D2Joint>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","joints",value_joints);
var value_maps:Vector.<A3D2Map> = this.name_dB.decode(protocolBuffer) as Vector.<A3D2Map>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","maps",value_maps);
var value_materials:Vector.<A3D2Material> = this.name_77.decode(protocolBuffer) as Vector.<A3D2Material>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","materials",value_materials);
var value_meshes:Vector.<A3D2Mesh> = this.name_PJ.decode(protocolBuffer) as Vector.<A3D2Mesh>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","meshes",value_meshes);
var value_objects:Vector.<A3D2Object> = this.name_1x.decode(protocolBuffer) as Vector.<A3D2Object>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","objects",value_objects);
var value_omniLights:Vector.<A3D2OmniLight> = this.name_aP.decode(protocolBuffer) as Vector.<A3D2OmniLight>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","omniLights",value_omniLights);
var value_skins:Vector.<A3D2Skin> = this.name_e9.decode(protocolBuffer) as Vector.<A3D2Skin>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","skins",value_skins);
var value_spotLights:Vector.<A3D2SpotLight> = this.name_3y.decode(protocolBuffer) as Vector.<A3D2SpotLight>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","spotLights",value_spotLights);
var value_sprites:Vector.<A3D2Sprite> = this.name_E2.decode(protocolBuffer) as Vector.<A3D2Sprite>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","sprites",value_sprites);
var value_vertexBuffers:Vector.<A3D2VertexBuffer> = this.name_U9.decode(protocolBuffer) as Vector.<A3D2VertexBuffer>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.A3D2","vertexBuffers",value_vertexBuffers);
return new A3D2(value_ambientLights,value_animationClips,value_animationTracks,value_boxes,value_cubeMaps,value_decals,value_directionalLights,value_images,value_indexBuffers,value_joints,value_maps,value_materials,value_meshes,value_objects,value_omniLights,value_skins,value_spotLights,value_sprites,value_vertexBuffers);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3D2 = A3D2(object);
this.name_8X.encode(protocolBuffer,struct.ambientLights);
this.name_Fa.encode(protocolBuffer,struct.animationClips);
this.name_Aj.encode(protocolBuffer,struct.animationTracks);
this.name_EA.encode(protocolBuffer,struct.boxes);
this.name_lJ.encode(protocolBuffer,struct.cubeMaps);
this.name_9f.encode(protocolBuffer,struct.decals);
this.name_GC.encode(protocolBuffer,struct.directionalLights);
this.name_Sd.encode(protocolBuffer,struct.images);
this.name_76.encode(protocolBuffer,struct.indexBuffers);
this.name_3f.encode(protocolBuffer,struct.joints);
this.name_dB.encode(protocolBuffer,struct.maps);
this.name_77.encode(protocolBuffer,struct.materials);
this.name_PJ.encode(protocolBuffer,struct.meshes);
this.name_1x.encode(protocolBuffer,struct.objects);
this.name_aP.encode(protocolBuffer,struct.omniLights);
this.name_e9.encode(protocolBuffer,struct.skins);
this.name_3y.encode(protocolBuffer,struct.spotLights);
this.name_E2.encode(protocolBuffer,struct.sprites);
this.name_U9.encode(protocolBuffer,struct.vertexBuffers);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version2.a3d
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.A3D2;
public class VectorCodecA3D2Level1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2Level1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3D2> = new Vector.<A3D2>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3D2(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3D2> = Vector.<A3D2>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version2.a3d
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.A3D2;
public class VectorCodecA3D2Level2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2Level2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3D2> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3D2>> = new Vector.<Vector.<A3D2>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3D2>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3D2(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3D2> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3D2>> = Vector.<Vector.<A3D2>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version2.a3d
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.A3D2;
public class VectorCodecA3D2Level3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2Level3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3D2>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3D2> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3D2>>> = new Vector.<Vector.<Vector.<A3D2>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3D2>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3D2>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3D2(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3D2>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3D2> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3D2>>> = Vector.<Vector.<Vector.<A3D2>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,72 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Long;
import versions.version2.a3d.animation.A3D2AnimationClip;
public class CodecA3D2AnimationClip implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_2o:ICodec;
private var name_HX:ICodec;
private var name_XW:ICodec;
private var name_Td:ICodec;
private var name_Z:ICodec;
public function CodecA3D2AnimationClip()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_2o = protocol.getCodec(new TypeCodecInfo(int,false));
this.name_HX = protocol.getCodec(new TypeCodecInfo(Boolean,false));
this.name_XW = protocol.getCodec(new TypeCodecInfo(String,true));
this.name_Td = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(Long,false),true,1));
this.name_Z = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(int,false),false,1));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_id:int = int(this.name_2o.decode(protocolBuffer) as int);
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2AnimationClip","id",value_id);
var value_loop:Boolean = Boolean(this.name_HX.decode(protocolBuffer) as Boolean);
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2AnimationClip","loop",value_loop);
var value_name:String = this.name_XW.decode(protocolBuffer) as String;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2AnimationClip","name",value_name);
var value_objectIDs:Vector.<Long> = this.name_Td.decode(protocolBuffer) as Vector.<Long>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2AnimationClip","objectIDs",value_objectIDs);
var value_tracks:Vector.<int> = this.name_Z.decode(protocolBuffer) as Vector.<int>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2AnimationClip","tracks",value_tracks);
return new A3D2AnimationClip(value_id,value_loop,value_name,value_objectIDs,value_tracks);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3D2AnimationClip = A3D2AnimationClip(object);
this.name_2o.encode(protocolBuffer,struct.id);
this.name_HX.encode(protocolBuffer,struct.loop);
this.name_XW.encode(protocolBuffer,struct.name);
this.name_Td.encode(protocolBuffer,struct.objectIDs);
this.name_Z.encode(protocolBuffer,struct.tracks);
}
}
}

View File

@@ -1,54 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.TypeCodecInfo;
import alternativa.types.Float;
import versions.version2.a3d.animation.A3D2Keyframe;
import versions.version2.a3d.objects.A3D2Transform;
public class CodecA3D2Keyframe implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_dk:ICodec;
private var name_S2:ICodec;
public function CodecA3D2Keyframe()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_dk = protocol.getCodec(new TypeCodecInfo(Float,false));
this.name_S2 = protocol.getCodec(new TypeCodecInfo(A3D2Transform,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_time:Number = Number(this.name_dk.decode(protocolBuffer) as Number);
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2Keyframe","time",value_time);
var value_transform:A3D2Transform = this.name_S2.decode(protocolBuffer) as A3D2Transform;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2Keyframe","transform",value_transform);
return new A3D2Keyframe(value_time,value_transform);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3D2Keyframe = A3D2Keyframe(object);
this.name_dk.encode(protocolBuffer,struct.time);
this.name_S2.encode(protocolBuffer,struct.transform);
}
}
}

View File

@@ -1,60 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.osgi.OSGi;
import alternativa.osgi.service.clientlog.IClientLog;
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.info.CollectionCodecInfo;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.animation.A3D2Keyframe;
import versions.version2.a3d.animation.A3D2Track;
public class CodecA3D2Track implements ICodec
{
public static var log:IClientLog = IClientLog(OSGi.getInstance().getService(IClientLog));
private var name_2o:ICodec;
private var name_Ja:ICodec;
private var name_Fo:ICodec;
public function CodecA3D2Track()
{
super();
}
public function init(protocol:IProtocol) : void
{
this.name_2o = protocol.getCodec(new TypeCodecInfo(int,false));
this.name_Ja = protocol.getCodec(new CollectionCodecInfo(new TypeCodecInfo(A3D2Keyframe,false),false,1));
this.name_Fo = protocol.getCodec(new TypeCodecInfo(String,false));
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
log = IClientLog(OSGi.getInstance().getService(IClientLog));
var value_id:int = int(this.name_2o.decode(protocolBuffer) as int);
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2Track","id",value_id);
var value_keyframes:Vector.<A3D2Keyframe> = this.name_Ja.decode(protocolBuffer) as Vector.<A3D2Keyframe>;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2Track","keyframes",value_keyframes);
var value_objectName:String = this.name_Fo.decode(protocolBuffer) as String;
log.log("codec","struct %1 field %2 value %3","versions.version2.a3d.animation.A3D2Track","objectName",value_objectName);
return new A3D2Track(value_id,value_keyframes,value_objectName);
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var struct:A3D2Track = A3D2Track(object);
this.name_2o.encode(protocolBuffer,struct.id);
this.name_Ja.encode(protocolBuffer,struct.keyframes);
this.name_Fo.encode(protocolBuffer,struct.objectName);
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.animation.A3D2AnimationClip;
public class VectorCodecA3D2AnimationClipLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2AnimationClipLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2AnimationClip,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3D2AnimationClip> = new Vector.<A3D2AnimationClip>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3D2AnimationClip(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3D2AnimationClip> = Vector.<A3D2AnimationClip>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.animation.A3D2AnimationClip;
public class VectorCodecA3D2AnimationClipLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2AnimationClipLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2AnimationClip,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3D2AnimationClip> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3D2AnimationClip>> = new Vector.<Vector.<A3D2AnimationClip>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3D2AnimationClip>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3D2AnimationClip(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3D2AnimationClip> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3D2AnimationClip>> = Vector.<Vector.<A3D2AnimationClip>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,119 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.animation.A3D2AnimationClip;
public class VectorCodecA3D2AnimationClipLevel3 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2AnimationClipLevel3(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2AnimationClip,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<Vector.<A3D2AnimationClip>> = null;
var i2:int = 0;
var length3:int = 0;
var items3:Vector.<A3D2AnimationClip> = null;
var i3:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<Vector.<A3D2AnimationClip>>> = new Vector.<Vector.<Vector.<A3D2AnimationClip>>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<Vector.<A3D2AnimationClip>>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; )
{
if(!protocolBuffer.optionalMap.get())
{
length3 = LengthCodecHelper.decodeLength(protocolBuffer);
items3 = new Vector.<A3D2AnimationClip>(length3,true);
items2[i2] = items3;
for(i3 = 0; i3 < length3; i3++)
{
items3[i3] = A3D2AnimationClip(this.elementCodec.decode(protocolBuffer));
}
}
i2++;
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<Vector.<A3D2AnimationClip>> = null;
var length2:int = 0;
var i2:int = 0;
var items3:Vector.<A3D2AnimationClip> = null;
var length3:int = 0;
var i3:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<Vector.<A3D2AnimationClip>>> = Vector.<Vector.<Vector.<A3D2AnimationClip>>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
items3 = items2[i1];
if(items3 != null)
{
protocolBuffer.optionalMap.addBit(false);
length3 = int(items3.length);
LengthCodecHelper.encodeLength(protocolBuffer,length3);
for(i3 = 0; i3 < length3; i3++)
{
this.elementCodec.encode(protocolBuffer,items3[i3]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.animation.A3D2Keyframe;
public class VectorCodecA3D2KeyframeLevel1 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2KeyframeLevel1(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2Keyframe,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<A3D2Keyframe> = new Vector.<A3D2Keyframe>(length,true);
for(var i:int = 0; i < length; i++)
{
result[i] = A3D2Keyframe(this.elementCodec.decode(protocolBuffer));
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<A3D2Keyframe> = Vector.<A3D2Keyframe>(object);
var length:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length);
for(var i:int = 0; i < length; i++)
{
this.elementCodec.encode(protocolBuffer,data[i]);
}
}
}
}

View File

@@ -1,89 +0,0 @@
package _codec.versions.version2.a3d.animation
{
import alternativa.protocol.ICodec;
import alternativa.protocol.IProtocol;
import alternativa.protocol.ProtocolBuffer;
import alternativa.protocol.codec.OptionalCodecDecorator;
import alternativa.protocol.impl.LengthCodecHelper;
import alternativa.protocol.info.TypeCodecInfo;
import versions.version2.a3d.animation.A3D2Keyframe;
public class VectorCodecA3D2KeyframeLevel2 implements ICodec
{
private var elementCodec:ICodec;
private var optionalElement:Boolean;
public function VectorCodecA3D2KeyframeLevel2(optionalElement:Boolean)
{
super();
this.optionalElement = optionalElement;
}
public function init(protocol:IProtocol) : void
{
this.elementCodec = protocol.getCodec(new TypeCodecInfo(A3D2Keyframe,false));
if(this.optionalElement)
{
this.elementCodec = new OptionalCodecDecorator(this.elementCodec);
}
}
public function decode(protocolBuffer:ProtocolBuffer) : Object
{
var length2:int = 0;
var items2:Vector.<A3D2Keyframe> = null;
var i2:int = 0;
var length1:int = LengthCodecHelper.decodeLength(protocolBuffer);
var result:Vector.<Vector.<A3D2Keyframe>> = new Vector.<Vector.<A3D2Keyframe>>(length1,true);
for(var i1:int = 0; i1 < length1; )
{
if(!protocolBuffer.optionalMap.get())
{
length2 = LengthCodecHelper.decodeLength(protocolBuffer);
items2 = new Vector.<A3D2Keyframe>(length2,true);
result[i1] = items2;
for(i2 = 0; i2 < length2; i2++)
{
items2[i2] = A3D2Keyframe(this.elementCodec.decode(protocolBuffer));
}
}
i1++;
}
return result;
}
public function encode(protocolBuffer:ProtocolBuffer, object:Object) : void
{
var items2:Vector.<A3D2Keyframe> = null;
var length2:int = 0;
var i2:int = 0;
if(object == null)
{
throw new Error("Object is null. Use @ProtocolOptional annotation.");
}
var data:Vector.<Vector.<A3D2Keyframe>> = Vector.<Vector.<A3D2Keyframe>>(object);
var length1:int = int(data.length);
LengthCodecHelper.encodeLength(protocolBuffer,length1);
for(var i1:int = 0; i1 < length1; i1++)
{
items2 = data[i1];
if(items2 != null)
{
protocolBuffer.optionalMap.addBit(false);
length2 = int(items2.length);
LengthCodecHelper.encodeLength(protocolBuffer,length2);
for(i2 = 0; i2 < length2; i2++)
{
this.elementCodec.encode(protocolBuffer,items2[i2]);
}
}
else
{
protocolBuffer.optionalMap.addBit(true);
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More