#pragma once
#include "McDbEntity.h"
class McDbProxyEntityImp;
class McGiWorldDraw;
class McDbDwgFiler;
class ARXDLL McDbProxyEntity : public McDbEntity
{
public:
	MCDB_DECLARE_MEMBERS(McDbProxyEntity);
	McDbProxyEntity(void);
	virtual ~McDbProxyEntity(void);

	enum  {kNoOperation                = 0,
		kEraseAllowed               = 0x1,
		kTransformAllowed           = 0x2,
		kColorChangeAllowed         = 0x4,
		kLayerChangeAllowed         = 0x8,
		kLinetypeChangeAllowed      = 0x10,
		kLinetypeScaleChangeAllowed = 0x20,
		kVisibilityChangeAllowed    = 0x40,
		kCloningAllowed             = 0x80,
		kLineWeightChangeAllowed    = 0x100,
		kPlotStyleNameChangeAllowed = 0x200,
		kAllButCloningAllowed       = 0x37F,
		kAllAllowedBits             = 0xBFF,
		kDisableProxyWarning        = 0x400,
		kMaterialChangeAllowed      = 0x800,
	};

	//:Ignore

	virtual Mdesk::Boolean    worldDraw       (McGiWorldDraw * wd);

	virtual Mcad::ErrorStatus dwgInFields (McDbDwgFiler* pFiler);

	virtual Mcad::ErrorStatus dwgOutFields(McDbDwgFiler* pFiler) const;

	Mcad::ErrorStatus   explode(McDbVoidPtrArray& entitySet) const override;

	virtual Mcad::ErrorStatus   getGeomExtents(McDbExtents& extents, bool roughCalculation = true) const;


	Mcad::ErrorStatus setSubEntityColor(const McCmColor& color);

	virtual Mcad::ErrorStatus   transformBy(const McGeMatrix3d& xform);

protected:
	virtual void*        GetInnerListId() const;

	virtual void         SetInnerListId(void*);

public:

	inline McDbProxyEntityImp* getProxyEntityImp() const {
		return (McDbProxyEntityImp*)m_pImp;
	}
};
