Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarDirectives.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-24 13:06:13 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-24 13:06:13 +1000
commit51a9de3af37eb8a6844a2dd5f3f568f3956726db (patch)
tree66500bbc587a585bfd5490f916239a02d5859769 /source/core/StarDirectives.hpp
parent2798d4bf668d74028b5c1f88ae5b7b25cd08de2d (diff)
This is overkill
Diffstat (limited to 'source/core/StarDirectives.hpp')
-rw-r--r--source/core/StarDirectives.hpp19
1 files changed, 16 insertions, 3 deletions
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<ImageOperation> operations;
- List<String> 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<Entry> entries;
size_t length() const;
+ bool operator==(NestedDirectives::Leaf const& other) const;
+ bool operator!=(NestedDirectives::Leaf const& other) const;
};
typedef function<void(Leaf const&)> 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;