778 lines
17 KiB
C++
778 lines
17 KiB
C++
//------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2011, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TDbStruEntityBase类
|
|
// = Version : ver1.0
|
|
// = Author : CET
|
|
// = CreateDate : 2011-04-25
|
|
// = Description: 抽象墙基线类实现
|
|
// = Maintainers:
|
|
//
|
|
//------------------------------------------------------------------------+
|
|
|
|
#include "stdafx.h"
|
|
#ifdef TASD
|
|
#include "TDbStruEntityBase.h"
|
|
#include "TAsdKeyDefine.h"
|
|
#include "TBaseWallIntegrateTool.h"
|
|
#include "TAsdGlobleDef.h"
|
|
|
|
|
|
ACRX_NO_CONS_DEFINE_MEMBERS(TDbStruEntityBase, TDbCurveEntity);
|
|
//ACRX_DXF_DEFINE_MEMBERS(ATSStruEntityBase, ATSCurveEntity, AcDb::kDHL_CURRENT,
|
|
// AcDb::kMReleaseCurrent, 1, TCH_STRUENTITYBASE,
|
|
// "图形无法解析, 请下载上华软件|网址: www.shanghuasoft.com");
|
|
TCH_IMPLEMENT_MEMBERS(TDbStruEntityBase, TDbCurveEntity);
|
|
|
|
|
|
TDbStruEntityBase::TDbStruEntityBase()
|
|
{
|
|
|
|
|
|
}
|
|
|
|
TDbStruEntityBase::~TDbStruEntityBase()
|
|
{
|
|
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,int nVal )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, nVal) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,double dVal )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, dVal) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,const AcGeVector3d& vt,BOOL bTransformBy /*= FALSE*/ )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, vt, bTransformBy) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,const AcGePoint3d& ptGe,BOOL bTransformBy /*= FALSE*/ )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, ptGe, bTransformBy) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,const AcGePoint3dArray& arPt,BOOL bTransformBy /*= FALSE*/ )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, arPt, bTransformBy) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,LPCTSTR pszValue )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, pszValue) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,const AcDbObjectId& id,BOOL bIsSoft /*= TRUE*/ )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, id, bIsSoft) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,const AcGeMatrix3d& xform )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, xform) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,int iIndex,LPCTSTR pszValue )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, iIndex, pszValue) == TRUE;
|
|
}
|
|
|
|
|
|
bool TDbStruEntityBase::SetAt( LPCTSTR pszKey,const TXData& XData )
|
|
{
|
|
assertWriteEnabled();
|
|
return GetSpecialtyData()->SetAt(pszKey, XData) == TRUE;
|
|
}
|
|
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,int& nVal ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, nVal) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,double& dVal ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, dVal) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,AcGeVector3d& vt ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, vt) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,AcGePoint3d& ptGe ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, ptGe) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,AcGePoint3dArray& arPt ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, arPt) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,AcGeMatrix3d& xform ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, xform) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,CString &sValue ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey,sValue) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,AcDbObjectId& id ) const
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, id) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,int iIndex,CString &sValue )
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, iIndex, sValue) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt( LPCTSTR pszKey,TXData& XData )
|
|
{
|
|
assertReadEnabled();
|
|
return GetSpecialtyDataReadOnly()->GetAt(pszKey, XData) == TRUE;
|
|
}
|
|
|
|
bool TDbStruEntityBase::SetAt(LPCTSTR pszKey,const std::vector<TStruLoad>& vectLoads)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
int nLength = vectLoads.size();
|
|
SetAt(pszKey, nLength);
|
|
|
|
CString sSubKey;
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_ENTTYPE, i);
|
|
SetAt(sSubKey, vectLoads[i].GetEntType());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADTYPE, i);
|
|
SetAt(sSubKey, vectLoads[i].GetLoadType());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADKIND, i);
|
|
SetAt(sSubKey, vectLoads[i].GetLoadKind());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADVAL, i);
|
|
SetAt(sSubKey, vectLoads[i].GetValue());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA1, i);
|
|
SetAt(sSubKey, vectLoads[i].GetPara1());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA2, i);
|
|
SetAt(sSubKey, vectLoads[i].GetPara2());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA3, i);
|
|
SetAt(sSubKey, vectLoads[i].GetPara3());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADFORCEX, i);
|
|
SetAt(sSubKey, vectLoads[i].GetForceX());
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADFORCEY, i);
|
|
SetAt(sSubKey, vectLoads[i].GetForceY());
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt(LPCTSTR pszKey,std::vector<TStruLoad>& vectLoads)const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
vectLoads.clear();
|
|
if (pszKey != NULL)
|
|
{
|
|
int nLength = 0;
|
|
GetAt(pszKey, nLength);
|
|
|
|
CString sSubKey;
|
|
double dVal = 0;
|
|
int nVal = 0;
|
|
|
|
int i = 0;
|
|
while(nLength > 0)
|
|
{
|
|
TStruLoad struLoad;
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_ENTTYPE, i);
|
|
if (GetAt(sSubKey, nVal))
|
|
{
|
|
struLoad.SetEntType(nVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADTYPE, i);
|
|
if (GetAt(sSubKey, nVal))
|
|
{
|
|
struLoad.SetLoadType(nVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADKIND, i);
|
|
if (GetAt(sSubKey, nVal))
|
|
{
|
|
struLoad.SetLoadKind(nVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADVAL, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
struLoad.SetValue(dVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA1, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
struLoad.SetPara1(dVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA2, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
struLoad.SetPara2(dVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA3, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
struLoad.SetPara3(dVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADFORCEX, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
struLoad.SetForceX(dVal);
|
|
}
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADFORCEY, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
struLoad.SetForceY(dVal);
|
|
}
|
|
|
|
vectLoads.push_back(struLoad);
|
|
i++;
|
|
nLength--;
|
|
}
|
|
}
|
|
|
|
return (vectLoads.size() > 0);
|
|
}
|
|
|
|
void TDbStruEntityBase::RemoveLoadsKey(LPCTSTR pszKey)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
int nLength = 0;
|
|
GetAt(pszKey, nLength);
|
|
GetSpecialtyData()->RemoveAt(pszKey);
|
|
|
|
CString sSubKey;
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_ENTTYPE, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADTYPE, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADKIND, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADVAL, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA1, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA2, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADPARA3, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADFORCEX, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
|
|
sSubKey.Format(_T("%s%s%d"),pszKey, KEY_LOADFORCEY, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
}
|
|
}
|
|
}
|
|
|
|
// add by wjx on 120223 弯距包络图
|
|
bool TDbStruEntityBase::SetAt(LPCTSTR pszKey,const std::vector<TCombForceData>& vecMin,
|
|
const std::vector<TCombForceData>& vecMax)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = vecMin.size();
|
|
sSubKey.Format(_T("%sMIN"), pszKey);
|
|
SetAt(sSubKey, nLength);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sMING%d"),pszKey, i);
|
|
SetAt(sSubKey, vecMin[i].m_iGroup);
|
|
sSubKey.Format(_T("%sMINV%d"),pszKey, i);
|
|
SetAt(sSubKey, vecMin[i].m_dForce);
|
|
}
|
|
|
|
nLength = vecMax.size();
|
|
sSubKey.Format(_T("%sMAX"), pszKey);
|
|
SetAt(sSubKey, nLength);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sMAXG%d"),pszKey, i);
|
|
SetAt(sSubKey, vecMax[i].m_iGroup);
|
|
sSubKey.Format(_T("%sMAXV%d"),pszKey, i);
|
|
SetAt(sSubKey, vecMax[i].m_dForce);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt(LPCTSTR pszKey,std::vector<TCombForceData>& vecMin,
|
|
std::vector<TCombForceData> &vecMax)const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
vecMin.clear();
|
|
vecMax.clear();
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = 0;
|
|
sSubKey.Format(_T("%sMIN"), pszKey);
|
|
GetAt(sSubKey, nLength);
|
|
|
|
bool bOk = false;
|
|
double dVal = 0;
|
|
int i = 0, nCombNo;
|
|
while(nLength > 0)
|
|
{
|
|
bOk = false;
|
|
TCombForceData fcData;
|
|
sSubKey.Format(_T("%sMING%d"),pszKey, i);
|
|
if (GetAt(sSubKey, nCombNo))
|
|
{
|
|
fcData.m_iGroup = nCombNo;
|
|
bOk = true;
|
|
}
|
|
sSubKey.Format(_T("%sMINV%d"),pszKey, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
fcData.m_dForce = dVal;
|
|
bOk = true;
|
|
}
|
|
|
|
if (bOk)
|
|
{
|
|
vecMin.push_back(fcData);
|
|
}
|
|
|
|
i++;
|
|
nLength--;
|
|
}
|
|
|
|
sSubKey.Format(_T("%sMAX"), pszKey);
|
|
GetAt(sSubKey, nLength);
|
|
|
|
i = 0;
|
|
while(nLength > 0)
|
|
{
|
|
bOk = false;
|
|
TCombForceData fcData;
|
|
sSubKey.Format(_T("%sMAXG%d"),pszKey, i);
|
|
if (GetAt(sSubKey, nCombNo))
|
|
{
|
|
fcData.m_iGroup = nCombNo;
|
|
bOk = true;
|
|
}
|
|
sSubKey.Format(_T("%sMAXV%d"),pszKey, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
fcData.m_dForce = dVal;
|
|
bOk = true;
|
|
}
|
|
if (bOk)
|
|
{
|
|
vecMax.push_back(fcData);
|
|
}
|
|
i++;
|
|
nLength--;
|
|
}
|
|
}
|
|
|
|
return ((vecMin.size() > 0) && (vecMax.size() > 0));
|
|
}
|
|
|
|
void TDbStruEntityBase::RemoveMGraKey(LPCTSTR pszKey)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = 0;
|
|
sSubKey.Format(_T("%sMIN"), pszKey);
|
|
GetAt(sSubKey, nLength);
|
|
GetSpecialtyData()->RemoveAt(pszKey);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sMING%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
sSubKey.Format(_T("%sMINV%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
}
|
|
|
|
sSubKey.Format(_T("%sMAX"), pszKey);
|
|
GetAt(sSubKey, nLength);
|
|
GetSpecialtyData()->RemoveAt(pszKey);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sMAXG%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
sSubKey.Format(_T("%sMAXV%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
}
|
|
}
|
|
}
|
|
|
|
// add by wjx on 120329 轴力包络图
|
|
bool TDbStruEntityBase::SetAt(LPCTSTR pszKey,const std::vector<TCombForceData>& vecData)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = vecData.size();
|
|
SetAt(pszKey, nLength);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sG%d"),pszKey, i);
|
|
SetAt(sSubKey, vecData[i].m_iGroup);
|
|
sSubKey.Format(_T("%sV%d"),pszKey, i);
|
|
SetAt(sSubKey, vecData[i].m_dForce);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
bool TDbStruEntityBase::GetAt(LPCTSTR pszKey,std::vector<TCombForceData>& vecData)const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
vecData.clear();
|
|
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = 0;
|
|
GetAt(pszKey, nLength);
|
|
|
|
double dVal = 0;
|
|
int i = 0,nCombNo;
|
|
while(nLength > 0)
|
|
{
|
|
TCombForceData fcData;
|
|
sSubKey.Format(_T("%sG%d"),pszKey, i);
|
|
if (GetAt(sSubKey, nCombNo))
|
|
{
|
|
fcData.m_iGroup = nCombNo;
|
|
}
|
|
sSubKey.Format(_T("%sV%d"),pszKey, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
fcData.m_dForce = dVal;
|
|
}
|
|
vecData.push_back(fcData);
|
|
|
|
i++;
|
|
nLength--;
|
|
}
|
|
}
|
|
|
|
return ((int)vecData.size() > 0);
|
|
}
|
|
|
|
void TDbStruEntityBase::RemoveNGraKey(LPCTSTR pszKey)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = 0;
|
|
GetAt(sSubKey, nLength);
|
|
GetSpecialtyData()->RemoveAt(pszKey);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sG%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
sSubKey.Format(_T("%sV%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
}
|
|
}
|
|
}
|
|
|
|
//截面配筋面积数据
|
|
bool TDbStruEntityBase::SetAt(LPCTSTR pszKey,const std::vector<TReinSectData>& vecData)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = vecData.size();
|
|
SetAt(pszKey, nLength);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sL%d"),pszKey, i);
|
|
SetAt(sSubKey, vecData[i].m_nSectNo);
|
|
sSubKey.Format(_T("%sV%d"),pszKey, i);
|
|
SetAt(sSubKey, vecData[i].m_dArea);
|
|
sSubKey.Format(_T("%sP%d"),pszKey, i);
|
|
SetAt(sSubKey, vecData[i].m_dAreaS);
|
|
sSubKey.Format(_T("%sY%d"),pszKey, i);
|
|
SetAt(sSubKey, vecData[i].m_dAreaY);
|
|
sSubKey.Format(_T("%sF%d"),pszKey, i);
|
|
SetAt(sSubKey, vecData[i].m_nFlag);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
bool TDbStruEntityBase::GetAt(LPCTSTR pszKey,std::vector<TReinSectData>& vecData)const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
vecData.clear();
|
|
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = 0;
|
|
GetAt(pszKey, nLength);
|
|
|
|
double dVal = 0;
|
|
int i = 0,nSectNo;
|
|
while(nLength > 0)
|
|
{
|
|
TReinSectData rsData;
|
|
sSubKey.Format(_T("%sL%d"),pszKey, i);
|
|
if (GetAt(sSubKey, nSectNo))
|
|
{
|
|
rsData.m_nSectNo = nSectNo;
|
|
}
|
|
sSubKey.Format(_T("%sV%d"),pszKey, i);
|
|
if (GetAt(sSubKey, dVal))
|
|
{
|
|
rsData.m_dArea = dVal;
|
|
}
|
|
|
|
sSubKey.Format(_T("%sP%d"),pszKey, i);
|
|
if(GetAt(sSubKey, dVal))
|
|
{
|
|
rsData.m_dAreaS = dVal;
|
|
}
|
|
sSubKey.Format(_T("%sY%d"),pszKey, i);
|
|
if(GetAt(sSubKey, dVal))
|
|
{
|
|
rsData.m_dAreaY = dVal;
|
|
}
|
|
|
|
sSubKey.Format(_T("%sF%d"),pszKey, i);
|
|
if(GetAt(sSubKey, nSectNo))
|
|
{
|
|
rsData.m_nFlag = nSectNo;
|
|
}
|
|
vecData.push_back(rsData);
|
|
|
|
i++;
|
|
nLength--;
|
|
}
|
|
}
|
|
|
|
return ((int)vecData.size() > 0);
|
|
}
|
|
|
|
|
|
bool TDbStruEntityBase::SetAt(LPCTSTR pszKey, const TCrackData& crackData)
|
|
{
|
|
CString sKey;
|
|
sKey.Format(_T("%sLeft"), pszKey);
|
|
if (!SetAt(sKey, crackData.m_dLeft))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
sKey.Format(_T("%sMid"), pszKey);
|
|
if (!SetAt(sKey, crackData.m_dMid))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
sKey.Format(_T("%sRight"), pszKey);
|
|
if (!SetAt(sKey, crackData.m_dRight))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
bool TDbStruEntityBase::GetAt(LPCTSTR pszKey, TCrackData& crackData) const
|
|
{
|
|
CString sKey;
|
|
sKey.Format(_T("%sLeft"), pszKey);
|
|
if (!GetAt(sKey, crackData.m_dLeft))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
sKey.Format(_T("%sMid"), pszKey);
|
|
if (!GetAt(sKey, crackData.m_dMid))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
sKey.Format(_T("%sRight"), pszKey);
|
|
if (!GetAt(sKey, crackData.m_dRight))
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
void TDbStruEntityBase::RemoveRSDataKey(LPCTSTR pszKey)
|
|
{
|
|
assertWriteEnabled();
|
|
if (pszKey != NULL)
|
|
{
|
|
CString sSubKey;
|
|
int nLength = 0;
|
|
GetAt(sSubKey, nLength);
|
|
GetSpecialtyData()->RemoveAt(pszKey);
|
|
|
|
for (int i = 0;i < nLength; i++)
|
|
{
|
|
sSubKey.Format(_T("%sL%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
sSubKey.Format(_T("%sV%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
sSubKey.Format(_T("%sP%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
sSubKey.Format(_T("%sY%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
sSubKey.Format(_T("%sF%d"),pszKey, i);
|
|
GetSpecialtyData()->RemoveAt(sSubKey);
|
|
}
|
|
}
|
|
}
|
|
|
|
//add by xlc on 120118
|
|
//设置荷载数组
|
|
bool TDbStruEntityBase::SetLoadsArray(const std::vector<TStruLoad>& vectLoads)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
//获得荷载数组
|
|
bool TDbStruEntityBase::GetLoadsArray(std::vector<TStruLoad>& vectLoads)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
//清除荷载数组
|
|
void TDbStruEntityBase::ClearLoadsArray()
|
|
{
|
|
|
|
}
|
|
// 对象修改发出关联更改消息
|
|
void TDbStruEntityBase::PostAssocMsg(TAssocMsg assocMsg)const
|
|
{
|
|
|
|
}
|
|
|
|
// 对象接收到更改消息
|
|
void TDbStruEntityBase::ReceiveAssocMsg(TAssocMsg assocMsg)
|
|
{
|
|
|
|
}
|
|
|
|
// 建立关联关系
|
|
void TDbStruEntityBase::MakeAssocRelation(AcDbObjectIdArray& ids)
|
|
{
|
|
|
|
}
|
|
// 不验证关系,直接建立关联关系
|
|
void TDbStruEntityBase::MakeAssocRelationDirect(const AcDbObjectId& idObj)
|
|
{
|
|
|
|
}
|
|
// 移除关联关系
|
|
void TDbStruEntityBase::RemoveAssocRelation(AcDbObjectId& id)
|
|
{
|
|
|
|
}
|
|
|
|
// 获取关联关系,nType:关联类型;ar:关联对象句柄数组
|
|
void TDbStruEntityBase::GetAssocRelation(int nType, AcDbObjectIdArray& ar)const
|
|
{
|
|
|
|
}
|
|
|
|
// 夹点消息后,更新自己边界
|
|
void TDbStruEntityBase::UpdateMeOnGripMsg(TAssocMsg assocMsg)
|
|
{
|
|
|
|
}
|
|
|
|
void InitDbStruEntityBase(bool bTrue)
|
|
{
|
|
if (bTrue)
|
|
{
|
|
TDbStruEntityBase::rxInit();
|
|
}
|
|
else
|
|
{
|
|
deleteAcRxClass(TDbStruEntityBase::desc());
|
|
}
|
|
}
|
|
#endif |