RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
apple.h
1#ifndef APPLE_H
2#define APPLE_H
3
4#include "../linker/format.h"
5
6/* Structures common to multiple Apple products */
7
8namespace Apple
9{
10 /* TODO: rework with Linker::Format */
11
26 {
27 public:
28 offset_t ImageSize() const override;
29 void ReadFile(Linker::Reader& rd) override;
30
31 enum format_type
32 {
33 SINGLE = 0x00051600,
34 DOUBLE = 0x00051607,
35 };
36 format_type type = DOUBLE;
37 unsigned version = 2;
38
39 /* Only relevant for version 1 */
40 enum hfs_type
41 {
42 HFS_UNDEFINED,
43 HFS_Macintosh,
44 HFS_ProDOS,
45 HFS_MSDOS,
46 HFS_UNIX,
47 HFS_VAX_VMS,
48 };
49 protected:
50 hfs_type home_file_system;
51 public:
52 hfs_type GetHomeFileSystem() const;
53 void SetHomeFileSystem(hfs_type type);
54
55 char home_file_system_string[16] = "";
56
57 class Entry : public virtual Linker::Format
58 {
59 public:
60 const uint32_t id;
61 offset_t file_offset = 0;
62 offset_t image_size = 0;
63 protected:
64 Entry(uint32_t id)
65 : id(id)
66 {
67 }
68 public:
69 offset_t ImageSize() const override = 0;
70 static std::shared_ptr<Entry> ReadEntry(Linker::Reader& rd, hfs_type home_file_system);
71 void ReadFile(Linker::Reader& rd) override = 0;
73 offset_t WriteFile(Linker::Writer& out) const override = 0;
74 void Dump(Dumper::Dumper& dump) const override = 0;
75
76 void DumpEntry(Dumper::Dumper& dump, unsigned index) const;
77
78 virtual void CalculateValues();
79 };
80
81 class UnknownEntry : public Entry
82 {
83 public:
84 std::shared_ptr<Linker::Contents> image;
85
86 UnknownEntry(uint32_t id)
87 : Entry(id)
88 {
89 }
90
91 offset_t ImageSize() const override;
92
93 void ReadFile(Linker::Reader& rd) override;
94
96 offset_t WriteFile(Linker::Writer& out) const override;
97
98 void Dump(Dumper::Dumper& dump) const override;
99
100 void CalculateValues() override;
101 };
102
103 private:
104 static const char TXT_undefined[16];
105 static const char TXT_Macintosh[16];
106 static const char TXT_ProDOS[16];
107 static const char TXT_MS_DOS[16];
108 static const char TXT_UNIX[16];
109 static const char TXT_VAX_VMS[16];
110
111 public:
112 std::vector<std::shared_ptr<Entry>> entries;
113 offset_t image_size = offset_t(-1);
114
115 enum
116 {
117 ID_DataFork = 1,
118 ID_ResourceFork,
119 ID_RealName,
120 ID_Comment,
121 ID_IconBW,
122 ID_IconColor,
123 ID_FileInfo, /* v1 only */
124 ID_FileDatesInfo, /* v2 only */
125 ID_FinderInfo,
126 ID_MacintoshFileInfo, /* v2 only */
127 ID_ProDOSFileInfo, /* v2 only */
128 ID_MSDOSFileInfo, /* v2 only */
129 ID_AFPShortName, /* v2 only */
130 ID_AFPFileInfo, /* v2 only */
131 ID_AFPDirectoryID, /* v2 only */
132 };
133
134 explicit AppleSingleDouble()
135 {
136 SetHomeFileSystem(HFS_UNDEFINED);
137 }
138
139 AppleSingleDouble(format_type type, unsigned version, hfs_type home_file_system)
140 : type(type), version(version)
141 {
142 assert(type == SINGLE || type == DOUBLE);
143 SetHomeFileSystem(version == 1 ? home_file_system : HFS_UNDEFINED);
144 }
145
146 AppleSingleDouble(format_type type, hfs_type home_file_system)
147 : type(type), version(1), home_file_system(home_file_system)
148 {
149 assert(type == SINGLE || type == DOUBLE);
150 SetHomeFileSystem(home_file_system);
151 }
152
153 AppleSingleDouble(format_type type, unsigned version = 2)
154 : type(type), version(version), home_file_system(HFS_UNDEFINED)
155 {
156 assert(type == SINGLE || type == DOUBLE);
157 SetHomeFileSystem(HFS_UNDEFINED);
158 }
159
160 /* TODO: a destructor might remove the entries of the other object as well */
161 explicit AppleSingleDouble(AppleSingleDouble& other, format_type type)
162 : type(type), version(other.version), home_file_system(other.home_file_system)
163 {
164 SetHomeFileSystem(other.GetHomeFileSystem());
165 if(type == SINGLE && other.type == DOUBLE)
166 {
167 GetDataFork();
168 }
169 for(auto entry : other.entries)
170 {
171 if(type == DOUBLE && entry->id == ID_DataFork)
172 continue;
173 entries.push_back(entry);
174 }
175 }
176
177 explicit AppleSingleDouble(AppleSingleDouble& other)
178 : type(other.type), version(other.version), home_file_system(other.home_file_system)
179 {
180 for(auto entry : other.entries)
181 {
182 entries.push_back(entry);
183 }
184 }
185
186 std::shared_ptr<const Entry> FindEntry(uint32_t id) const;
187 std::shared_ptr<Entry> FindEntry(uint32_t id);
188 void AppendEntry(std::shared_ptr<Entry> entry);
189
190 std::shared_ptr<Entry> GetFileDatesInfo();
191 std::shared_ptr<Entry> GetMacintoshFileInfo();
192 std::shared_ptr<Entry> GetAUXFileInfo();
193 std::shared_ptr<Entry> GetProDOSFileInfo();
194 std::shared_ptr<Entry> GetMSDOSFileInfo();
195
196 std::shared_ptr<Entry> GetDataFork();
197 std::shared_ptr<Entry> GetResourceFork();
198 std::shared_ptr<Entry> GetFinderInfo();
199 std::shared_ptr<Entry> GetRealName();
200
201 void SetCreationDate(uint32_t CreationDate);
202 void SetModificationDate(uint32_t ModificationDate);
203 void SetBackupDate(uint32_t BackupDate);
204 void SetAccessDate(uint32_t AccessDate);
205 void SetMacintoshAttributes(uint32_t Attributes);
206 void SetProDOSAccess(uint16_t Access);
207 void SetProDOSFileType(uint16_t FileType);
208 void SetProDOSAUXType(uint32_t AUXType);
209 void SetMSDOSAttributes(uint16_t Attributes);
210
212 uint32_t GetCreationDate();
214 uint32_t GetModificationDate();
216 uint32_t GetMacintoshAttributes();
217
219 uint32_t ReadCreationDate();
221 uint32_t ReadModificationDate();
223 uint32_t ReadMacintoshAttributes();
224
225 void CalculateValues();
227 offset_t WriteFile(Linker::Writer& wr) const override;
228 void Dump(Dumper::Dumper& dump) const override;
229
230 std::string PrefixFilename(std::string prefix, std::string filename);
231 std::string PrefixFilename(std::string prefix, std::string filename, size_t limit);
232 std::string ReplaceExtension(std::string filename, std::string extension, size_t limit);
233
234 std::string GetUNIXDoubleFilename(std::string filename);
235 std::string GetMacOSXDoubleFilename(std::string filename);
236 std::string GetProDOSDoubleFilename(std::string filename);
237 std::string GetMSDOSDoubleFilename(std::string filename);
238 };
239
241 {
242 public:
243 std::shared_ptr<Linker::Contents> image;
244
245 DataFork()
246 : Entry(AppleSingleDouble::ID_DataFork)
247 {
248 }
249
250 DataFork(std::shared_ptr<Linker::Contents> image)
251 : Entry(AppleSingleDouble::ID_DataFork), image(image)
252 {
253 }
254
255 offset_t ImageSize() const override;
256
257 void ReadFile(Linker::Reader& rd) override;
258
260 offset_t WriteFile(Linker::Writer& out) const override;
261
262 void Dump(Dumper::Dumper& dump) const override;
263
264 void CalculateValues() override;
265 };
266
272 {
273 public:
275 std::shared_ptr<Linker::Contents> image;
276
278 : Entry(AppleSingleDouble::ID_ResourceFork)
279 {
280 }
281
282 ResourceFork(std::shared_ptr<Linker::Contents> image)
283 : Entry(AppleSingleDouble::ID_ResourceFork), image(image)
284 {
285 }
286
287 offset_t ImageSize() const override;
288
289 void ReadFile(Linker::Reader& rd) override;
290
292 offset_t WriteFile(Linker::Writer& out) const override;
293
294 void Dump(Dumper::Dumper& dump) const override;
295
296 void CalculateValues() override;
297 };
298
300 {
301 public:
302 std::string name;
303
304 RealName(std::string name = "")
305 : Entry(AppleSingleDouble::ID_RealName), name(name)
306 {
307 }
308
309 offset_t ImageSize() const override;
310
311 void ReadFile(Linker::Reader& rd) override;
312
314 offset_t WriteFile(Linker::Writer& wr) const override;
315
316 void Dump(Dumper::Dumper& dump) const override;
317 };
318
320 {
321 public:
322 Comment()
323 : Entry(AppleSingleDouble::ID_Comment)
324 {
325 }
326 /* TODO - this is a stub */
327
328 offset_t ImageSize() const override;
329
330 void ReadFile(Linker::Reader& rd) override;
331
333 offset_t WriteFile(Linker::Writer& out) const override;
334
335 void Dump(Dumper::Dumper& dump) const override;
336 };
337
339 {
340 public:
341 IconBW()
342 : Entry(AppleSingleDouble::ID_IconBW)
343 {
344 }
345 /* TODO - this is a stub */
346
347 offset_t ImageSize() const override;
348
349 void ReadFile(Linker::Reader& rd) override;
351
352 offset_t WriteFile(Linker::Writer& out) const override;
353
354 void Dump(Dumper::Dumper& dump) const override;
355 };
356
358 {
359 public:
360 IconColor()
361 : Entry(AppleSingleDouble::ID_IconColor)
362 {
363 }
364 /* TODO - this is a stub */
365
366 offset_t ImageSize() const override;
367
368 void ReadFile(Linker::Reader& rd) override;
370
371 offset_t WriteFile(Linker::Writer& out) const override;
372
373 void Dump(Dumper::Dumper& dump) const override;
374 };
375
376 /* Version 1 only */
378 {
379 protected:
380 FileInfo()
381 : Entry(AppleSingleDouble::ID_FileInfo)
382 {
383 }
384
385 public:
386 class Macintosh;
387 class ProDOS;
388 class MSDOS;
389 class AUX;
390 };
391
393 {
394 public:
395 uint32_t CreationDate;
396 uint32_t ModificationDate;
397 uint32_t LastBackupDate;
398 uint32_t Attributes;
399
400 Macintosh(uint32_t CreationDate = 0,
401 uint32_t ModificationDate = 0,
402 uint32_t LastBackupDate = 0,
403 uint32_t Attributes = 0)
404 : CreationDate(CreationDate), ModificationDate(ModificationDate), LastBackupDate(LastBackupDate), Attributes(Attributes)
405 {
406 }
407
408 offset_t ImageSize() const override;
409
410 void ReadFile(Linker::Reader& rd) override;
411
413 offset_t WriteFile(Linker::Writer& wr) const override;
414
415 void Dump(Dumper::Dumper& dump) const override;
416 };
417
419 {
420 public:
421 uint32_t CreationDate;
422 uint32_t ModificationDate;
423 uint16_t Access;
424 uint16_t FileType;
425 uint32_t AUXType;
426
427 ProDOS(uint32_t CreationDate = 0,
428 uint32_t ModificationDate = 0,
429 uint16_t Access = 0,
430 uint16_t FileType = 0,
431 uint32_t AUXType = 0)
432 : CreationDate(CreationDate), ModificationDate(ModificationDate), Access(Access), FileType(FileType), AUXType(AUXType)
433 {
434 }
435
436 offset_t ImageSize() const override;
437
438 void ReadFile(Linker::Reader& rd) override;
439
441 offset_t WriteFile(Linker::Writer& wr) const override;
442
443 void Dump(Dumper::Dumper& dump) const override;
444 };
445
447 {
448 public:
449 uint32_t ModificationDate;
450 uint16_t Attributes;
451
452 MSDOS(uint32_t ModificationDate = 0,
453 uint16_t Attributes = 0)
454 : ModificationDate(ModificationDate), Attributes(Attributes)
455 {
456 }
457
458 offset_t ImageSize() const override;
459
460 void ReadFile(Linker::Reader& rd) override;
461
463 offset_t WriteFile(Linker::Writer& wr) const override;
464
465 void Dump(Dumper::Dumper& dump) const override;
466 };
467
468 class FileInfo::AUX : public FileInfo
469 {
470 public:
471 uint32_t CreationDate;
472 uint32_t AccessDate;
473 uint32_t ModificationDate;
474
475 AUX(uint32_t CreationDate = 0,
476 uint32_t AccessDate = 0,
477 uint32_t ModificationDate = 0)
478 : CreationDate(CreationDate), AccessDate(AccessDate), ModificationDate(ModificationDate)
479 {
480 }
481
482 offset_t ImageSize() const override;
483
484 void ReadFile(Linker::Reader& rd) override;
485
487 offset_t WriteFile(Linker::Writer& wr) const override;
488
489 void Dump(Dumper::Dumper& dump) const override;
490 };
491
492 /* Version 2 only */
494 {
495 public:
496 uint32_t CreationDate;
497 uint32_t ModificationDate;
498 uint32_t BackupDate;
499 uint32_t AccessDate;
500
502 uint32_t CreationDate = 0,
503 uint32_t ModificationDate = 0,
504 uint32_t BackupDate = 0,
505 uint32_t AccessDate = 0)
506 : Entry(AppleSingleDouble::ID_FileDatesInfo),
507 CreationDate(CreationDate), ModificationDate(ModificationDate), BackupDate(BackupDate), AccessDate(AccessDate)
508 {
509 }
510
511 offset_t ImageSize() const override;
512
513 void ReadFile(Linker::Reader& rd) override;
514
516 offset_t WriteFile(Linker::Writer& wr) const override;
517
518 void Dump(Dumper::Dumper& dump) const override;
519 };
520
522 {
523 public:
524 struct Point
525 {
526 uint16_t x, y;
527 };
528
529 char Type[4] = { '?', '?', '?', '?' };
530 char Creator[4] = { '?', '?', '?', '?' };
531 uint16_t Flags = 0;
532 Point Location = { 0, 0 };
533
534 FinderInfo()
535 : Entry(AppleSingleDouble::ID_FinderInfo)
536 {
537 }
538
539 offset_t ImageSize() const override;
540
541 void ReadFile(Linker::Reader& rd) override;
542
544 offset_t WriteFile(Linker::Writer& wr) const override;
545
546 void Dump(Dumper::Dumper& dump) const override;
547
548 void SetTypeAndCreator(std::string type, std::string creator);
549 };
550
551 /* Version 2 only */
553 {
554 public:
555 uint32_t Attributes;
556 MacintoshFileInfo(uint32_t Attributes = 0)
557 : Entry(AppleSingleDouble::ID_MacintoshFileInfo), Attributes(Attributes)
558 {
559 }
560
561 offset_t ImageSize() const override;
562
563 void ReadFile(Linker::Reader& rd) override;
564
566 offset_t WriteFile(Linker::Writer& wr) const override;
567
568 void Dump(Dumper::Dumper& dump) const override;
569 };
570
571 /* Version 2 only */
573 {
574 public:
575 uint16_t Access;
576 uint16_t FileType;
577 uint32_t AUXType;
578
579 ProDOSFileInfo(uint16_t Access = 0,
580 uint16_t FileType = 0,
581 uint32_t AUXType = 0)
582 : Entry(AppleSingleDouble::ID_ProDOSFileInfo), Access(Access), FileType(FileType), AUXType(AUXType)
583 {
584 }
585
586 offset_t ImageSize() const override;
587
588 void ReadFile(Linker::Reader& rd) override;
589
591 offset_t WriteFile(Linker::Writer& wr) const override;
592
593 void Dump(Dumper::Dumper& dump) const override;
594 };
595
596 /* Version 2 only */
598 {
599 public:
600 uint16_t Attributes;
601
602 MSDOSFileInfo(uint16_t Attributes = 0)
603 : Entry(AppleSingleDouble::ID_MSDOSFileInfo), Attributes(Attributes)
604 {
605 }
606
607 offset_t ImageSize() const override;
608
609 void ReadFile(Linker::Reader& rd) override;
610
612 offset_t WriteFile(Linker::Writer& wr) const override;
613
614 void Dump(Dumper::Dumper& dump) const override;
615 };
616
617 /* Version 2 only */
619 {
620 public:
622 : Entry(AppleSingleDouble::ID_AFPShortName)
623 {
624 }
625 /* TODO - this is a stub */
626
627 offset_t ImageSize() const override;
628
629 void ReadFile(Linker::Reader& rd) override;
630
632 offset_t WriteFile(Linker::Writer& wr) const override;
633
634 void Dump(Dumper::Dumper& dump) const override;
635 };
636
637 /* Version 2 only */
639 {
640 public:
642 : Entry(AppleSingleDouble::ID_AFPFileInfo)
643 {
644 }
645 /* TODO - this is a stub */
646
647 offset_t ImageSize() const override;
648
649 void ReadFile(Linker::Reader& rd) override;
650
652 offset_t WriteFile(Linker::Writer& wr) const override;
653
654 void Dump(Dumper::Dumper& dump) const override;
655 };
656
657 /* Version 2 only */
659 {
660 public:
662 : Entry(AppleSingleDouble::ID_AFPDirectoryID)
663 {
664 }
665 /* TODO - this is a stub */
666
667 offset_t ImageSize() const override;
668
669 void ReadFile(Linker::Reader& rd) override;
670
672 offset_t WriteFile(Linker::Writer& wr) const override;
673
674 void Dump(Dumper::Dumper& dump) const override;
675 };
676}
677
678#endif /* APPLE_H */
Definition apple.h:659
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1495
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1479
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1484
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1489
Definition apple.h:639
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1461
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1466
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1472
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1456
Definition apple.h:619
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1433
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1449
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1443
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1438
Definition apple.h:58
offset_t WriteFile(Linker::Writer &out) const override=0
Stores data in memory to file.
offset_t ImageSize() const override=0
Retrieves size of stored data.
void ReadFile(Linker::Reader &rd) override=0
Loads file into memory.
void Dump(Dumper::Dumper &dump) const override=0
Display file contents in a nice manner.
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:241
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:223
offset_t WriteFile(Linker::Writer &out) const override
Stores data in memory to file.
Definition apple.cc:228
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:218
AppleSingle & AppleDouble.
Definition apple.h:26
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:53
uint32_t GetModificationDate()
Retrieves modification date field and creates it if it does not exist.
Definition apple.cc:599
uint32_t GetCreationDate()
Retrieves creation date field and creates it if it does not exist.
Definition apple.cc:495
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:878
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:16
uint32_t ReadCreationDate()
Retrieves creation date field if it exists.
Definition apple.cc:530
uint32_t ReadMacintoshAttributes()
Retrieves Macintosh attributes field if it exists.
Definition apple.cc:744
uint32_t GetMacintoshAttributes()
Retrieves Macintosh attributes field and creates it if it does not exist.
Definition apple.cc:728
uint32_t ReadModificationDate()
Retrieves modification date field if it exists.
Definition apple.cc:640
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:857
Definition apple.h:320
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1095
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1111
offset_t WriteFile(Linker::Writer &out) const override
Stores data in memory to file.
Definition apple.cc:1105
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1100
Definition apple.h:241
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:955
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:980
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:950
offset_t WriteFile(Linker::Writer &out) const override
Stores data in memory to file.
Definition apple.cc:967
Definition apple.h:494
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1284
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1274
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1295
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1279
Definition apple.h:469
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1247
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1252
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1257
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1267
Definition apple.h:447
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1226
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1221
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1231
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1240
Definition apple.h:393
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1169
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1174
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1185
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1164
Definition apple.h:419
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1202
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1214
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1197
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1192
Definition apple.h:378
Definition apple.h:522
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1307
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1302
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1312
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1326
Definition apple.h:339
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1118
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1123
offset_t WriteFile(Linker::Writer &out) const override
Stores data in memory to file.
Definition apple.cc:1128
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1134
Definition apple.h:358
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1146
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1141
offset_t WriteFile(Linker::Writer &out) const override
Stores data in memory to file.
Definition apple.cc:1151
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1157
Definition apple.h:598
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1418
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1413
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1408
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1426
Definition apple.h:553
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1356
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1366
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1361
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1374
Definition apple.h:573
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1381
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1386
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1401
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1391
Definition apple.h:300
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1070
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1088
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1075
offset_t WriteFile(Linker::Writer &wr) const override
Stores data in memory to file.
Definition apple.cc:1080
Container for a resource fork.
Definition apple.h:272
offset_t WriteFile(Linker::Writer &out) const override
Stores data in memory to file.
Definition apple.cc:1029
std::shared_ptr< Linker::Contents > image
The actual resource image, for example Apple::MacintoshResourceFileFormat.
Definition apple.h:275
offset_t ImageSize() const override
Retrieves size of stored data.
Definition apple.cc:1008
void ReadFile(Linker::Reader &rd) override
Loads file into memory.
Definition apple.cc:1013
void Dump(Dumper::Dumper &dump) const override
Display file contents in a nice manner.
Definition apple.cc:1042
An abstract interface that separates structure and presentation of the data inside a file.
Definition dumper.h:828
A class to encode a general file format.
Definition format.h:29
offset_t WriteFile(Writer &wr) const override=0
Stores data in memory to file.
A helper class, encapsulating functionality needed to import binary data.
Definition reader.h:20
A helper class, encapsulating functionality needed to export binary data.
Definition writer.h:15
Definition apple.h:525