summaryrefslogtreecommitdiffhomepage
path: root/CFKit/Property.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-01-06 09:14:11 +0100
commit5339d016c07bf717ee388f4feb73544087324af0 (patch)
tree94be6f67ed626091f24aee24ec3b3be03d01e4e7 /CFKit/Property.hpp
git: port from mercurial repo.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'CFKit/Property.hpp')
-rw-r--r--CFKit/Property.hpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/CFKit/Property.hpp b/CFKit/Property.hpp
new file mode 100644
index 00000000..855f5469
--- /dev/null
+++ b/CFKit/Property.hpp
@@ -0,0 +1,46 @@
+/*
+ * ========================================================
+ *
+ * hCore
+ * Copyright Mahrouss Logic, all rights reserved.
+ *
+ * ========================================================
+ */
+
+#ifndef _INC_PLIST_HPP__
+#define _INC_PLIST_HPP__
+
+#include <NewKit/Array.hpp>
+#include <NewKit/Defines.hpp>
+#include <NewKit/Function.hpp>
+#include <NewKit/String.hpp>
+
+namespace hCore
+{
+ using PropertyId = Int;
+
+ class Property
+ {
+ public:
+ explicit Property(const StringView &sw)
+ : m_sName(sw) {}
+
+ virtual ~Property() = default;
+
+ public:
+ Property &operator=(const Property &) = default;
+ Property(const Property &) = default;
+
+ bool StringEquals(StringView &name);
+ const PropertyId &GetPropertyById();
+
+ private:
+ Ref<StringView> m_sName;
+ PropertyId m_Action;
+
+ };
+
+ template<SSizeT N> using PropertyArray = Array<Property, N>;
+} // namespace hCore
+
+#endif // !_INC_PLIST_HPP__