11cb0ef41Sopenharmony_ci// Copyright 2018 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci// found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci#ifndef V8_INTL_SUPPORT 61cb0ef41Sopenharmony_ci#error Internationalization is expected to be enabled. 71cb0ef41Sopenharmony_ci#endif // V8_INTL_SUPPORT 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci#ifndef V8_OBJECTS_JS_BREAK_ITERATOR_H_ 101cb0ef41Sopenharmony_ci#define V8_OBJECTS_JS_BREAK_ITERATOR_H_ 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ci#include <set> 131cb0ef41Sopenharmony_ci#include <string> 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ci#include "src/objects/intl-objects.h" 161cb0ef41Sopenharmony_ci#include "src/objects/managed.h" 171cb0ef41Sopenharmony_ci#include "src/objects/objects.h" 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ci// Has to be the last include (doesn't have include guards): 201cb0ef41Sopenharmony_ci#include "src/objects/object-macros.h" 211cb0ef41Sopenharmony_ci 221cb0ef41Sopenharmony_cinamespace U_ICU_NAMESPACE { 231cb0ef41Sopenharmony_ciclass BreakIterator; 241cb0ef41Sopenharmony_ci} // namespace U_ICU_NAMESPACE 251cb0ef41Sopenharmony_ci 261cb0ef41Sopenharmony_cinamespace v8 { 271cb0ef41Sopenharmony_cinamespace internal { 281cb0ef41Sopenharmony_ci 291cb0ef41Sopenharmony_ci#include "torque-generated/src/objects/js-break-iterator-tq.inc" 301cb0ef41Sopenharmony_ci 311cb0ef41Sopenharmony_ciclass JSV8BreakIterator 321cb0ef41Sopenharmony_ci : public TorqueGeneratedJSV8BreakIterator<JSV8BreakIterator, JSObject> { 331cb0ef41Sopenharmony_ci public: 341cb0ef41Sopenharmony_ci V8_WARN_UNUSED_RESULT static MaybeHandle<JSV8BreakIterator> New( 351cb0ef41Sopenharmony_ci Isolate* isolate, Handle<Map> map, Handle<Object> input_locales, 361cb0ef41Sopenharmony_ci Handle<Object> input_options, const char* service); 371cb0ef41Sopenharmony_ci 381cb0ef41Sopenharmony_ci static Handle<JSObject> ResolvedOptions( 391cb0ef41Sopenharmony_ci Isolate* isolate, Handle<JSV8BreakIterator> break_iterator); 401cb0ef41Sopenharmony_ci 411cb0ef41Sopenharmony_ci V8_EXPORT_PRIVATE static const std::set<std::string>& GetAvailableLocales(); 421cb0ef41Sopenharmony_ci 431cb0ef41Sopenharmony_ci static void AdoptText(Isolate* isolate, 441cb0ef41Sopenharmony_ci Handle<JSV8BreakIterator> break_iterator, 451cb0ef41Sopenharmony_ci Handle<String> text); 461cb0ef41Sopenharmony_ci 471cb0ef41Sopenharmony_ci static Handle<Object> Current(Isolate* isolate, 481cb0ef41Sopenharmony_ci Handle<JSV8BreakIterator> break_iterator); 491cb0ef41Sopenharmony_ci static Handle<Object> First(Isolate* isolate, 501cb0ef41Sopenharmony_ci Handle<JSV8BreakIterator> break_iterator); 511cb0ef41Sopenharmony_ci static Handle<Object> Next(Isolate* isolate, 521cb0ef41Sopenharmony_ci Handle<JSV8BreakIterator> break_iterator); 531cb0ef41Sopenharmony_ci static String BreakType(Isolate* isolate, 541cb0ef41Sopenharmony_ci Handle<JSV8BreakIterator> break_iterator); 551cb0ef41Sopenharmony_ci 561cb0ef41Sopenharmony_ci DECL_PRINTER(JSV8BreakIterator) 571cb0ef41Sopenharmony_ci 581cb0ef41Sopenharmony_ci DECL_ACCESSORS(break_iterator, Managed<icu::BreakIterator>) 591cb0ef41Sopenharmony_ci DECL_ACCESSORS(unicode_string, Managed<icu::UnicodeString>) 601cb0ef41Sopenharmony_ci 611cb0ef41Sopenharmony_ci TQ_OBJECT_CONSTRUCTORS(JSV8BreakIterator) 621cb0ef41Sopenharmony_ci}; 631cb0ef41Sopenharmony_ci 641cb0ef41Sopenharmony_ci} // namespace internal 651cb0ef41Sopenharmony_ci} // namespace v8 661cb0ef41Sopenharmony_ci 671cb0ef41Sopenharmony_ci#include "src/objects/object-macros-undef.h" 681cb0ef41Sopenharmony_ci 691cb0ef41Sopenharmony_ci#endif // V8_OBJECTS_JS_BREAK_ITERATOR_H_ 70