TagBuilder: add method HasType()
This commit is contained in:
parent
2fb61534a1
commit
074a23e6b4
@ -74,6 +74,16 @@ TagBuilder::Commit()
|
||||
return tag;
|
||||
}
|
||||
|
||||
bool
|
||||
TagBuilder::HasType(TagType type) const
|
||||
{
|
||||
for (auto i : items)
|
||||
if (i->type == type)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
inline void
|
||||
TagBuilder::AddItemInternal(TagType type, const char *value, size_t length)
|
||||
{
|
||||
|
@ -108,6 +108,13 @@ public:
|
||||
items.reserve(n);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the tag contains one or more items with
|
||||
* the specified type.
|
||||
*/
|
||||
gcc_pure
|
||||
bool HasType(TagType type) const;
|
||||
|
||||
/**
|
||||
* Appends a new tag item.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user