001: package org.cougaar.qos.ResourceStatus;
002:
003: /**
004: * org/cougaar/qos/ResourceStatus/DataValueHelper.java .
005: * Generated by the IDL-to-Java compiler (portable), version "3.2"
006: * from qrs.idl
007: * Tuesday, August 7, 2007 11:57:30 AM EDT
008: */
009:
010: abstract public class DataValueHelper {
011: private static String _id = "IDL:org/cougaar/qos/ResourceStatus/DataValue/DataValue:1.0";
012:
013: public static void insert(org.omg.CORBA.Any a,
014: org.cougaar.qos.ResourceStatus.DataValue that) {
015: org.omg.CORBA.portable.OutputStream out = a
016: .create_output_stream();
017: a.type(type());
018: write(out, that);
019: a.read_value(out.create_input_stream(), type());
020: }
021:
022: public static org.cougaar.qos.ResourceStatus.DataValue extract(
023: org.omg.CORBA.Any a) {
024: return read(a.create_input_stream());
025: }
026:
027: private static org.omg.CORBA.TypeCode __typeCode = null;
028: private static boolean __active = false;
029:
030: synchronized public static org.omg.CORBA.TypeCode type() {
031: if (__typeCode == null) {
032: synchronized (org.omg.CORBA.TypeCode.class) {
033: if (__typeCode == null) {
034: if (__active) {
035: return org.omg.CORBA.ORB.init()
036: .create_recursive_tc(_id);
037: }
038: __active = true;
039: org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[6];
040: org.omg.CORBA.TypeCode _tcOf_members0 = null;
041: _tcOf_members0 = org.omg.CORBA.ORB.init()
042: .get_primitive_tc(
043: org.omg.CORBA.TCKind.tk_longlong);
044: _members0[0] = new org.omg.CORBA.StructMember(
045: "timestamp", _tcOf_members0, null);
046: _tcOf_members0 = org.omg.CORBA.ORB.init()
047: .get_primitive_tc(
048: org.omg.CORBA.TCKind.tk_longlong);
049: _members0[1] = new org.omg.CORBA.StructMember(
050: "halflife", _tcOf_members0, null);
051: _tcOf_members0 = org.omg.CORBA.ORB.init()
052: .get_primitive_tc(
053: org.omg.CORBA.TCKind.tk_double);
054: _members0[2] = new org.omg.CORBA.StructMember(
055: "credibility", _tcOf_members0, null);
056: _tcOf_members0 = org.omg.CORBA.ORB.init()
057: .create_string_tc(0);
058: _members0[3] = new org.omg.CORBA.StructMember(
059: "units", _tcOf_members0, null);
060: _tcOf_members0 = org.omg.CORBA.ORB.init()
061: .create_string_tc(0);
062: _members0[4] = new org.omg.CORBA.StructMember(
063: "provenance", _tcOf_members0, null);
064: _tcOf_members0 = org.cougaar.qos.ResourceStatus.data_valueHelper
065: .type();
066: _members0[5] = new org.omg.CORBA.StructMember(
067: "value", _tcOf_members0, null);
068: __typeCode = org.omg.CORBA.ORB
069: .init()
070: .create_struct_tc(
071: org.cougaar.qos.ResourceStatus.DataValueHelper
072: .id(), "DataValue",
073: _members0);
074: __active = false;
075: }
076: }
077: }
078: return __typeCode;
079: }
080:
081: public static String id() {
082: return _id;
083: }
084:
085: public static org.cougaar.qos.ResourceStatus.DataValue read(
086: org.omg.CORBA.portable.InputStream istream) {
087: org.cougaar.qos.ResourceStatus.DataValue value = new org.cougaar.qos.ResourceStatus.DataValue();
088: value.timestamp = istream.read_longlong();
089: value.halflife = istream.read_longlong();
090: value.credibility = istream.read_double();
091: value.units = istream.read_string();
092: value.provenance = istream.read_string();
093: value.value = org.cougaar.qos.ResourceStatus.data_valueHelper
094: .read(istream);
095: return value;
096: }
097:
098: public static void write(
099: org.omg.CORBA.portable.OutputStream ostream,
100: org.cougaar.qos.ResourceStatus.DataValue value) {
101: ostream.write_longlong(value.timestamp);
102: ostream.write_longlong(value.halflife);
103: ostream.write_double(value.credibility);
104: ostream.write_string(value.units);
105: ostream.write_string(value.provenance);
106: org.cougaar.qos.ResourceStatus.data_valueHelper.write(ostream,
107: value.value);
108: }
109:
110: }
|