#pragma once #include #include namespace Kernel::ACPI::AML { struct NamedObject : public AML::Node { BAN::RefPtr parent; NameSeg name; NamedObject(Node::Type type, NameSeg name) : Node(type), name(name) {} }; struct Name final : public AML::NamedObject { BAN::RefPtr object; Name(NameSeg name, BAN::RefPtr object) : NamedObject(Node::Type::Name, name), object(BAN::move(object)) {} BAN::RefPtr to_underlying() override { return object; } BAN::RefPtr convert(uint8_t mask) override { ASSERT(object); return object->convert(mask); } BAN::RefPtr store(BAN::RefPtr node) override { ASSERT(object); ASSERT(object->type != AML::Node::Type::Reference); return object->store(node); } static ParseResult parse(ParseContext& context); virtual void debug_print(int indent) const override; }; }