Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
fonts/EAFontCache.h@7:6cf21b018420, 2010-11-01 (annotated)
- Committer:
- richardparker
- Date:
- Mon Nov 01 13:07:40 2010 +0000
- Revision:
- 7:6cf21b018420
Embedded Artists LCD panel:- Version 0.7
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| richardparker | 7:6cf21b018420 | 1 | // Copyright 2010 Richard Parker |
| richardparker | 7:6cf21b018420 | 2 | |
| richardparker | 7:6cf21b018420 | 3 | #ifndef MBED_EAFONTCACHE_H |
| richardparker | 7:6cf21b018420 | 4 | #define MBED_EAFONTCACHE_H |
| richardparker | 7:6cf21b018420 | 5 | |
| richardparker | 7:6cf21b018420 | 6 | #include "mbed.h" |
| richardparker | 7:6cf21b018420 | 7 | #include <string> |
| richardparker | 7:6cf21b018420 | 8 | #include <vector> |
| richardparker | 7:6cf21b018420 | 9 | |
| richardparker | 7:6cf21b018420 | 10 | #include "EAFontCacheEntry.h" |
| richardparker | 7:6cf21b018420 | 11 | |
| richardparker | 7:6cf21b018420 | 12 | /** |
| richardparker | 7:6cf21b018420 | 13 | * Class to handle the font cache for the EA LCD. |
| richardparker | 7:6cf21b018420 | 14 | * @author Richard Parker |
| richardparker | 7:6cf21b018420 | 15 | */ |
| richardparker | 7:6cf21b018420 | 16 | class EAFontCache |
| richardparker | 7:6cf21b018420 | 17 | { |
| richardparker | 7:6cf21b018420 | 18 | public: |
| richardparker | 7:6cf21b018420 | 19 | static EAFontCache& instance(); |
| richardparker | 7:6cf21b018420 | 20 | |
| richardparker | 7:6cf21b018420 | 21 | EAFontCacheEntry* getCharacters(const std::string& path); |
| richardparker | 7:6cf21b018420 | 22 | void returnCharacters(EAFontCacheEntry* entry); |
| richardparker | 7:6cf21b018420 | 23 | |
| richardparker | 7:6cf21b018420 | 24 | private: |
| richardparker | 7:6cf21b018420 | 25 | std::vector<EAFontCacheEntry*> _entries; |
| richardparker | 7:6cf21b018420 | 26 | |
| richardparker | 7:6cf21b018420 | 27 | EAFontCache(); |
| richardparker | 7:6cf21b018420 | 28 | ~EAFontCache(); |
| richardparker | 7:6cf21b018420 | 29 | |
| richardparker | 7:6cf21b018420 | 30 | EAFontCache(const EAFontCache&); // intentionally undefined |
| richardparker | 7:6cf21b018420 | 31 | EAFontCache& operator=(const EAFontCache&); // intentionally undefined |
| richardparker | 7:6cf21b018420 | 32 | |
| richardparker | 7:6cf21b018420 | 33 | void _clearCacheEntries(); |
| richardparker | 7:6cf21b018420 | 34 | void _deleteCacheEntry(EAFontCacheEntry* entry); |
| richardparker | 7:6cf21b018420 | 35 | EAFontCacheEntry* _createCacheEntry(); |
| richardparker | 7:6cf21b018420 | 36 | |
| richardparker | 7:6cf21b018420 | 37 | }; |
| richardparker | 7:6cf21b018420 | 38 | |
| richardparker | 7:6cf21b018420 | 39 | #endif |