1 /*
2 * Copyright 2011 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include "sfntly/table/generic_table_builder.h"
18
19 namespace sfntly {
20
~GenericTableBuilder()21 GenericTableBuilder::~GenericTableBuilder() {}
22
23 CALLER_ATTACH
SubBuildTable(ReadableFontData * data)24 FontDataTable* GenericTableBuilder::SubBuildTable(ReadableFontData* data) {
25 // Note: In C++ port, we use GenericTable, the ref-counted version of Table
26 UNREFERENCED_PARAMETER(data);
27 Ptr<GenericTable> table = new GenericTable(header(), InternalReadData());
28 return table.Detach();
29 }
30
31 // static
32 CALLER_ATTACH GenericTableBuilder*
CreateBuilder(Header * header,WritableFontData * data)33 GenericTableBuilder::CreateBuilder(Header* header, WritableFontData* data) {
34 Ptr<GenericTableBuilder> builder =
35 new GenericTableBuilder(header, data);
36 return builder.Detach();
37 }
38
GenericTableBuilder(Header * header,WritableFontData * data)39 GenericTableBuilder::GenericTableBuilder(Header* header,
40 WritableFontData* data)
41 : TableBasedTableBuilder(header, data) {
42 }
43
GenericTableBuilder(Header * header,ReadableFontData * data)44 GenericTableBuilder::GenericTableBuilder(Header* header,
45 ReadableFontData* data)
46 : TableBasedTableBuilder(header, data) {
47 }
48
49 } // namespace sfntly
50