diff options
Diffstat (limited to 'dev/kernel/KernelKit')
| -rw-r--r-- | dev/kernel/KernelKit/DebugOutput.h | 12 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/DeviceMgr.h | 24 |
2 files changed, 18 insertions, 18 deletions
diff --git a/dev/kernel/KernelKit/DebugOutput.h b/dev/kernel/KernelKit/DebugOutput.h index 9598f590..de3bc997 100644 --- a/dev/kernel/KernelKit/DebugOutput.h +++ b/dev/kernel/KernelKit/DebugOutput.h @@ -37,9 +37,9 @@ inline TerminalDevice hex_number(const Long& x); // @brief Emulates a VT100 terminal. class TerminalDevice final NE_DEVICE<const Char*> { public: - TerminalDevice(void (*print)(IDeviceObject*, const Char*), - void (*gets)(IDeviceObject*, const Char*)) - : IDeviceObject<const Char*>(print, gets) {} + TerminalDevice(void (*print)(DeviceInterface*, const Char*), + void (*gets)(DeviceInterface*, const Char*)) + : DeviceInterface<const Char*>(print, gets) {} ~TerminalDevice() override; @@ -54,9 +54,9 @@ class TerminalDevice final NE_DEVICE<const Char*> { class Utf8TerminalDevice final NE_DEVICE<const Utf8Char*> { public: - Utf8TerminalDevice(void (*print)(IDeviceObject*, const Utf8Char*), - void (*gets)(IDeviceObject*, const Utf8Char*)) - : IDeviceObject<const Utf8Char*>(print, gets) {} + Utf8TerminalDevice(void (*print)(DeviceInterface*, const Utf8Char*), + void (*gets)(DeviceInterface*, const Utf8Char*)) + : DeviceInterface<const Utf8Char*>(print, gets) {} ~Utf8TerminalDevice() override; diff --git a/dev/kernel/KernelKit/DeviceMgr.h b/dev/kernel/KernelKit/DeviceMgr.h index 0a21710d..d82b43dc 100644 --- a/dev/kernel/KernelKit/DeviceMgr.h +++ b/dev/kernel/KernelKit/DeviceMgr.h @@ -24,13 +24,13 @@ #define kDeviceMgrRootDirPath "/devices/" -#define NE_DEVICE : public ::Kernel::IDeviceObject +#define NE_DEVICE : public ::Kernel::DeviceInterface // Last Rev: Wed, May 27, 2025 6:22 PM namespace Kernel { template <typename T> -class IDeviceObject; +class DeviceInterface; template <typename T> class IOBuf; @@ -39,26 +39,26 @@ class IOBuf; /// @brief Device contract interface, represents an HW device. /***********************************************************************************/ template <typename T> -class IDeviceObject { +class DeviceInterface { public: - IDeviceObject() = default; + DeviceInterface() = default; - explicit IDeviceObject(void (*Out)(IDeviceObject<T>*, T), void (*In)(IDeviceObject<T>*, T)) + explicit DeviceInterface(void (*Out)(DeviceInterface<T>*, T), void (*In)(DeviceInterface<T>*, T)) : fOut(Out), fIn(In) {} - virtual ~IDeviceObject() = default; + virtual ~DeviceInterface() = default; public: - IDeviceObject& operator=(const IDeviceObject<T>&) = default; - IDeviceObject(const IDeviceObject<T>&) = default; + DeviceInterface& operator=(const DeviceInterface<T>&) = default; + DeviceInterface(const DeviceInterface<T>&) = default; public: - virtual IDeviceObject<T>& operator<<(T Data) { + virtual DeviceInterface<T>& operator<<(T Data) { fOut(this, Data); return *this; } - virtual IDeviceObject<T>& operator>>(T Data) { + virtual DeviceInterface<T>& operator>>(T Data) { fIn(this, Data); return *this; } @@ -70,8 +70,8 @@ class IDeviceObject { Bool operator!() { return !fOut || !fIn; } protected: - Void (*fOut)(IDeviceObject<T>*, T Data) = {nullptr}; - Void (*fIn)(IDeviceObject<T>*, T Data) = {nullptr}; + Void (*fOut)(DeviceInterface<T>*, T Data) = {nullptr}; + Void (*fIn)(DeviceInterface<T>*, T Data) = {nullptr}; }; /// |
