#ifndef __NewFDObjAny_h
#define __NewFDObjAny_h

#include "2ObjArc.h"
#include "2ObjChipMaster.h"
#include "2ObjGroup.h"
#include "2ObjLine.h"
#include "2ObjOle.h"
#include "2ObjPoly.h"
#include "2ObjPoint.h"
#include "2ObjRect.h"
#include "2ObjRoundRect.h"
#include "2ObjWidePoly.h"

inline MC2ObjBase* NewFDObjAny (FTObjectType nType)
{
	switch (nType)
	{
	case FDOJ_LINE:
		return new MC2ObjLine();
	case FDOJ_RECT:
		return new MC2ObjRect();
	case FDOJ_ROUND_RECT:
		return new MC2ObjRoundRect();
	case FDOJ_ARC:
		return new MC2ObjArc();
	case FDOJ_POLY:
		return new MC2ObjPoly();
	case FDOJ_GROUP:
		return new MC2ObjGroup();
	case FDOJ_WIDE_POLY:
		return new MC2ObjWidePoly();
	case FDOJ_OLE:
		return new MC2ObjOle();
	case FDOJ_CHIP_MASTER:
		return new MC2ObjChipMaster();
	case FDOJ_POINT:
		return new MC2ObjPoint();
	}
	return NULL;
}

#endif//__NewFDObjAny_h
