Skip to main content

Module corba_cpp

Module corba_cpp 

Source
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

constructC++ mappingwhy it matters here
stringString_member / String_Manager, both operator const char*assigned through CORBA::string_dup in both
wstringWString_member over CORBA::WCharCORBA::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
unionmodifier 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
octetCORBA::Octet, an unsigned charwhich 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 sample as canonical JSON.
fill_corba_cpp
Emit the C++ statements that fill sample with values.
fill_corba_cpp_recording
As fill_corba_cpp, recording which scalars of the value were read.