--- nono/lib/object.h 2026/04/29 17:04:31 1.1.1.2 +++ nono/lib/object.h 2026/04/29 17:04:37 1.1.1.4 @@ -1,11 +1,11 @@ // // nono -// Copyright (C) 2018 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // #pragma once -#include "header.h" #include "textscreen.h" #include @@ -14,11 +14,11 @@ // // ログ出力機能を持つ。 // -class Object +class Object : public IMonitor { public: Object(); - virtual ~Object(); + virtual ~Object() override; // // ログ @@ -72,20 +72,16 @@ class Object // デバイス名(デバッグ表示用) // XXX オブジェクトなのにデバイス名とは一体... - const char *devname = NULL; + std::string devname; // // モニター // // モニター更新 (派生クラス側で用意) - // 戻り値はモニタースクリーンの有無。 - // 基底クラスのこれはモニタースクリーンを提供していないので false を返す。 - // 派生クラス側のは必ず true を返すこと。 - virtual bool MonitorUpdate(); - - // モニター用のテキストスクリーン - TextScreen monitor; + void MonitorUpdate(TextScreen&) override { } + nnSize GetMonitorSize() override { return monitor_size; } + nnSize monitor_size {}; }; // 全オブジェクトのリスト