diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-22 06:07:59 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-04-22 06:07:59 +1000 |
commit | ca1426eabc873f781eb0dd389d45634b7d183250 (patch) | |
tree | 15ea83658ca3824232f14fe4b32ec714e0aa05c6 /source/core/StarDirectives.hpp | |
parent | d5f5fb5ddf0d4a9f0b0e6ac012121926d2fcd949 (diff) |
Lua chat callbacks + better font styling
golly gee whiz!! i hope i didn't fuck something up
Diffstat (limited to 'source/core/StarDirectives.hpp')
-rw-r--r-- | source/core/StarDirectives.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source/core/StarDirectives.hpp b/source/core/StarDirectives.hpp index e272915..fa10a33 100644 --- a/source/core/StarDirectives.hpp +++ b/source/core/StarDirectives.hpp @@ -36,6 +36,7 @@ public: mutable Mutex mutex; bool empty() const; + Shared(); Shared(List<Entry>&& givenEntries, String&& givenString, StringView givenPrefix); }; @@ -65,6 +66,9 @@ public: bool empty() const; operator bool() const; + Shared const& operator*() const; + Shared const* operator->() const; + bool equals(Directives const& other) const; bool equals(String const& string) const; @@ -78,7 +82,7 @@ public: //friend bool operator==(Directives const& directives, String const& string); //friend bool operator==(String const& string, Directives const& directives); - std::shared_ptr<Shared const> shared; + std::shared_ptr<Shared const> m_shared; }; class DirectivesGroup { @@ -122,7 +126,6 @@ private: size_t m_count; }; - template <> struct hash<DirectivesGroup> { size_t operator()(DirectivesGroup const& s) const; @@ -130,4 +133,13 @@ struct hash<DirectivesGroup> { typedef DirectivesGroup ImageDirectives; +inline Directives::Shared const& Directives::operator*() const { + return *m_shared; +} +inline Directives::Shared const* Directives::operator->() const { + if (!m_shared) + throw DirectivesException("Directives::operator-> nullptr"); + return m_shared.get(); +} + } |