구조 #pragma once #include #include #include class IComponent { public: virtual void Operation() = 0; }; class Composite : public IComponent { Composite() { } void Operation() override { for (IComponent* component : components_) { component->Operation(); } } void Add(IComponent* component) { components_.push_back(component); } private: std::vector components_; }; class Leaf : public IComponent { p..