chromium/third_party/flatbuffers/src/src/code_generators.cpp

/*
 * Copyright 2016 Google Inc. All rights reserved.
 *
 * 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 "flatbuffers/code_generators.h"

#include <assert.h>

#include <cmath>

#include "flatbuffers/base.h"
#include "flatbuffers/util.h"

#if defined(_MSC_VER)
#  pragma warning(push)
#  pragma warning(disable : 4127)  // C4127: conditional expression is constant
#endif

namespace flatbuffers {

std::string JavaCSharpMakeRule(const bool java, const Parser &parser,
                               const std::string &path,
                               const std::string &file_name) {}

void CodeWriter::operator+=(std::string text) {}

void CodeWriter::AppendIdent(std::stringstream &stream) {}

const char *BaseGenerator::FlatBuffersGeneratedWarning() {}

std::string BaseGenerator::NamespaceDir(const Parser &parser,
                                        const std::string &path,
                                        const Namespace &ns,
                                        const bool dasherize) {}

std::string BaseGenerator::NamespaceDir(const Namespace &ns,
                                        const bool dasherize) const {}

std::string BaseGenerator::FullNamespace(const char *separator,
                                         const Namespace &ns) {}

std::string BaseGenerator::LastNamespacePart(const Namespace &ns) {}

// Ensure that a type is prefixed with its namespace.
std::string BaseGenerator::WrapInNameSpace(const Namespace *ns,
                                           const std::string &name) const {}

std::string BaseGenerator::WrapInNameSpace(const Definition &def,
                                           const std::string &suffix) const {}

std::string BaseGenerator::GetNameSpace(const Definition &def) const {}

std::string BaseGenerator::GeneratedFileName(const std::string &path,
                                             const std::string &file_name,
                                             const IDLOptions &options) const {}

// Generate a documentation comment, if available.
void GenComment(const std::vector<std::string> &dc, std::string *code_ptr,
                const CommentConfig *config, const char *prefix) {}

template<typename T>
std::string FloatConstantGenerator::GenFloatConstantImpl(
    const FieldDef &field) const {}

std::string FloatConstantGenerator::GenFloatConstant(
    const FieldDef &field) const {}

TypedFloatConstantGenerator::TypedFloatConstantGenerator(
    const char *double_prefix, const char *single_prefix,
    const char *nan_number, const char *pos_inf_number,
    const char *neg_inf_number)
    :{}

std::string TypedFloatConstantGenerator::MakeNaN(
    const std::string &prefix) const {}
std::string TypedFloatConstantGenerator::MakeInf(
    bool neg, const std::string &prefix) const {}

std::string TypedFloatConstantGenerator::Value(double v,
                                               const std::string &src) const {}

std::string TypedFloatConstantGenerator::Inf(double v) const {}

std::string TypedFloatConstantGenerator::NaN(double v) const {}

std::string TypedFloatConstantGenerator::Value(float v,
                                               const std::string &src) const {}

std::string TypedFloatConstantGenerator::Inf(float v) const {}

std::string TypedFloatConstantGenerator::NaN(float v) const {}

SimpleFloatConstantGenerator::SimpleFloatConstantGenerator(
    const char *nan_number, const char *pos_inf_number,
    const char *neg_inf_number)
    :{}

std::string SimpleFloatConstantGenerator::Value(double v,
                                                const std::string &src) const {}

std::string SimpleFloatConstantGenerator::Inf(double v) const {}

std::string SimpleFloatConstantGenerator::NaN(double v) const {}

std::string SimpleFloatConstantGenerator::Value(float v,
                                                const std::string &src) const {}

std::string SimpleFloatConstantGenerator::Inf(float v) const {}

std::string SimpleFloatConstantGenerator::NaN(float v) const {}

}  // namespace flatbuffers

#if defined(_MSC_VER)
#  pragma warning(pop)
#endif