Expand description
The classic OMG IDL to C++ 1.3 mapping of topic types, as a layer over the native one.
CppMapping::Classic keeps the wire codec, the
TypeObject and the endpoint gates where they are, as CppMapping::Psm does, and gives the
application the types the classic mapping names, in C++03:
| IDL | native (zd_native::…) | classic (the IDL’s own namespaces) |
|---|---|---|
long, unsigned long, … | std::int32_t, … | CORBA::Long, CORBA::ULong, … |
octet, boolean, char, wchar | zerodds::wire::Octet, bool, char, std::uint16_t | CORBA::Octet, CORBA::Boolean, CORBA::Char, CORBA::WChar |
string, wstring | std::string | CORBA::String_var, CORBA::WString_var |
sequence<T> | std::vector<T> | zerodds::classic::Sequence<T> |
T a[2][3] | std::array<std::array<T, 3>, 2> | T a[2][3] |
map<K,V> | zerodds::Map<K, V> | zerodds::Map<K, V> (a string key is a std::string) |
@optional T m | T *, NULL when absent | zerodds::classic::Optional<T> |
@external T m | std::shared_ptr<T> | zerodds::classic::Var<T> |
struct | struct, the base a public base class | struct with public members, S_var |
union | _d() and one accessor per case | class: _d(), one accessor per case |
enum | enum class | plain enum, the values written out |
bitmask | an unsigned integer and constants | the same |
typedef | using | typedef |
The classic declarations stand between the markers ZD-CLASSIC-BEGIN and ZD-CLASSIC-END and
are C++03: they include zerodds/classic.hpp and nothing newer. The native types, the codec and
zerodds::classic::Conv after them are C++17. Conv<C> (zerodds/classic/convert.hpp) names
the native type of each classic type and converts both ways; the topic_type_support of a
classic type calls the native one’s encode and decode through it, so a classic sample takes
the same bytes, the same TypeObject and the same type name as the native one.
Not remapped, and left to the native types by name: constants, exceptions. Refused by name,
because the classic mapping has no form for them: fixed, bitset, value types, any, and an
array as the element of a sequence.
Constants§
- BEGIN_
MARKER - The marker that opens the C++03 part of a classic header.
- END_
MARKER - The marker that closes it.
Functions§
- classic_
layer - The text of the classic layer for
ast: the C++03 declarations between the markers, and thezerodds::classic::Convspecialisations after them.