Lab 1 Program C
Fork of mbed by
FileLike.h@11:1c1ebd0324fa, 2009-08-28 (annotated)
- Committer:
- rolf.meyer@arm.com
- Date:
- Fri Aug 28 12:10:11 2009 +0000
- Revision:
- 11:1c1ebd0324fa
- Parent:
- 9:cf0d45ce28a6
- Child:
- 27:7110ebee3484
A shiny new version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rolf.meyer@arm.com | 11:1c1ebd0324fa | 1 | /* mbed Microcontroller Library - FileLike |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 2 | * Copyright (c) 2008-2009 ARM Limited. All rights reserved. |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 3 | * sford |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 4 | */ |
rolf.meyer@arm.com | 11:1c1ebd0324fa | 5 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 6 | #ifndef MBED_FILELIKE_H |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 7 | #define MBED_FILELIKE_H |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 8 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 9 | #include "Base.h" |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 10 | #include "FileHandle.h" |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 11 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 12 | namespace mbed { |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 13 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 14 | /* Class FileLike |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 15 | * A file-like object is one that can be opened with fopen by |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 16 | * fopen("/name", mode). It is intersection of the classes Base and |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 17 | * FileHandle. |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 18 | */ |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 19 | class FileLike : public Base, public FileHandle { |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 20 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 21 | public: |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 22 | /* Constructor FileLike |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 23 | * |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 24 | * Variables |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 25 | * name - The name to use to open the file. |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 26 | */ |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 27 | FileLike(const char *name) : Base(name) { } |
simon.ford@mbed.co.uk | 9:cf0d45ce28a6 | 28 | virtual ~FileLike(); |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 29 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 30 | }; |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 31 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 32 | } // namespace mbed |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 33 | |
simon.ford@mbed.co.uk | 4:5d1359a283bc | 34 | #endif |