chromium/third_party/perfetto/include/perfetto/protozero/field_writer.h

/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * 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.
 */

#include "perfetto/protozero/message.h"
#include "perfetto/protozero/proto_utils.h"

#ifndef INCLUDE_PERFETTO_PROTOZERO_FIELD_WRITER_H_
#define INCLUDE_PERFETTO_PROTOZERO_FIELD_WRITER_H_

namespace protozero {
namespace internal {

template <proto_utils::ProtoSchemaType proto_schema_type>
struct FieldWriter {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kDouble> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kFloat> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kBool> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kInt32> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kInt64> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kUint32> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kUint64> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kSint32> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kSint64> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kFixed32> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kFixed64> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kSfixed32> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kSfixed64> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kEnum> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kString> {};

template <>
struct FieldWriter<proto_utils::ProtoSchemaType::kBytes> {};

}  // namespace internal
}  // namespace protozero

#endif  // INCLUDE_PERFETTO_PROTOZERO_FIELD_WRITER_H_