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.
Diff: fonts/EAFontCache.h
- Revision:
- 7:6cf21b018420
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fonts/EAFontCache.h	Mon Nov 01 13:07:40 2010 +0000
@@ -0,0 +1,39 @@
+// Copyright 2010 Richard Parker
+
+#ifndef MBED_EAFONTCACHE_H
+#define MBED_EAFONTCACHE_H
+
+#include "mbed.h"
+#include <string>
+#include <vector>
+
+#include "EAFontCacheEntry.h"
+
+/**
+ * Class to handle the font cache for the EA LCD.
+ * @author Richard Parker
+ */
+class EAFontCache
+{
+public:    
+    static EAFontCache& instance();
+    
+    EAFontCacheEntry* getCharacters(const std::string& path);
+    void returnCharacters(EAFontCacheEntry* entry);
+    
+private:
+    std::vector<EAFontCacheEntry*> _entries;
+
+    EAFontCache();   
+    ~EAFontCache();
+
+    EAFontCache(const EAFontCache&);             // intentionally undefined
+    EAFontCache& operator=(const EAFontCache&);  // intentionally undefined
+
+    void _clearCacheEntries();
+    void _deleteCacheEntry(EAFontCacheEntry* entry);
+    EAFontCacheEntry* _createCacheEntry();
+    
+};
+
+#endif
\ No newline at end of file