OberonCore https://forum.oberoncore.ru/ |
|
Переносимый интерфейс доступа к текстовым файлам https://forum.oberoncore.ru/viewtopic.php?f=47&t=3957 |
Страница 1 из 1 |
Автор: | Роман М. [ Понедельник, 07 Май, 2012 17:15 ] |
Заголовок сообщения: | Переносимый интерфейс доступа к текстовым файлам |
Кто-нибудь в курсе существования такой подсистемы как Oberon Text Tools (Ott) для BlackBox? Она является продолжением реализации интерфейса доступа к тексту библиотеки проекта OO2C. Суть сводилась к написанию единого интерфейса доступа к текстам для всех Оберонов, чтобы было легко переносить программы с одного Оберона на другой. Подсистема Ott была реализована в ББ 1.3 поверх подсистемы Text и, в отличие от последнего, работает с текстом без атрибутов форматирования, то есть с голым набором символов.
Ian Rae писал(а): I would like to use the text i/o portion of the OOC library as the API. Судя по всему, следовало бы доработать дубовые требования (Oakwood Guidelines) и для библиотек.This library would use the file prefix "OOC" to distinguish its modules and identify its heritage. Module OOCChannel -define the abstract types Channel, Reader, Writer Module OOCFiles -define the abstract classes File, Reader, and Writer that are extensions of their counterparts in OOCChannel -define hidden concrete extensions of File, Reader, and Writer for the following types of files: -ASCII text files. ie. native OS text files -text documents of the target Oberon system. For instance, V4 Text files, BlackBox .ODC files, etc. (Implementation would use the highest level classes available in the target Oberon system. eg Texts in V4, etc) -locator procedures would create a File object appropriate to the type of file being accessed. Module OOCTexts -define the abstract classes for accessing plaintext in the Text object of the target Oberon system. eg. TextModels in BlackBox, Text in V4, etc -these classes (Text, Reader, and Writer) would be concrete extensions of their counterparts in Channel -locators will be available to "open" the current frame, or the selected text, etc Modules OOCTextRider and OOCBinaryRider -define mapper classes that can connect to any OOCChannel -should be usable with only minor changes from OOC library version Module OOCProgramArgs and OOCStdChannels -I'm not sure if these notions exist in most Oberon system? Module OOCLogs -support writing to the Log via a OOCChannel Исходный код, адаптированный для ББ 1.6 вместе с документацией можно скачать с хранилища Git на github. Код был проверен лишь поверхностно: только приведённый примеры. Поэтому, возможны недочёты. |
Страница 1 из 1 | Часовой пояс: UTC + 3 часа |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |