// 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 "unicodetext.h" #include "base.h" #include "utils.h" namespace chrome_lang_id { // *************** Data representation ********** // Note: the copy constructor is undefined. void UnicodeText::Repr::PointTo(const char *data, int size) { … } // *************** UnicodeText ****************** UnicodeText::UnicodeText() { … } UnicodeText &UnicodeText::PointToUTF8(const char *buffer, int byte_length) { … } UnicodeText::~UnicodeText() { … } // ******************* 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 &UnicodeText::const_iterator::operator=( const const_iterator &other) { … } UnicodeText::const_iterator UnicodeText::begin() const { … } UnicodeText::const_iterator UnicodeText::end() const { … } char32 UnicodeText::const_iterator::operator*() const { … } UnicodeText::const_iterator &UnicodeText::const_iterator::operator++() { … } } // namespace chrome_lang_id