From f3d931aa7cfaf96baef8383b59a8938779541ee7 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 15 Aug 2024 18:35:34 +0200 Subject: [IMP] Moved source code into dev/ folder. Signed-off-by: Amlal EL Mahrouss --- dev/Kernel/CFKit/Property.hxx | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 dev/Kernel/CFKit/Property.hxx (limited to 'dev/Kernel/CFKit/Property.hxx') diff --git a/dev/Kernel/CFKit/Property.hxx b/dev/Kernel/CFKit/Property.hxx new file mode 100644 index 00000000..602c061f --- /dev/null +++ b/dev/Kernel/CFKit/Property.hxx @@ -0,0 +1,47 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#ifndef __INC_PROPS_HPP__ +#define __INC_PROPS_HPP__ + +#include +#include +#include +#include + +#define cMaxPropLen 4096 + +namespace Kernel +{ + /// @brief handle to anything (number, ptr, string...) + using PropertyId = UIntPtr; + + /// @brief Kernel property class. + /// @example \Properties\SmpCores or \Properties\KernelVersion + class Property + { + public: + Property() = default; + virtual ~Property(); + + public: + Property& operator=(const Property&) = default; + Property(const Property&) = default; + + bool StringEquals(StringView& name); + PropertyId& GetValue(); + StringView& GetKey(); + + private: + StringView fName{cMaxPropLen}; + PropertyId fAction{No}; + }; + + template + using PropertyArray = Array; +} // namespace Kernel + +#endif // !__INC_PROPS_HPP__ -- cgit v1.2.3