1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
3 <body text=
"#000000" bgcolor=
"#FFFFFF">
6 <title>Object-by-Value status
</title>
12 <h1><a name=
"orb"></a>Objects-by-Value
</h1>
13 Points of contact:
<a href=
"mailto: parsons@cs.wustl.edu">Jeff Parsons
</a>
14 <a href=
"mailto: bosk@ipmce.ru">Boris Kolpackov
</a>
15 <a href=
"mailto:g.edwards@vanderbilt.edu">George Edwards
</a>
17 <p>Last Update:
2004/
08/
24 </p>
20 <p>Objects-by-Value (OBV) describes the new type,
<CODE>valuetype
</CODE>, introduced in CORBA
2.3
22 <a href=
"http://www.omg.org/cgi-bin/apps/doc?formal/02-12-06.pdf">formal/
02-
12-
06.pdf
</a>; Mapping to C++:
23 <a href=
"http://www.omg.org/cgi-bin/apps/doc?formal/03-06-03.pdf">formal/
03-
06-
03.pdf
</a>).
24 <p>The original TAO implementation was contributed by
25 <a href=
"mailto: kuepper2@uni-wuppertal.de">Torsten Kuepper
</a>, and has subsequently been enhanced and corrected by
<a href=
"mailto: parsons@cs.wustl.edu">Jeff Parsons
</a> and
<a href=
"mailto:g.edwards@vanderbilt.edu">George Edwards
</a>.
26 <p><CODE>Valuetype
</CODE>s are similar to IDL
<CODE>struct
</CODE>s extended with
29 <li><p>Encapsulate both state information and operations in an implementation that is guaranteed to be local.
</p>
32 <li><p>Can be declared
<CODE>abstract
</CODE>, in which case no state members are defined.
</p>
34 <li><p>Can inherit from a single concrete
<CODE>valuetype
</CODE> and multiple
<CODE>abstract valuetype
</CODE>s.
</p></li>
35 <li><p>Can support a single concrete
<CODE>interface
</CODE>, allowing them to be manipulated as either a valuetype or an object reference.
</p></li>
36 <li><p>Can support multiple
<CODE>abstract interface
</CODE>s, allowing them to be substituted for those interfaces in operation invocations.
</p></li>
37 <li><p>Can hold references to other
<CODE>valuetype
</CODE>s, with the
38 possibility of NULL references or shared (aliased) references.
</p>
42 <p>Valuetypes have the following uses:
44 <li><p>Implement abstract datatypes (ADTs) that can be copied to another process.
</p></li>
45 <li><p>Represent
<CODE>eventtype
</CODE>s in the Event Service.
</p></li>
46 <li><p>Ensure operations are executed locally for increased performance.
</p></li>
48 <a name=
"current"><h3>Current status:
</h3></a>
51 <li><p>The IDL compiler understands
<CODE>valuetype
</CODE>.
52 Relevant option of TAO's IDL compiler is:
<P>
54 <LI>-Wb,obv_opt_accessor Make accessor and modifier functions inline.
55 Overriding them is not allowed in this mode.
</LI>
59 <li><p><CODE>Valuetype
</CODE>s can be used as arguments in CORBA invocations.
60 There is an example in
61 <A HREF=
"../../examples/OBV/Typed_Events">$TAO_ROOT/TAO/examples/OBV/Typed_Events
</A>.
62 <CODE>Valuetype
</CODE>s can reference other
63 <CODE>valuetype
</CODE> objects (but without sharing).
67 <p>Support for valuetypes as members of IDL aggregate types has been
71 <p>Support for inheritance from a concrete interface (
<CODE>supports
</CODE>) has been added. There is an example in
<A HREF=
"../../tests/OBV/Supports">$TAO_ROOT/TAO/tests/OBV/Supports
</A>.
</p>
74 <p>Support for inheritance from abstract interfaces has been added. There is an example in
<A HREF=
"../../tests/Abstract_Interface">$TAO_ROOT/TAO/tests/Abstract_Interface
</A>.
</p>
76 <p>Support for forward declared valuetypes defined in another compilation
77 unit has been added. See
<A HREF=
"../../examples/OBV/Typed_Events">$TAO_ROOT/TAO/examples/OBV/Typed_Events
</A>.
</p>
80 <p>Support for recursively-defined valuetypes has been added. See
<A HREF=
"../../tests/OBV/Supports">$TAO_ROOT/TAO/tests/OBV/Supports
</A>.
</p>
83 <p>Support for user-declared factories has been added. See
<A HREF=
"../../tests/OBV/Factory">$TAO_ROOT/TAO/tests/OBV/Factory
</A>.
</p>
87 <a name=
"issues"><h3>Known issues:
</h3></a>
90 <li><p><CODE>Valuetype
</CODE>s work only in conjunction with
91 compiled marshaling (
<CODE>-Gc
</CODE>, currently default for
92 <CODE>tao_idl
</CODE>).
96 <li><p>No support for sharing (aliasing).
100 <li><p>No support for
<CODE>valuebox
</CODE>es
105 No support for
<CODE>valuetype
</CODE>s with cyclic references.
</p></li>
107 <li><p>No support for fragmentation (chunking) of the marshalled
108 <CODE>valuetype
</CODE> object. Hence no support for truncation or
109 custom marshalling.
</p>
112 <li><p>The marshal engine accesses the state members directly and
113 does not utilize the accessor/modifier functions. This is different
114 from the CORBA specs and needs to be changed. But the
115 optimized mode (
<CODE>-Wb,obv_opt_accessor
</CODE>) should be
120 <li><p>The map of
<CODE>valuetype
</CODE> factories needs some
121 revision to provide proper locking. Currently the
122 registration of factories is best completed before
123 unmarshalling
<CODE>valuetype
</CODE>s.
124 There is one map of factories for the whole process. This
125 will once be changed to conform to the specs, which
126 suggests one per ORB.
132 <a href=
"#toc">Back to TOC
</a>