summaryrefslogtreecommitdiffhomepage
path: root/Kernel/CFKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-07-13 00:20:21 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-07-13 00:20:21 +0200
commitbc7870aea4c437e1a80b779eb7a968d55733d24c (patch)
tree7998fe2f1ef8d3bdf8d37a0b2b2600143bc285ed /Kernel/CFKit
parent710ce66beaba3bee7289047406ef794c258143e6 (diff)
[IMP] Kernel properties (such as \KernelVersion)
[REFACTOR] Rename KernelHeap to just Heap. [FIX] Scheduler's way of checking boundaries was not correct. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/CFKit')
-rw-r--r--Kernel/CFKit/Property.hpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/Kernel/CFKit/Property.hpp b/Kernel/CFKit/Property.hpp
index bf6ce770..519f486e 100644
--- a/Kernel/CFKit/Property.hpp
+++ b/Kernel/CFKit/Property.hpp
@@ -4,14 +4,16 @@
------------------------------------------- */
-#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__