/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace cpp2 apache.thrift.test include "thrift/annotation/thrift.thrift" include "thrift/annotation/cpp.thrift" cpp_include "" cpp_include "" cpp_include "" cpp_include "" cpp_include "" cpp_include "" cpp_include "" cpp_include "" cpp_include "" struct Fields { 1: list listField; 2: StructWithListField structField; 3: list> nestedListField; 4: list> nestedStructListField; 5: map> nestedStructListMapField; @cpp.Ref{type = cpp.RefType.SharedMutable} 6: list listFieldRef; @cpp.Ref{type = cpp.RefType.SharedMutable} 7: StructWithListField structFieldRef; @cpp.Ref{type = cpp.RefType.SharedMutable} 8: optional list optListFieldRef; @cpp.Ref{type = cpp.RefType.SharedMutable} 9: optional StructWithListField optStructFieldRef; @thrift.Box 10: optional list listFieldBoxRef; @thrift.Box 11: optional StructWithListField structFieldBoxRef; } struct StructWithListField { 1: list listField; } (cpp.declare_hash) struct StructWithListFieldVector { 1: list field; } struct StructWithListFieldList { @cpp.Type{template = "std::list"} 1: list field; } struct StructWithListFieldDeque { @cpp.Type{template = "std::deque"} 1: list field; } struct StructWithListFieldSet { 1: set field; } struct StructWithListFieldUnorderedSet { @cpp.Type{template = "std::unordered_set"} 1: set field; } struct StructWithListFieldF14FastSet { @cpp.Type{template = "folly::F14FastSet"} 1: set field; } struct StructWithListFieldF14VectorSet { @cpp.Type{template = "folly::F14VectorSet"} 1: set field; } struct StructWithListFieldSortedVectorSet { @cpp.Type{template = "folly::sorted_vector_set"} 1: set field; } struct StructWithListFieldMap { 1: map field; } struct StructWithListFieldUnorderedMap { @cpp.Type{template = "std::unordered_map"} 1: map field; } struct StructWithListFieldF14FastMap { @cpp.Type{template = "folly::F14FastMap"} 1: map field; } struct StructWithListFieldF14VectorMap { @cpp.Type{template = "folly::F14VectorMap"} 1: map field; } struct StructWithListFieldSortedVectorMap { @cpp.Type{template = "folly::sorted_vector_map"} 1: map field; } struct DoubleStructWithListFieldMap { 1: map field; } struct DoubleStructWithListFieldUnorderedMap { @cpp.Type{template = "std::unordered_map"} 1: map field; } struct DoubleStructWithListFieldF14FastMap { @cpp.Type{template = "folly::F14FastMap"} 1: map field; } struct DoubleStructWithListFieldF14VectorMap { @cpp.Type{template = "folly::F14VectorMap"} 1: map field; }