Expand description
The fill and the dump for the OMG IDL-to-C++ mapping.
Two of the three ORBs generate against it — omniORB 4.3.3 and TAO
2.5.24 — and they generate the same API, because CORBA 3.3 part 3
§1.2 is a specification and not a suggestion. One backend serves
both; only the marshalling call differs, and that lives in the
templates (tools/wireprobe/omniorb-template.cpp,
tao-template.cpp), never here.
sample.x = 1; // struct member, array or sequence element
sample.picked.whole(1); // union case member — §1.2.9's modifier
sample.picked.inner().x = 1; // …whose accessor returns a reference§Why this is not a self-oracle
The same reason fill.rs is not. The statements place values into
the ORB’s structures and read them back out of them; the bytes come
from the ORB’s own cdrMemoryStream or TAO_OutputCDR. A statement
that placed a value wrongly shows up as a disagreement between the
probes on that case, never as a false agreement.
§Where the two mappings part company, and where they do not
| construct | C++ mapping | why it matters here |
|---|---|---|
string | String_member / String_Manager, both operator const char* | assigned through CORBA::string_dup in both |
wstring | WString_member over CORBA::WChar | CORBA::WChar is two bytes in omniORB and four in TAO, so the units are copied rather than named |
sequence<T> | length(n) and operator[] | §1.2.11, identical in both |
T x[N] | a plain C array | §1.2.10 |
union | modifier and accessor per case, _d() for the discriminator | §1.2.9 |
fixed<P,S> | CORBA::Fixed, Fixed(const char*) and to_string() | §1.14. TAO refuses the IDL — “fixed data types are not supported” — so only omniORB reaches this arm |
octet | CORBA::Octet, an unsigned char | which is also where int8 and uint8 land; see corba_idl.rs |
§Identifiers the C++ front ends rename
An IDL member called new is legal IDL and not a C++ declaration,
so both front ends rename it — _cxx_new, measured 2026-08-11 from
omniidl’s and tao_idl’s output for
tests/interop-corpus/identifier-target-keywords. An IDL member
called _long is the keyword escaped (IDL 4.2 §7.2.3.2) and both
front ends strip the escape before renaming what remains. Every
identifier this file pastes into an identifier position therefore
goes through cpp_id first, and only those: the JSON keys the
dump prints and the paths in a ProbeError carry the name the
IDL wrote, because the wire and the matrix are keyed on that one.
Functions§
- dump_
corba_ cpp - Emit the C++ statements that print
sampleas canonical JSON. - fill_
corba_ cpp - Emit the C++ statements that fill
samplewithvalues. - fill_
corba_ cpp_ recording - As
fill_corba_cpp, recording which scalars of the value were read.