You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
840 B
C++
67 lines
840 B
C++
#include "StdAfx.h"
|
|
#include "ObjFactory.h"
|
|
#include "ObjCircle.h"
|
|
#include "ObjPline.h"
|
|
#include "ObjComposite.h"
|
|
#include "ObjPoint.h"
|
|
#include "ObjArc.h"
|
|
|
|
|
|
|
|
CObjFactory::CObjFactory(void)
|
|
{
|
|
}
|
|
CObjFactory::~CObjFactory(void)
|
|
{
|
|
}
|
|
CObjBase *CObjFactory::CreatObj(OBJ_TYPE type)
|
|
{
|
|
CObjBase *p = NULL;
|
|
switch(type)
|
|
{
|
|
case _TYPE_PLINE:
|
|
p = new CObjPline;
|
|
break;
|
|
case _TYPE_CIRCLE:
|
|
p = new CObjCircle;
|
|
break;
|
|
case _TYPE_COMPOSITE:
|
|
p = new CObjComposite;
|
|
break;
|
|
case _TYPE_POINT:
|
|
p = new CObjPoint;
|
|
break;
|
|
case _TYPE_ARC:
|
|
p = new CObjArc;
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return p;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|