chromium/third_party/libphonenumber/dist/cpp/src/phonenumbers/utf/unicodetext.cc

// Copyright (C) 2006 Google Inc.
//
// 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.

// Author: Jim Meehan

#include <algorithm>
#include <sstream>
#include <cassert>
#include <cstdio>

#include "phonenumbers/default_logger.h"
#include "phonenumbers/utf/unicodetext.h"
#include "phonenumbers/utf/stringpiece.h"
#include "phonenumbers/utf/utf.h"
#include "phonenumbers/utf/unilib.h"

namespace i18n {
namespace phonenumbers {

string;
stringstream;
max;
hex;
dec;

static int CodepointDistance(const char* start, const char* end) {}

static int CodepointCount(const char* utf8, int len) {}

UnicodeText::const_iterator::difference_type
distance(const UnicodeText::const_iterator& first,
         const UnicodeText::const_iterator& last) {}

// ---------- Utility ----------

static int ConvertToInterchangeValid(char* start, int len) {}


// *************** Data representation **********

// Note: the copy constructor is undefined.

// After reserve(), resize(), or clear(), we're an owner, not an alias.

void UnicodeText::Repr::reserve(int new_capacity) {}

void UnicodeText::Repr::resize(int new_size) {}

// This implementation of clear() deallocates the buffer if we're an owner.
// That's not strictly necessary; we could just set size_ to 0.
void UnicodeText::Repr::clear() {}

void UnicodeText::Repr::Copy(const char* data, int size) {}

void UnicodeText::Repr::TakeOwnershipOf(char* data, int size, int capacity) {}

void UnicodeText::Repr::PointTo(const char* data, int size) {}

void UnicodeText::Repr::append(const char* bytes, int byte_length) {}

string UnicodeText::Repr::DebugString() const {}



// *************** UnicodeText ******************

// ----- Constructors -----

// Default constructor
UnicodeText::UnicodeText() {}

// Copy constructor
UnicodeText::UnicodeText(const UnicodeText& src) {}

// Substring constructor
UnicodeText::UnicodeText(const UnicodeText::const_iterator& first,
                         const UnicodeText::const_iterator& last) {}

string UnicodeText::UTF8Substring(const const_iterator& first,
                                  const const_iterator& last) {}


// ----- Copy -----

UnicodeText& UnicodeText::operator=(const UnicodeText& src) {}

UnicodeText& UnicodeText::Copy(const UnicodeText& src) {}

UnicodeText& UnicodeText::CopyUTF8(const char* buffer, int byte_length) {}

UnicodeText& UnicodeText::UnsafeCopyUTF8(const char* buffer,
                                           int byte_length) {}

// ----- TakeOwnershipOf  -----

UnicodeText& UnicodeText::TakeOwnershipOfUTF8(char* buffer,
                                              int byte_length,
                                              int byte_capacity) {}

UnicodeText& UnicodeText::UnsafeTakeOwnershipOfUTF8(char* buffer,
                                                    int byte_length,
                                                    int byte_capacity) {}

// ----- PointTo -----

UnicodeText& UnicodeText::PointToUTF8(const char* buffer, int byte_length) {}

UnicodeText& UnicodeText::UnsafePointToUTF8(const char* buffer,
                                          int byte_length) {}

UnicodeText& UnicodeText::PointTo(const UnicodeText& src) {}

UnicodeText& UnicodeText::PointTo(const const_iterator &first,
                                  const const_iterator &last) {}

// ----- Append -----

UnicodeText& UnicodeText::append(const UnicodeText& u) {}

UnicodeText& UnicodeText::append(const const_iterator& first,
                                 const const_iterator& last) {}

UnicodeText& UnicodeText::UnsafeAppendUTF8(const char* utf8, int len) {}

// ----- substring searching -----

UnicodeText::const_iterator UnicodeText::find(const UnicodeText& look,
                                              const_iterator start_pos) const {}

UnicodeText::const_iterator UnicodeText::find(const UnicodeText& look) const {}

UnicodeText::const_iterator UnicodeText::UnsafeFind(
    const UnicodeText& look, const_iterator start_pos) const {}

bool UnicodeText::HasReplacementChar() const {}

// ----- other methods -----

// Clear operator
void UnicodeText::clear() {}

// Destructor
UnicodeText::~UnicodeText() {}


void UnicodeText::push_back(char32 c) {}

int UnicodeText::size() const {}

bool operator==(const UnicodeText& lhs, const UnicodeText& rhs) {}

string UnicodeText::DebugString() const {}


// ******************* UnicodeText::const_iterator *********************

// The implementation of const_iterator would be nicer if it
// inherited from boost::iterator_facade
// (http://boost.org/libs/iterator/doc/iterator_facade.html).

UnicodeText::const_iterator::const_iterator() :{}

UnicodeText::const_iterator::const_iterator(const const_iterator& other)
    :{}

UnicodeText::const_iterator&
UnicodeText::const_iterator::operator=(const const_iterator& other) {}

UnicodeText::const_iterator UnicodeText::begin() const {}

UnicodeText::const_iterator UnicodeText::end() const {}

bool operator<(const UnicodeText::const_iterator& lhs,
               const UnicodeText::const_iterator& rhs) {}

char32 UnicodeText::const_iterator::operator*() const {}

UnicodeText::const_iterator& UnicodeText::const_iterator::operator++() {}

UnicodeText::const_iterator& UnicodeText::const_iterator::operator--() {}

int UnicodeText::const_iterator::get_utf8(char* utf8_output) const {}


UnicodeText::const_iterator UnicodeText::MakeIterator(const char* p) const {}

string UnicodeText::const_iterator::DebugString() const {}

}  // namespace phonenumbers
}  // namespace i18n