Line data Source code
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 :
21 0 : GenericTableBuilder::~GenericTableBuilder() {}
22 :
23 : CALLER_ATTACH
24 0 : FontDataTable* GenericTableBuilder::SubBuildTable(ReadableFontData* data) {
25 : // Note: In C++ port, we use GenericTable, the ref-counted version of Table
26 : UNREFERENCED_PARAMETER(data);
27 0 : Ptr<GenericTable> table = new GenericTable(header(), InternalReadData());
28 0 : return table.Detach();
29 : }
30 :
31 : // static
32 : CALLER_ATTACH GenericTableBuilder*
33 0 : GenericTableBuilder::CreateBuilder(Header* header, WritableFontData* data) {
34 : Ptr<GenericTableBuilder> builder =
35 0 : new GenericTableBuilder(header, data);
36 0 : return builder.Detach();
37 : }
38 :
39 0 : GenericTableBuilder::GenericTableBuilder(Header* header,
40 0 : WritableFontData* data)
41 0 : : TableBasedTableBuilder(header, data) {
42 0 : }
43 :
44 0 : GenericTableBuilder::GenericTableBuilder(Header* header,
45 0 : ReadableFontData* data)
46 0 : : TableBasedTableBuilder(header, data) {
47 0 : }
48 :
49 : } // namespace sfntly
|