/* * 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. */ #pragma once #include namespace apache { namespace thrift { namespace type { // Forward declare to avoid circular dep with thrift/lib/thrift/id.thrift. enum class FieldId : ::std::int16_t; } // namespace type using FieldId = type::FieldId; template id> using field_id = type::field_id_tag; using FieldOrdinal = type::Ordinal; template ord> using field_ordinal = type::ordinal_tag; // TODO(dokwon): Change FieldContext to use strong FieldId type. template struct FieldContext { static constexpr int16_t kFieldId = FieldId; Struct& object; }; } // namespace thrift } // namespace apache