OLD | NEW |
1 | 1 |
2 | 2 |
3 import os | 3 import os |
4 import sys | 4 import sys |
5 | 5 |
6 import datatypes | 6 import datatypes |
7 from pdfspec_autogen import * | 7 from pdfspec_autogen import * |
8 | 8 |
9 # TODO(edisonn): date and some other types are in fact strings, with a custom fo
rmat!!! | 9 # TODO(edisonn): date and some other types are in fact strings, with a custom fo
rmat!!! |
10 # TODO(edisonn): refer to page 99 (PDF data types) | 10 # TODO(edisonn): refer to page 99 (PDF data types) |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 nativeFileClass.write('#ifndef __DEFINED__SkPdf' + cls.fName + '\n') | 305 nativeFileClass.write('#ifndef __DEFINED__SkPdf' + cls.fName + '\n') |
306 nativeFileClass.write('#define __DEFINED__SkPdf' + cls.fName + '\n') | 306 nativeFileClass.write('#define __DEFINED__SkPdf' + cls.fName + '\n') |
307 nativeFileClass.write('\n') | 307 nativeFileClass.write('\n') |
308 | 308 |
309 nativeFileClassCpp.write('#include "SkPdf' + cls.fName + '_autogen.h"\n\n'
) | 309 nativeFileClassCpp.write('#include "SkPdf' + cls.fName + '_autogen.h"\n\n'
) |
310 nativeFileClassCpp.write('\n') | 310 nativeFileClassCpp.write('\n') |
311 | 311 |
312 | 312 |
313 if cls.fBase == '': | 313 if cls.fBase == '': |
314 nativeFileClass.write('#include "stddef.h"\n') | 314 nativeFileClass.write('#include "stddef.h"\n') |
315 nativeFileClass.write('#include <string>\n') | |
316 nativeFileClass.write('#include "SkPdfEnums_autogen.h"\n') | 315 nativeFileClass.write('#include "SkPdfEnums_autogen.h"\n') |
317 nativeFileClass.write('#include "SkPdfNYI.h"\n') | 316 nativeFileClass.write('#include "SkPdfNYI.h"\n') |
318 nativeFileClass.write('#include "SkPdfNativeObject.h"\n') | 317 nativeFileClass.write('#include "SkPdfNativeObject.h"\n') |
319 nativeFileClass.write('class SkPdfNativeDoc;\n') | 318 nativeFileClass.write('class SkPdfNativeDoc;\n') |
320 | 319 |
321 if cls.fBase != '': | 320 if cls.fBase != '': |
322 nativeFileClass.write('#include "SkPdf' + cls.fBase + '_autogen.h"\n') | 321 nativeFileClass.write('#include "SkPdf' + cls.fBase + '_autogen.h"\n') |
323 | 322 |
324 nativeFileClassCpp.write('#include "SkPdfNativeDoc.h"\n') | 323 nativeFileClassCpp.write('#include "SkPdfNativeDoc.h"\n') |
325 | 324 |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 | 619 |
621 fileHeadersNative.write('#endif // __DEFINED__SkPdfHeaders\n') | 620 fileHeadersNative.write('#endif // __DEFINED__SkPdfHeaders\n') |
622 | 621 |
623 fileHeadersNative.close() | 622 fileHeadersNative.close() |
624 fileHeadersNativeCpp.close() | 623 fileHeadersNativeCpp.close() |
625 | 624 |
626 if '__main__' == __name__: | 625 if '__main__' == __name__: |
627 #print sys.argv | 626 #print sys.argv |
628 sys.exit(generateCode()) | 627 sys.exit(generateCode()) |
629 | 628 |
OLD | NEW |