132 lines
2.2 KiB
C++
132 lines
2.2 KiB
C++
#include "stdafx.h"
|
|
#include "TMakeObjAssocMsg.h"
|
|
|
|
#ifdef _DEBUG
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[]=__FILE__;
|
|
#define new DEBUG_NEW
|
|
#endif
|
|
|
|
TMakeObjAssocMsg::TMakeObjAssocMsg()
|
|
{
|
|
m_eOper = TDb::eUnknowOper;
|
|
m_nRes = 0;
|
|
m_pDb = 0;
|
|
m_idOperateOn.setNull();
|
|
}
|
|
|
|
TMakeObjAssocMsg::TMakeObjAssocMsg(const TMakeObjAssocMsg& iMsg)
|
|
{
|
|
m_eOper = iMsg.m_eOper;
|
|
m_nRes = iMsg.m_nRes;
|
|
m_pDb = iMsg.m_pDb;
|
|
m_idOperateOn = iMsg.m_idOperateOn;
|
|
}
|
|
|
|
TMakeObjAssocMsg::~TMakeObjAssocMsg()
|
|
{
|
|
|
|
}
|
|
|
|
void TMakeObjAssocMsg::SetInterObjOper(TDb::InterObjOper eOper,int nRes)
|
|
{
|
|
m_eOper = eOper;
|
|
m_nRes = nRes;
|
|
}
|
|
|
|
TDb::InterObjOper TMakeObjAssocMsg::GetInterObjOper()
|
|
{
|
|
return m_eOper;
|
|
}
|
|
|
|
int TMakeObjAssocMsg::GetInterObjOperRes()
|
|
{
|
|
return m_nRes;
|
|
}
|
|
|
|
TDb::InterObjOper TMakeObjAssocMsg::GetInterObjOper() const
|
|
{
|
|
return m_eOper;
|
|
}
|
|
|
|
int TMakeObjAssocMsg::GetInterObjOperRes() const
|
|
{
|
|
return m_nRes;
|
|
}
|
|
|
|
void TMakeObjAssocMsg::SetObject(const AcDbDatabase* pDb,const AcDbObject* pObj)
|
|
{
|
|
m_idOperateOn = pObj->id();
|
|
m_pDb = (DWORD_PTR)pDb;
|
|
}
|
|
|
|
AcDbObjectId TMakeObjAssocMsg::GetMsgOperateOn()
|
|
{
|
|
return m_idOperateOn;
|
|
}
|
|
|
|
AcDbDatabase* TMakeObjAssocMsg::GetDb()
|
|
{
|
|
return (AcDbDatabase*)m_pDb;
|
|
}
|
|
|
|
AcDbObjectId TMakeObjAssocMsg::GetMsgOperateOn() const
|
|
{
|
|
return m_idOperateOn;
|
|
}
|
|
|
|
AcDbDatabase* TMakeObjAssocMsg::GetDb() const
|
|
{
|
|
return (AcDbDatabase*)m_pDb;
|
|
}
|
|
|
|
TMakeObjAssocMsg& TMakeObjAssocMsg::operator = (const TMakeObjAssocMsg& iMsg)
|
|
{
|
|
if (this != &iMsg)
|
|
{
|
|
m_eOper = iMsg.m_eOper;
|
|
m_nRes = iMsg.m_nRes;
|
|
m_pDb = iMsg.m_pDb;
|
|
m_idOperateOn = iMsg.m_idOperateOn;
|
|
}
|
|
return *this;
|
|
}
|
|
|
|
TMakeObjAssocMsgs::TMakeObjAssocMsgs()
|
|
{
|
|
}
|
|
|
|
TMakeObjAssocMsgs::~TMakeObjAssocMsgs()
|
|
{
|
|
}
|
|
|
|
int TMakeObjAssocMsgs::append( const TMakeObjAssocMsg& value )
|
|
{
|
|
return (int)m_arObjAssocMsgs.Add(value);
|
|
}
|
|
|
|
TMakeObjAssocMsg TMakeObjAssocMsgs::at(int index) const
|
|
{
|
|
return m_arObjAssocMsgs.GetAt(index);
|
|
}
|
|
|
|
int TMakeObjAssocMsgs::length() const
|
|
{
|
|
return (int)m_arObjAssocMsgs.GetSize();
|
|
}
|
|
|
|
void TMakeObjAssocMsgs::removeAt(int iIndex)
|
|
{
|
|
m_arObjAssocMsgs.RemoveAt(iIndex);
|
|
}
|
|
|
|
TMakeObjAssocMsg TMakeObjAssocMsgs::operator[](int nIndex) const
|
|
{
|
|
return m_arObjAssocMsgs[nIndex];
|
|
}
|
|
|
|
TMakeObjAssocMsg& TMakeObjAssocMsgs::operator[](int nIndex)
|
|
{
|
|
return m_arObjAssocMsgs[nIndex];
|
|
}
|