// Copyright(c) 2024, 2025 ZettaScale Technology and others
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License
// v. 1.0 which is available at
// http://www.eclipse.org/org/documents/edl-v10.php.
//
// SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
module CdrStreamString {
@final struct t1 { string ws; @key uint32 k; };
@final struct t2 { string<1> ws1; string<2> ws2; @key uint32 k; };
@final struct t3 { string<1> ws1a[2]; @key uint32 k; };
typedef string<1> string1;
typedef sequence<string> string_seq;
typedef sequence<string1, 2> string1_bseq2;
@final struct t4 { string_seq ws1s; string1_bseq2 ws1bs; @key uint32 k; };
@final union u5 switch (long) {
case 1: string ws;
case 2: string1 ws1;
case 3: string_seq wss;
case 4: string1_bseq2 ws1bs;
case 5: string1 ws1a[2];
case 6: string1_bseq2 ws1abs[2];
};
@final struct t5 {
u5 u;
@key uint32 k;
};
@final struct t6 {
@key string<1> k;
};
@final struct t7 {
@key string<1> k[2];
};
};
module CdrStreamWstring {
@final struct t1 { wstring ws; @key uint32 k; };
@final struct t2 { wstring<1> ws1; wstring<2> ws2; @key uint32 k; };
@final struct t3 { wstring<1> ws1a[2]; @key uint32 k; };
typedef wstring<1> wstring1;
typedef sequence<wstring> wstring_seq;
typedef sequence<wstring1, 2> wstring1_bseq2;
@final struct t4 { wstring_seq ws1s; wstring1_bseq2 ws1bs; @key uint32 k; };
@final union u5 switch (long) {
case 1: wstring ws;
case 2: wstring1 ws1;
case 3: wstring_seq wss;
case 4: wstring1_bseq2 ws1bs;
case 5: wstring1 ws1a[2];
case 6: wstring1_bseq2 ws1abs[2];
};
@final struct t5 {
u5 u;
@key uint32 k;
};
@final struct t6 {
@key wstring<1> k;
};
@final struct t7 {
@key wstring<1> k[2];
};
};