diff options
Diffstat (limited to 'plugins/IEView/src/Template.h')
-rw-r--r-- | plugins/IEView/src/Template.h | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/plugins/IEView/src/Template.h b/plugins/IEView/src/Template.h index 18ebf40c52..87117c0a45 100644 --- a/plugins/IEView/src/Template.h +++ b/plugins/IEView/src/Template.h @@ -74,34 +74,39 @@ public: void setNext(Token *);
};
-class Template {
-private:
- char *name;
- char *text;
- Template *next;
- Token *tokens;
+class Template
+{
+ char *m_name;
+ char *m_text;
+ Template *m_next;
+ Token *m_tokens;
+
protected:
friend class TemplateMap;
- bool equals(const char *name);
- void tokenize();
- Template * getNext();
+ bool equals(const char *name);
+ void tokenize();
+
Template(const char *name, const char *text);
+
public:
~Template();
- const char *getText();
- const char *getName();
- Token *getTokens();
+
+ __forceinline Template* getNext() { return m_next; }
+ __forceinline const char* getText() const { return m_text; }
+ __forceinline const char* getName() const { return m_name; }
+ __forceinline Token* getTokens() const { return m_tokens; }
};
-class TemplateMap {
-private:
- static TemplateMap *mapList;
- char *name;
- char *filename;
- bool grouping;
- bool rtl;
- Template *entries;
- TemplateMap *next;
+class TemplateMap
+{
+ static TemplateMap *m_mapList;
+ char *m_name;
+ char *m_filename;
+ bool m_grouping;
+ bool m_rtl;
+ Template *m_entries;
+ TemplateMap *m_next;
+
TemplateMap(const char *name);
void addTemplate(const char *name, const char *text);
void setFilename(const char *filename);
@@ -109,6 +114,7 @@ private: static TemplateMap* add(const char *id, const char *filename);
static void appendText(char **str, int *sizeAlloced, const char *fmt, ...);
static TemplateMap* loadTemplateFile(const char *proto, const char *filename, bool onlyInfo);
+
public:
~TemplateMap();
static Template* getTemplate(const char *id, const char *name);
@@ -116,9 +122,11 @@ public: static TemplateMap* loadTemplates(const char *id, const char *filename, bool onlyInfo);
static void dropTemplates();
Template* getTemplate(const char *text);
- const char* getFilename();
- bool isGrouping();
- bool isRTL();
+
+ __forceinline const char* getFilename() { return m_filename; }
+
+ __forceinline bool isGrouping() const { return m_grouping; }
+ __forceinline bool isRTL() const { return m_rtl; }
};
|