/[classpath]/classpath/gnu/CORBA/DynAn/gnuDynFixed.java
ViewVC logotype

Diff of /classpath/gnu/CORBA/DynAn/gnuDynFixed.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.1 by gnu_andrew, Tue Aug 16 16:22:36 2005 UTC revision 1.1.2.2 by gnu_andrew, Sat Sep 10 15:31:35 2005 UTC
# Line 43  import org.omg.CORBA.BAD_OPERATION; Line 43  import org.omg.CORBA.BAD_OPERATION;
43  import org.omg.CORBA.BAD_PARAM;  import org.omg.CORBA.BAD_PARAM;
44  import org.omg.CORBA.ORB;  import org.omg.CORBA.ORB;
45  import org.omg.CORBA.TypeCode;  import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.TypeCodePackage.*;  
46  import org.omg.DynamicAny.DynAny;  import org.omg.DynamicAny.DynAny;
47  import org.omg.DynamicAny.DynAnyPackage.InvalidValue;  import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
48  import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;  import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
# Line 58  import java.math.BigDecimal; Line 57  import java.math.BigDecimal;
57   *   *
58   * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)   * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
59   */   */
60  public class gnuDynFixed  public class gnuDynFixed extends anyUndivideable implements DynFixed
   extends anyUndivideable  
   implements DynFixed  
61  {  {
62    /**    /**
63     * Use serialVersionUID for interoperability.     * Use serialVersionUID for interoperability.
# Line 90  public class gnuDynFixed Line 87  public class gnuDynFixed
87    /**    /**
88     * Create a new instance of the dyn fixed.     * Create a new instance of the dyn fixed.
89     */     */
90    public gnuDynFixed(TypeCode oType, TypeCode aType, gnuDynAnyFactory aFactory,    public gnuDynFixed(TypeCode oType, TypeCode aType,
91                       ORB anOrb      gnuDynAnyFactory aFactory, ORB anOrb
92                      )    )
93    {    {
94      super(oType, aType, aFactory, anOrb);      super(oType, aType, aFactory, anOrb);
95      try      try
# Line 130  public class gnuDynFixed Line 127  public class gnuDynFixed
127     * Set the value.     * Set the value.
128     */     */
129    public boolean set_value(String fixed_value)    public boolean set_value(String fixed_value)
130                      throws TypeMismatch, InvalidValue      throws TypeMismatch, InvalidValue
131    {    {
132      // Count the digits till decimal point.      // Count the digits till decimal point.
133      int digs = 0;      int digs = 0;
# Line 152  public class gnuDynFixed Line 149  public class gnuDynFixed
149        }        }
150      if (digs > (digits - scale))      if (digs > (digits - scale))
151        throw new InvalidValue("Too many digits: " + digs + " for " + digits +        throw new InvalidValue("Too many digits: " + digs + " for " + digits +
152                               "." + scale          "." + scale
153                              );        );
154    
155      try      try
156        {        {
# Line 177  public class gnuDynFixed Line 174  public class gnuDynFixed
174    /**    /**
175     * Assign the value from another BigDecimal.     * Assign the value from another BigDecimal.
176     */     */
177    public void assign(DynAny from)    public void assign(DynAny from) throws TypeMismatch
               throws TypeMismatch  
178    {    {
179      checkType(official_type, from.type());      checkType(official_type, from.type());
180    
# Line 227  public class gnuDynFixed Line 223  public class gnuDynFixed
223     * Set the value from Any (must hold <code>fixed</code> with the matching     * Set the value from Any (must hold <code>fixed</code> with the matching
224     * typecode.).     * typecode.).
225     */     */
226    public void from_any(Any an_any)    public void from_any(Any an_any) throws TypeMismatch, InvalidValue
                 throws TypeMismatch, InvalidValue  
227    {    {
228      try      try
229        {        {

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26