From eac37c6a45837f7ea717c9fed8cb21e2d5665618 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 31 Jan 2020 17:36:15 +0300 Subject: [xift] Working. --- src/tag.hpp | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'src/tag.hpp') diff --git a/src/tag.hpp b/src/tag.hpp index 469c4fd..75e5f59 100644 --- a/src/tag.hpp +++ b/src/tag.hpp @@ -4,39 +4,36 @@ #include "attribute.hpp" -class XiftTags { -public: - class Item: public XiftAttributes { - friend class XiftTags; - - Item(); - ~Item(); +struct XiftTag: public XiftAttributes { + XiftTag(); + ~XiftTag(); - bool MatchesForm(const Item & form) const; + bool MatchesForm(const XiftTag & form) const; - char *name; - int len; - int size; - }; + char *name; + int len; + int size; +}; +class XiftTags { +public: XiftTags(); ~XiftTags(); - Item &Tag(const char *name); - void Remove(const char *name); + XiftTag &Tag(const char *name); + void Remove(const char *name); -protected: - Item *Top(); - void Pop(); - Item *PopToBeDeleted(); - Item &New(); + XiftTag *Top(); + void Pop(); + XiftTag *PopToBeDeleted(); + XiftTag &New(); - bool ContainsMatchedForm(const Item &tag) const; + bool ContainsMatchedForm(const XiftTag &tag) const; private: struct Stack { - Stack *next; - Item *item; + Stack *next; + XiftTag *item; } *stack; }; -- cgit v1.2.3