summaryrefslogtreecommitdiffhomepage
path: root/Kernel/CFKit/Property.hpp
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-07-28 16:11:46 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-07-28 16:11:46 +0000
commitc4023005e029ae092dad2689564c490580dd5c28 (patch)
tree3080ba07a6b552bf3d7591574cf69b2a3c8fd0fd /Kernel/CFKit/Property.hpp
parent8c8822fff78f9ff9cd640271da9b3634c4c2f97f (diff)
parent4db57a2d646b1538783a0675b38bada7a0f903ae (diff)
Merged in MHR-36 (pull request #17)
MHR-36
Diffstat (limited to 'Kernel/CFKit/Property.hpp')
-rw-r--r--Kernel/CFKit/Property.hpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/Kernel/CFKit/Property.hpp b/Kernel/CFKit/Property.hpp
index f75e7f95..519f486e 100644
--- a/Kernel/CFKit/Property.hpp
+++ b/Kernel/CFKit/Property.hpp
@@ -1,17 +1,19 @@
/* -------------------------------------------
- Copyright Zeta Electronics Corporation
+ Copyright ZKA Technologies
------------------------------------------- */
-#ifndef __INC_PLIST_HPP__
-#define __INC_PLIST_HPP__
+#ifndef __INC_PROPS_HPP__
+#define __INC_PROPS_HPP__
#include <NewKit/Array.hpp>
#include <NewKit/Defines.hpp>
#include <NewKit/Function.hpp>
#include <NewKit/String.hpp>
+#define cMaxPropLen 4096
+
namespace Kernel
{
/// @brief handle to anything (number, ptr, string...)
@@ -22,23 +24,24 @@ namespace Kernel
class Property
{
public:
- explicit Property(const StringView& sw);
+ Property() = default;
virtual ~Property();
public:
Property& operator=(const Property&) = default;
Property(const Property&) = default;
- bool StringEquals(StringView& name);
- const PropertyId& GetPropertyById();
+ bool StringEquals(StringView& name);
+ PropertyId& GetValue();
+ StringView& GetKey();
private:
- Ref<StringView> fName;
- PropertyId fAction;
+ StringView fName{cMaxPropLen};
+ PropertyId fAction{No};
};
template <SizeT N>
using PropertyArray = Array<Property, N>;
} // namespace Kernel
-#endif // !__INC_PLIST_HPP__
+#endif // !__INC_PROPS_HPP__