Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
vm
zone_text_buffer.h
Go to the documentation of this file.
1
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2
// for details. All rights reserved. Use of this source code is governed by a
3
// BSD-style license that can be found in the LICENSE file.
4
5
#ifndef RUNTIME_VM_ZONE_TEXT_BUFFER_H_
6
#define RUNTIME_VM_ZONE_TEXT_BUFFER_H_
7
8
#include "
platform/text_buffer.h
"
9
#include "
vm/allocation.h
"
10
#include "
vm/globals.h
"
11
12
namespace
dart
{
13
14
class
String;
15
class
Zone;
16
17
// ZoneTextBuffer allocates the character buffer in the given zone. Thus,
18
// pointers returned by buffer() have the same lifetime as the zone.
19
class
ZoneTextBuffer
:
public
BaseTextBuffer
{
20
public
:
21
explicit
ZoneTextBuffer
(
Zone
* zone, intptr_t initial_capacity = 64);
22
~ZoneTextBuffer
() {}
23
24
// Allocates a new internal buffer. Thus, the contents of buffers returned by
25
// previous calls to buffer() are no longer affected by this object.
26
void
Clear
();
27
28
private
:
29
bool
EnsureCapacity(intptr_t len);
30
Zone
* zone_;
31
32
DISALLOW_COPY_AND_ASSIGN
(
ZoneTextBuffer
);
33
};
34
35
}
// namespace dart
36
37
#endif
// RUNTIME_VM_ZONE_TEXT_BUFFER_H_
dart::BaseTextBuffer
Definition
text_buffer.h:15
dart::ZoneTextBuffer
Definition
zone_text_buffer.h:19
dart::ZoneTextBuffer::~ZoneTextBuffer
~ZoneTextBuffer()
Definition
zone_text_buffer.h:22
dart::ZoneTextBuffer::Clear
void Clear()
Definition
zone_text_buffer.cc:24
dart::Zone
Definition
unit_test_custom_zone.h:19
dart
Definition
dart_vm.cc:33
DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
globals.h:581
text_buffer.h
allocation.h
globals.h
Generated on Fri Apr 26 2024 06:15:21 for Flutter Engine by
1.9.8