KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > trading > db > pse > offers > DynPropValue


1
2 // Copyright (C) 1998-1999
3
// Object Oriented Concepts, Inc.
4

5 // **********************************************************************
6
//
7
// Copyright (c) 1997
8
// Mark Spruiell (mark@intellisoft.com)
9
//
10
// See the COPYING file for more information
11
//
12
// **********************************************************************
13

14 package org.jacorb.trading.db.pse.offers;
15
16
17 import org.omg.CORBA.*;
18 import org.omg.CosTradingDynamic.*;
19 import jtport.ORBLayer;
20
21
22 public class DynPropValue
23 {
24   private String JavaDoc m_evalInterface;
25   private TypeCodeValue m_returnedType;
26   private AnyValue m_extraInfo;
27
28
29   private DynPropValue()
30   {
31   }
32
33
34   public DynPropValue(Any any)
35   {
36     setValue(any);
37   }
38
39
40   public Any getValue()
41   {
42     ORB orb = ORBLayer.instance().getORB();
43     Any result = orb.create_any();
44
45     DynamicProp p = new DynamicProp();
46     org.omg.CORBA.Object JavaDoc obj = orb.string_to_object(m_evalInterface);
47     p.eval_if = DynamicPropEvalHelper.narrow(obj);
48     p.returned_type = m_returnedType.getValue();
49     p.extra_info = m_extraInfo.getValue();
50     DynamicPropHelper.insert(result, p);
51
52     return result;
53   }
54
55
56   protected void setValue(Any val)
57   {
58     DynamicProp p = DynamicPropHelper.extract(val);
59     m_evalInterface = ORBLayer.instance().getORB().object_to_string(p.eval_if);
60     m_returnedType = new TypeCodeValue(p.returned_type);
61     m_extraInfo = new AnyValue(p.extra_info);
62   }
63 }
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Popular Tags