本文整理汇总了C++中AcDbVoidPtrArray::at方法的典型用法代码示例。如果您正苦于以下问题:C++ AcDbVoidPtrArray::at方法的具体用法?C++ AcDbVoidPtrArray::at怎么用?C++ AcDbVoidPtrArray::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcDbVoidPtrArray
的用法示例。
在下文中一共展示了AcDbVoidPtrArray::at方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isModuleLoaded
bool isModuleLoaded(const char* str)
{
AcDbVoidPtrArray* pApps = reinterpret_cast<AcDbVoidPtrArray*>(acrxLoadedApps());
if (pApps==NULL)
return false;
bool bFound = false;
for (int i=0;i<pApps->length();i++)
{
if (stricmp(reinterpret_cast<const char*>(pApps->at(i)),str)==0)
{
bFound = true;
break;
}
}
for (;pApps->length()>0;)
{
delete reinterpret_cast<char*>(pApps->at(0));
pApps->removeAt(0);
}
delete pApps;
return bFound;
}
示例2: CreateBlock
AcDbObjectId CArxHelper::CreateBlock(const AcDbVoidPtrArray& arrEnt, const CString& strName)
{
AcDbObjectId blockId = AcDbObjectId::kNull;
AcDbBlockTableRecord* pBlockTableRecord = new AcDbBlockTableRecord();
pBlockTableRecord->setName(strName);
pBlockTableRecord->setOrigin(AcGePoint3d::kOrigin);
for (int i = 0; i < arrEnt.length(); ++ i)
{
AcDbEntity* pEntity = (AcDbEntity*)arrEnt.at(i);
pBlockTableRecord->appendAcDbEntity(pEntity);
pEntity->close();
}
AcDbBlockTable* pBlockTable = NULL;
acdbHostApplicationServices()->workingDatabase()->getSymbolTable(pBlockTable, AcDb::kForWrite);
pBlockTable->add(blockId,pBlockTableRecord);
pBlockTableRecord->close();
pBlockTable->close();
return blockId;
}
示例3: addCmdTreeItem
BOOL
ArxDbgUiTdcCmds::OnInitDialog()
{
ArxDbgUiTdcRxObjectBase::OnInitDialog();
buildCmdGroupMap();
POSITION pos;
CString str;
AcDbVoidPtrArray* cmds = NULL;
HTREEITEM treeItem;
AcEdCommand* tmpCmd;
bool isFirst = true;
for (pos = m_cmdMap.GetStartPosition(); pos != NULL;) {
m_cmdMap.GetNextAssoc(pos, str, (void*&)cmds);
treeItem = addCmdTreeItem(str, NULL, TVI_ROOT, true);
if (treeItem != NULL) {
int len = cmds->length();
for (int i=0; i<len; i++) {
tmpCmd = static_cast<AcEdCommand*>(cmds->at(i));
addCmdTreeItem(tmpCmd->localName(), tmpCmd, treeItem, true);
}
if (isFirst) {
m_cmdTree.SelectItem(treeItem); // make first one selected
isFirst = false;
}
}
}
buildColumns(m_dataList);
displayCurrent();
return TRUE;
}