chromium/third_party/perfetto/src/protozero/protoc_plugin/cppgen_plugin.cc

/*
 * Copyright (C) 2017 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 <stdio.h>
#include <stdlib.h>

#include <fstream>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <vector>

#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/importer.h>
#include <google/protobuf/compiler/plugin.h>
#include <google/protobuf/io/printer.h>

#include "perfetto/ext/base/string_utils.h"

namespace protozero {
namespace {

usingnamespacegoogle::protobuf;
usingnamespacegoogle::protobuf::compiler;
usingnamespacegoogle::protobuf::io;
SplitString;
StripChars;
StripSuffix;
ToUpper;

static constexpr auto TYPE_STRING =;
static constexpr auto TYPE_MESSAGE =;
static constexpr auto TYPE_SINT32 =;
static constexpr auto TYPE_SINT64 =;

static const char kHeader[] =;

class CppObjGenerator : public ::google::protobuf::compiler::CodeGenerator {};

CppObjGenerator::CppObjGenerator() = default;
CppObjGenerator::~CppObjGenerator() = default;

bool CppObjGenerator::Generate(const google::protobuf::FileDescriptor* file,
                               const std::string& options,
                               GeneratorContext* context,
                               std::string* error) const {}

std::string CppObjGenerator::GetCppType(const FieldDescriptor* field,
                                        bool constref) const {}

std::string CppObjGenerator::GetProtozeroSetter(
    const FieldDescriptor* field) const {}

std::string CppObjGenerator::GetPackedBuffer(
    const FieldDescriptor* field) const {}

std::string CppObjGenerator::GetPackedWireType(
    const FieldDescriptor* field) const {}

void CppObjGenerator::GenEnum(const EnumDescriptor* enum_desc,
                              Printer* p) const {}

void CppObjGenerator::GenEnumAliases(const EnumDescriptor* enum_desc,
                                     Printer* p) const {}

void CppObjGenerator::GenClassDecl(const Descriptor* msg, Printer* p) const {}

void CppObjGenerator::GenClassDef(const Descriptor* msg, Printer* p) const {}

}  // namespace
}  // namespace protozero

int main(int argc, char** argv) {}