certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] jcerti/src/hla/rti1516e/jlc HLAASCIIchar.java H...


From: CERTI CVS commits
Subject: [certi-cvs] jcerti/src/hla/rti1516e/jlc HLAASCIIchar.java H...
Date: Wed, 14 Dec 2011 00:02:36 +0000

CVSROOT:        /sources/certi
Module name:    jcerti
Changes by:     Eric NOULARD <erk>      11/12/14 00:02:36

Added files:
        src/hla/rti1516e/jlc: HLAASCIIchar.java HLAunicodeChar.java 

Log message:
        Two more HLA standardized data type

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/jcerti/src/hla/rti1516e/jlc/HLAASCIIchar.java?cvsroot=certi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/jcerti/src/hla/rti1516e/jlc/HLAunicodeChar.java?cvsroot=certi&rev=1.1

Patches:
Index: HLAASCIIchar.java
===================================================================
RCS file: HLAASCIIchar.java
diff -N HLAASCIIchar.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ HLAASCIIchar.java   14 Dec 2011 00:02:36 -0000      1.1
@@ -0,0 +1,74 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2011 Eric Noulard
+//
+// This program is free software ; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation ; either version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY ; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program ; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// ----------------------------------------------------------------------------
+package hla.rti1516e.jlc;
+
+import hla.rti1516e.encoding.ByteWrapper;
+import hla.rti1516e.encoding.DecoderException;
+import hla.rti1516e.encoding.EncoderException;
+
+public class HLAASCIIchar extends DataElementBase implements
+        hla.rti1516e.encoding.HLAASCIIchar {
+    
+    private BasicHLAoctet value;
+    
+    public HLAASCIIchar() {
+        value = new BasicHLAoctet();
+    }
+    
+    public HLAASCIIchar(byte value) {
+        this.value = new BasicHLAoctet(value);
+    }
+    
+    @Override
+    public int getOctetBoundary() {
+        return value.getOctetBoundary();
+    }
+
+    @Override
+    public void encode(ByteWrapper byteWrapper) throws EncoderException {
+        value.encode(byteWrapper);
+    }
+
+    @Override
+    public int getEncodedLength() {
+        return value.getEncodedLength();
+    }
+
+    @Override
+    public void decode(ByteWrapper byteWrapper) throws DecoderException {
+        value.decode(byteWrapper);
+    }
+
+    @Override
+    public void decode(byte[] bytes) throws DecoderException {
+        value.decode(bytes);
+    }
+
+    @Override
+    public byte getValue() {
+        return value.getValue();
+    }
+
+    @Override
+    public void setValue(byte value) {
+        this.value.setValue(value);
+    }
+
+}

Index: HLAunicodeChar.java
===================================================================
RCS file: HLAunicodeChar.java
diff -N HLAunicodeChar.java
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ HLAunicodeChar.java 14 Dec 2011 00:02:36 -0000      1.1
@@ -0,0 +1,70 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2011 Eric Noulard
+//
+// This program is free software ; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation ; either version 2 of
+// the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY ; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program ; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// ----------------------------------------------------------------------------
+package hla.rti1516e.jlc;
+
+import hla.rti1516e.encoding.ByteWrapper;
+import hla.rti1516e.encoding.DecoderException;
+import hla.rti1516e.encoding.EncoderException;
+
+public class HLAunicodeChar extends DataElementBase implements
+        hla.rti1516e.encoding.HLAunicodeChar {
+
+    private BasicHLAoctetPairBE value;
+    
+    public HLAunicodeChar() {
+        value = new BasicHLAoctetPairBE();
+    }
+    
+    @Override
+    public int getOctetBoundary() {
+        return value.getOctetBoundary();
+    }
+
+    @Override
+    public void encode(ByteWrapper byteWrapper) throws EncoderException {
+        value.encode(byteWrapper);
+    }
+
+    @Override
+    public int getEncodedLength() {
+        return value.getEncodedLength();
+    }
+
+    @Override
+    public void decode(ByteWrapper byteWrapper) throws DecoderException {
+        value.decode(byteWrapper);
+    }
+
+    @Override
+    public void decode(byte[] bytes) throws DecoderException {
+        value.decode(bytes);
+    }
+
+    @Override
+    public short getValue() {
+        return value.getValue();
+    }
+
+    @Override
+    public void setValue(short value) {
+        this.value.setValue(value);
+    }
+
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]