- Gof/Composite . . . . 9 matches
CompositeEquipment 는 다른 equipment를 포함하는 equipment의 기본클래스이다. 이는 또한 Equipment 의 서브클래스이다.
class CompositeEquipment : public Equipment {
virtual ~CompositeEquipment ();
CompositeEquipment (const char*);
CompositeEquipment 는 sub-equipment 에 접근하고 관리하기 위한 명령들을 정의한다. 이 명령들인 Add 와 Remove는 _equipment 멤버에 저장된 equipment 의 리스트로부터 equipment 를 추가하거나 삭제한다. CreateIterator 명령은 이 리스트들을 탐색할 수 있는 iterator(구체적으로 ListIterator의 인스턴스) 를 리턴한다.
Currency CompositeEquipment::NetPrice () {
자, 우리는 컴퓨터 섀시를 Chassis 라 불리는 CompositeEquipment의 서브클래스로서 표현할 수 있다. Chassis는 CompositeEquipment로부터 자식-관련 명령어들을 상속받는다.
class Chassis : public CompositeEquipment {
Found 1 matching page out of 7555 total pages (5000 pages are searched)
You can also click here to search title.