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 #ifndef SFNTLY_CPP_SRC_SFNTLY_TABLE_GENERIC_TABLE_BUILDER_H_ 18 #define SFNTLY_CPP_SRC_SFNTLY_TABLE_GENERIC_TABLE_BUILDER_H_ 19 20 #include "sfntly/table/table_based_table_builder.h" 21 22 namespace sfntly { 23 24 // A table builder to do the minimal table building for an unknown table type. 25 class GenericTableBuilder : public TableBasedTableBuilder, 26 public RefCounted<GenericTableBuilder> { 27 public: 28 virtual ~GenericTableBuilder(); 29 30 virtual CALLER_ATTACH FontDataTable* SubBuildTable(ReadableFontData* data); 31 32 static CALLER_ATTACH GenericTableBuilder* 33 CreateBuilder(Header* header, WritableFontData* data); 34 35 private: 36 GenericTableBuilder(Header* header, WritableFontData* data); 37 GenericTableBuilder(Header* header, ReadableFontData* data); 38 }; 39 40 } // namespace sfntly 41 42 #endif // SFNTLY_CPP_SRC_SFNTLY_TABLE_BYTE_ARRAY_TABLE_BUILDER_H_ 43