From 51a9de3af37eb8a6844a2dd5f3f568f3956726db Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sat, 24 Jun 2023 13:06:13 +1000 Subject: This is overkill --- source/core/StarDirectives.hpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'source/core/StarDirectives.hpp') diff --git a/source/core/StarDirectives.hpp b/source/core/StarDirectives.hpp index bc5b78d..924f295 100644 --- a/source/core/StarDirectives.hpp +++ b/source/core/StarDirectives.hpp @@ -12,10 +12,19 @@ STAR_EXCEPTION(DirectivesException, StarException); class NestedDirectives { public: struct Leaf { - List operations; - List strings; + struct Entry { + ImageOperation operation; + String string; + + bool operator==(Entry const& other) const; + bool operator!=(Entry const& other) const; + Entry(ImageOperation&& operation, String&& string); + }; + List entries; size_t length() const; + bool operator==(NestedDirectives::Leaf const& other) const; + bool operator!=(NestedDirectives::Leaf const& other) const; }; typedef function LeafCallback; @@ -51,7 +60,11 @@ public: void parseDirectivesIntoLeaf(String const& directives); bool empty() const; - void append(const NestedDirectives& other); + bool compare(NestedDirectives const& other) const; + void append(NestedDirectives const& other); + NestedDirectives& operator+=(NestedDirectives const& other); + bool operator==(NestedDirectives const& other) const; + bool operator!=(NestedDirectives const& other) const; const ConstBranch& branch() const; -- cgit v1.2.3