chromium/third_party/skia/src/pdf/SkPDFTypes.cpp

/*
 * Copyright 2011 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "src/pdf/SkPDFTypes.h"

#include "include/core/SkExecutor.h"
#include "include/core/SkStream.h"
#include "include/core/SkString.h"
#include "include/docs/SkPDFDocument.h"
#include "include/private/base/SkDebug.h"
#include "include/private/base/SkTo.h"
#include "src/base/SkUTF.h"
#include "src/base/SkUtils.h"
#include "src/core/SkStreamPriv.h"
#include "src/pdf/SkDeflate.h"
#include "src/pdf/SkPDFDocumentPriv.h"
#include "src/pdf/SkPDFUnion.h"
#include "src/pdf/SkPDFUtils.h"

#include <cstring>
#include <functional>
#include <new>

////////////////////////////////////////////////////////////////////////////////

SkPDFUnion::SkPDFUnion(Type t, int32_t     v) :{}
SkPDFUnion::SkPDFUnion(Type t, bool        v) :{}
SkPDFUnion::SkPDFUnion(Type t, SkScalar    v) :{}
SkPDFUnion::SkPDFUnion(Type t, const char* v) :{}
SkPDFUnion::SkPDFUnion(Type t, SkString    v) :{}
SkPDFUnion::SkPDFUnion(Type t, PDFObject   v) :{}

SkPDFUnion::~SkPDFUnion() {}

SkPDFUnion::SkPDFUnion(SkPDFUnion&& that) :{}

SkPDFUnion& SkPDFUnion::operator=(SkPDFUnion&& that) {}

bool SkPDFUnion::isName() const {}

#ifdef SK_DEBUG
// Most names need no escaping.  Such names are handled as static const strings.
bool is_valid_name(const char* n) {}
#endif  // SK_DEBUG

// Given an arbitrary string, write it as a valid name (not including leading slash).
static void write_name_escaped(SkWStream* o, const char* name) {}

static void write_literal_byte_string(SkWStream* wStream, const char* cin, size_t len) {}

static void write_hex_byte_string(SkWStream* wStream, const char* cin, size_t len) {}

static void write_optimized_byte_string(SkWStream* wStream, const char* cin, size_t len,
                                        size_t literalExtras) {}

static void write_byte_string(SkWStream* wStream, const char* cin, size_t len) {}

static void write_text_string(SkWStream* wStream, const char* cin, size_t len) {}

void SkPDFWriteTextString(SkWStream* wStream, const char* cin, size_t len) {}
void SkPDFWriteByteString(SkWStream* wStream, const char* cin, size_t len) {}

void SkPDFUnion::emitObject(SkWStream* stream) const {}

SkPDFUnion SkPDFUnion::Int(int32_t value) {}

SkPDFUnion SkPDFUnion::ColorComponent(uint8_t value) {}

SkPDFUnion SkPDFUnion::ColorComponentF(float value) {}

SkPDFUnion SkPDFUnion::Bool(bool value) {}

SkPDFUnion SkPDFUnion::Scalar(SkScalar value) {}

SkPDFUnion SkPDFUnion::Name(const char* value) {}

SkPDFUnion SkPDFUnion::ByteString(const char* value) {}

SkPDFUnion SkPDFUnion::TextString(const char* value) {}

SkPDFUnion SkPDFUnion::Name(SkString s) {}

SkPDFUnion SkPDFUnion::ByteString(SkString s) {}

SkPDFUnion SkPDFUnion::TextString(SkString s) {}

SkPDFUnion SkPDFUnion::Object(std::unique_ptr<SkPDFObject> objSp) {}

SkPDFUnion SkPDFUnion::Ref(SkPDFIndirectReference ref) {}

////////////////////////////////////////////////////////////////////////////////

#if 0  // Enable if needed.
void SkPDFAtom::emitObject(SkWStream* stream) const {
    fValue.emitObject(stream);
}
#endif  // 0

////////////////////////////////////////////////////////////////////////////////

SkPDFArray::SkPDFArray() {}

SkPDFArray::~SkPDFArray() {}

size_t SkPDFArray::size() const {}

void SkPDFArray::reserve(int length) {}

void SkPDFArray::emitObject(SkWStream* stream) const {}

void SkPDFArray::append(SkPDFUnion&& value) {}

void SkPDFArray::appendInt(int32_t value) {}

void SkPDFArray::appendColorComponent(uint8_t value) {}

void SkPDFArray::appendBool(bool value) {}

void SkPDFArray::appendScalar(SkScalar value) {}

void SkPDFArray::appendName(const char name[]) {}

void SkPDFArray::appendName(SkString name) {}

void SkPDFArray::appendByteString(SkString value) {}

void SkPDFArray::appendTextString(SkString value) {}

void SkPDFArray::appendByteString(const char value[]) {}

void SkPDFArray::appendTextString(const char value[]) {}

void SkPDFArray::appendObject(std::unique_ptr<SkPDFObject>&& objSp) {}

void SkPDFArray::appendRef(SkPDFIndirectReference ref) {}

///////////////////////////////////////////////////////////////////////////////

SkPDFDict::~SkPDFDict() {}

SkPDFDict::SkPDFDict(const char type[]) {}

void SkPDFDict::emitObject(SkWStream* stream) const {}

size_t SkPDFDict::size() const {}

void SkPDFDict::reserve(int n) {}

void SkPDFDict::insertRef(const char key[], SkPDFIndirectReference ref) {}

void SkPDFDict::insertRef(SkString key, SkPDFIndirectReference ref) {}

void SkPDFDict::insertObject(const char key[], std::unique_ptr<SkPDFObject>&& objSp) {}
void SkPDFDict::insertObject(SkString key, std::unique_ptr<SkPDFObject>&& objSp) {}

void SkPDFDict::insertBool(const char key[], bool value) {}

void SkPDFDict::insertInt(const char key[], int32_t value) {}

void SkPDFDict::insertInt(const char key[], size_t value) {}

void SkPDFDict::insertColorComponentF(const char key[], SkScalar value) {}

void SkPDFDict::insertScalar(const char key[], SkScalar value) {}

void SkPDFDict::insertName(const char key[], const char name[]) {}

void SkPDFDict::insertName(const char key[], SkString name) {}

void SkPDFDict::insertByteString(const char key[], const char value[]) {}

void SkPDFDict::insertTextString(const char key[], const char value[]) {}

void SkPDFDict::insertByteString(const char key[], SkString value) {}

void SkPDFDict::insertTextString(const char key[], SkString value) {}

void SkPDFDict::insertUnion(const char key[], SkPDFUnion&& value) {}

////////////////////////////////////////////////////////////////////////////////



static void serialize_stream(SkPDFDict* origDict,
                             SkStreamAsset* stream,
                             SkPDFSteamCompressionEnabled compress,
                             SkPDFDocument* doc,
                             SkPDFIndirectReference ref) {}

SkPDFIndirectReference SkPDFStreamOut(std::unique_ptr<SkPDFDict> dict,
                                      std::unique_ptr<SkStreamAsset> content,
                                      SkPDFDocument* doc,
                                      SkPDFSteamCompressionEnabled compress) {}