summaryrefslogtreecommitdiff
path: root/src/attribute.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/attribute.hpp')
-rw-r--r--src/attribute.hpp47
1 files changed, 22 insertions, 25 deletions
diff --git a/src/attribute.hpp b/src/attribute.hpp
index d54d5a3..d3323a4 100644
--- a/src/attribute.hpp
+++ b/src/attribute.hpp
@@ -2,44 +2,41 @@
#define XIFT_INCLUDED_ATTRIBUTE
-class XiftAttributes {
-public:
- class Attr {
- friend class XiftAttributes;
-
- Attr();
- ~Attr();
+struct XiftAttribute {
+ XiftAttribute();
+ ~XiftAttribute();
- bool MatchesForm(const Attr &form) const;
+ bool MatchesForm(const XiftAttribute &form) const;
- char *name;
- int nlen;
- int nsize;
- char *value;
- int vlen;
- int vsize;
+ char *name;
+ int nlen;
+ int nsize;
+ char *value;
+ int vlen;
+ int vsize;
- char value_quota;
- };
+ char value_quota;
+};
+class XiftAttributes {
+public:
XiftAttributes();
~XiftAttributes();
- Attr &Attribute(const char *name);
- void Remove(const char *name);
+ XiftAttribute &Attribute(const char *name);
+ void Remove(const char *name);
-protected:
- Attr *Top();
- void Pop();
- Attr &New();
+ XiftAttribute *Top();
+ void Pop();
+ XiftAttribute &New();
- bool ContainsMatchedForm(const Attr &attribute) const;
+ bool ContainsMatchedForm(const XiftAttribute &attribute) const;
bool MatchesForm(const XiftAttributes &form) const;
private:
struct Stack {
- Stack *next;
- Attr item;
+ Stack *next;
+ XiftAttribute item;
} *stack;
};