|
갑자기 복사생성자의 방법이 생각이 안나서 이렇게 글 씁니다.
class GraphicsPath1 : public GrapihcsPath
{
GraphicsPath1();
GraphicsPath1(const GraphicsPath1&);
~GraphicsPath1();
GraphicsPath1* Clone();
};
GraphicsPath1::GraphicsPath1(const GraphicsPath1&)
{
// GraphicsPath1 속성 전달
// ?? 상속한 GraphicsPath의 내용은 어떻게 복사하지요?
}
GraphicsPath1* GraphicsPath1::Clone()
{
return new GraphicsPath1(*this);
}
대충 이렇게 되었을때, GraphicsPath를 상속받아서 사용하는데, GraphicsPath의 Clone을 하지 못하네요
그래서 전달이 잘 안되는데, 어떻게 하면 상속한 GraphicsPath 내용도 Clone할 수 있는지요..
|