// Tags: not-a-test
// Uses: InfoHelper

/*
* This file is part of the CORBA 2_3 tests, the test executable
* class being gnu.testlet.org.omg.CORBA_2_3.ORB.ValueTypeTest.
* Due large number of the required classes, they are moved into
* a separate package, Valuetype.
*
* @author Audrius Meskauskas (AudriusA@bluewin.ch)
*/

package gnu.testlet.org.omg.CORBA_2_3.ORB.Valtype;

import org.omg.CORBA.portable.StreamableValue;

/**
 * This value type object has the default methods for reading
 * and writing. These methods are normally generated by the
 * IDL compiler.
 *
 * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
 */
public abstract class Info
  implements StreamableValue
{
  public String _name;
  public String _message;
  private static String[] _truncatable_ids = { InfoHelper.id() };

  public String[] _truncatable_ids()
  {
    return _truncatable_ids;
  }

  public abstract String _toString();

  public void _read(org.omg.CORBA.portable.InputStream istream)
  {
    this._name = istream.read_string();
    this._message = istream.read_string();
  }

  public void _write(org.omg.CORBA.portable.OutputStream ostream)
  {
    ostream.write_string(this._name);
    ostream.write_string(this._message);
  }

  public org.omg.CORBA.TypeCode _type()
  {
    return InfoHelper.type();
  }

  public String toString()
  {
    return _toString();
  }

}
