summaryrefslogtreecommitdiffhomepage
path: root/Kernel/CFKit/Property.hpp
blob: 5c5aeb8fe50e4360cea7364e1387f87089bc0442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* -------------------------------------------

	Copyright Zeta Electronics Corporation

------------------------------------------- */

#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 NewOS
{
	/// @brief handle to anything (number, ptr, string...)
	using PropertyId = UIntPtr;

	/// @brief Kernel property class.
	/// @example \Properties\SmpCores or \Properties\KernelVersion
	class Property
	{
	public:
		explicit Property(const StringView& sw);
		virtual ~Property();

	public:
		Property& operator=(const Property&) = default;
		Property(const Property&)			 = default;

		bool			  StringEquals(StringView& name);
		const PropertyId& GetPropertyById();

	private:
		Ref<StringView> fName;
		PropertyId		fAction;
	};

	template <SizeT N>
	using PropertyArray = Array<Property, N>;
} // namespace NewOS

#endif // !__INC_PLIST_HPP__