pImpl (1) 썸네일형 리스트형 항목 31 : 파일사이의 컴파일 의존성을 줄이자 인터페이스와 구현의 분리 c++ 의 class definiton 는 클래스 인터페이스 + 구현 세부사항까지 지정 할 수 있어서 c++ 은 인터페이스와 구현을 깔끔하게 분리하기 힘들다. 예를 들어 아래 코드처럼 Person 구현의 세부사항에 속하는 Date, Address 정의된 정보를 가져오기 위해 "date.h", "address.h" 들을 물어와야 한다. #include #include "date.h" #include "address.h" class Person { public: Person(const Date& birthday, const Address& addr); private : std::string name; Date theBirthDate; //구현 세부사항 Address theAddres.. 이전 1 다음