本文整理汇总了C++中AcStringArray类的典型用法代码示例。如果您正苦于以下问题:C++ AcStringArray类的具体用法?C++ AcStringArray怎么用?C++ AcStringArray使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AcStringArray类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: explodeBlock
void BlockDraw::explodeBlock( AcGeVoidPointerArray& ents )
{
// 填充属性数据
AcStringArray names;
regPropertyDataNames( names );
if( names.isEmpty() )
{
acutPrintf( _T( "\n没有注册要提取的字段..." ) );
return;
}
if( names.length() != m_attValues.length() )
{
acutPrintf( _T( "\n注册的属性数据与读取的数据个数不相等!" ) );
return;
}
AcDbObjectId blkId = GetBlockDefinitionByName( m_blockName );
if( blkId.isNull() )
{
acutPrintf( _T( "\n未知的块定义:%s" ), m_blockName );
return;
}
// 计算变换矩阵
AcGeMatrix3d blkXform = GetBlockTransformMatrix( blkId, m_insertPt, m_angle, m_scale );
// 分解块定义
BlockToEntity( blkId, blkXform, names, m_attValues, ents );
}
示例2: BuildPropGridCtrl
bool PropertyDataUpdater::BuildPropGridCtrl( CMFCPropertyGridCtrl* pPropDataList, const CString& type, const AcStringArray& fields )
{
if( pPropDataList == NULL ) return false;
if( type.GetLength() == 0 ) return false;
if( fields.isEmpty() ) return false;
// 清空已添加的属性
pPropDataList->RemoveAll();
//acutPrintf(_T("\n清空所有属性..."));
// 创建MFCPropertyGridCtrlHelper对象
// 同时初始化m_propertyDataList的属性
// 参见MFCPropertyGridCtrlHelper的构造函数
MFCPropertyGridCtrlHelper pgch( pPropDataList );
int len = fields.length();
for( int i = 0; i < len; i++ )
{
CString name = fields[i].kACharPtr();
FieldInfo info; // 默认设置(DT_STRING, m_enable=true, m_descr =_T(""))
FieldInfoHelper::ReadFieldInfo( type, name, info );
// 构建PropertyList
BuildPropList( pgch, name, _T( "" ), info ); // 赋予空字符串
}
//PrintPropList(pPropDataList);
return true;
}
示例3: GetIntStrList
bool IntStrListHelper::GetIntStrList( const CString& name, AcDbIntArray& intList, AcStringArray& strList )
{
AcStringArray entries;
if( !ArxDictHelper::GetAllEntries( INT_LIST_DICT, name, entries ) ) return false;
int len = entries.length();
bool ret = ( len > 0 && len % 2 == 0 );
if( ret ) // 长度必须为偶数
{
intList.removeAll();
strList.removeAll();
for( int i = 0; i < len; i++ )
{
if( i % 2 == 0 ) // 偶数位置的元素为整数
{
intList.append( _ttoi( entries[i].kACharPtr() ) );
}
else // 奇数位置的元素为字符串
{
strList.append( entries[i] );
}
}
}
return ret;
}
示例4: GetObjectDatas
void ReportDataHelper::ReadDatas( const CString& name, ArrayVector& datasVector,int unitCount )
{
AcStringArray getDatas;
AcDbObjectId objId;
GDESDataObjectHelper::GetObjectId(name,objId);
GetObjectDatas(objId,getDatas);
//AcStringArray strName,strIsRunning,strReason;
ArrayVector datas;
int nCount = getDatas.length();
if(nCount <= 0) return;
datas.resize( unitCount );
for(int i = 0; i < nCount; i = i+2 )
{
int j = (i/2)% unitCount;
datas[j].append(getDatas[i]);
}
datasVector.clear();
for(int i = 0; i < nCount / (2 * unitCount); i++)
{
CString temp;
AcStringArray temps;
for(int j = 0; j < unitCount; j++)
{
temp.Format(_T("%s"),datas[j][i].kACharPtr());
if(temp == ISNULL) temp = _T("");
temps.append(temp);
}
datasVector.push_back(temps);
}
}
示例5: regPropertyDataNames
void WGFPBlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
names.append( _T( "绝对瓦斯涌出量" ) );
names.append( _T( "相对瓦斯涌出量" ) );
names.append( _T( "工作面日产量" ) );
names.append( _T( "回采年月" ) );
}
示例6: MinePreGasCacul
bool Calculate::MinePreGasCacul( const AcStringArray& baseDatas,const AcStringArray& listDatas,CString& strRet )
{
if(baseDatas.isEmpty() || listDatas.isEmpty()) return false;
doubleVector dBaseDatas,dListDatas;
StringsToNum(baseDatas,dBaseDatas);
StringsToNum(listDatas,dListDatas);
if(dBaseDatas[4] <= 0) return false;
if(abs(dBaseDatas[0] - dBaseDatas[1]) < 0.00001) return false;
int faceNum = (int)dBaseDatas[6];
double sumFace = 0;
for(int j = 0; j < faceNum; j++)
{
double length = dListDatas[5*j];
double height = dListDatas[5*j+1];
double dencity = dListDatas[5*j+2];
double dayAdvance = dListDatas[5*j + 3];
double recovRate = dListDatas[5*j+4];
double temp = length*height*dencity*dayAdvance*0.01*recovRate;
sumFace += temp;
}
double ret = dBaseDatas[3]*0.01*dBaseDatas[2]*0.0001/dBaseDatas[4]/(dBaseDatas[0] - dBaseDatas[1]) + dBaseDatas[5]*330*0.0001*sumFace;
strRet.Format(_T("%.2lf"),ret);
return true;
}
示例7: DisplayPropertyByFunName
bool PropertyDataDlgHelper::DisplayPropertyByFunName( const AcDbObjectId& objId, const CString funName )
{
if( objId.isNull() ) return false;
AcDbObjectId dObjId;
if( !DataHelper::GetDataObject( objId, dObjId ) ) return false;
CString type;
if( !DataHelper::GetTypeName( objId, type ) ) return false;
AcStringArray fields;
FuncFieldHelper::GetFields(funName,type,fields);
//for (int i = 0; i < fields.length(); i++)
//{
// acutPrintf(_T("\n功能:%s\t字段:%s"),funName,fields[i]);
//}
//FieldHelper::GetAllFields( type, fields );
if( fields.isEmpty() )
{
CString msg;
//msg.Format(_T("类型:%s的字段个数为0,没有数据可以显示..."), type);
msg.Format( _T( "没有数据可以显示..." ) );
AfxMessageBox( msg );
return false;
}
InputPropertyDataDlg( dObjId, fields,funName );
return true;
}
示例8: fillVarList
void FieldInfoDlg::fillVarList()
{
m_varList.ResetContent(); // 清空列表
AcStringArray names;
switch( m_lt )
{
case LT_STRING:
StringListHelper::GetAllNames( names );
break;
case LT_INT:
IntStrListHelper::GetAllNames( names );
break;
case LT_OBJECT:
DataObjectListHelper::GetAllNames( names );
break;
}
if( names.isEmpty() ) return;
int index = names.find( m_varName );
if( index < 0 ) m_varName = _T( "" ); // 清空
int len = names.length();
for( int i = 0; i < len; i++ )
{
m_varList.AddString( names[i].kACharPtr() );
}
m_varList.SetCurSel( index );
}
示例9: regPropertyDataNames
void CDHBlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
names.append( _T( "¿×ºÅ" ) );
names.append( _T( "µØÃæ±ê¸ß" ) );
names.append( _T( "ú²ãµ×°å±ê¸ß" ) );
names.append( _T( "úºñ" ) );
}
示例10: GetDatasFromList
static void GetDatasFromList(const CGridListCtrlGroups& listCtrl,AcStringArray& strName,AcStringArray& strIsRunning,AcStringArray& strReason,int num)
{
for(size_t i = 0; i < num; i++)
{
CString name = listCtrl.GetItemText(i,1);
if (name.IsEmpty())
{
name = ISNULL;
}
strName.append(name);
CString isRunning = listCtrl.GetItemText(i,2);
if (isRunning.IsEmpty())
{
isRunning = ISNULL;
}
strIsRunning.append(isRunning);
CString reason = listCtrl.GetItemText(i,3);
if (reason.IsEmpty())
{
reason = ISNULL;
}
strReason.append(reason);
//acutPrintf(_T("\n第%d行数据:%s\t%s\t%s"),i+1,strName,isRunning,strReason);
}
}
示例11: ExcludePath
static CString ExcludePath( const CString& supportPath, const CString& arxPath )
{
AcStringArray cc;
SplitCString( supportPath, _T( ";" ), cc );
AcStringArray paths;
int n = cc.length();
for( int i = 0; i < n; i++ )
{
if( cc[i].compareNoCase( arxPath ) == 0 ) continue;
paths.append( cc[i] );
}
CString path;
n = paths.length();
for( int i = 0; i < n; i++ )
{
if( i == n - 1 )
{
path.AppendFormat( _T( "%s" ), paths[i].kACharPtr() );
}
else
{
path.AppendFormat( _T( "%s;" ), paths[i].kACharPtr() );
}
}
return path;
}
示例12: DisplayPropertyDataDlg
bool PropertyDataDlgHelper::DisplayPropertyDataDlg( const AcDbObjectId& objId )
{
if( objId.isNull() ) return false;
AcDbObjectId dObjId;
if( !DataHelper::GetDataObject( objId, dObjId ) ) return false;
CString type;
if( !DataHelper::GetTypeName( objId, type ) ) return false;
AcStringArray fields;
FieldHelper::GetAllFields( type, fields );
//acutPrintf(_T("\n类型:%s"),type);
if( fields.isEmpty() )
{
CString msg;
//msg.Format(_T("类型:%s的字段个数为0,没有数据可以显示..."), type);
msg.Format( _T( "没有数据可以显示..." ) );
AfxMessageBox( msg );
return false;
}
else
{
DisplayPartialPropertyDataDlg( dObjId, fields );
return true;
}
}
示例13: regPropertyDataNames
void CSDCIBlockDraw::regPropertyDataNames( AcStringArray& names ) const
{
names.append( _T( "瓦斯放散初速度" ) );
names.append( _T( "煤的坚固性系数" ) );
// 实际只有2个字段,该字段并不存在!!!
// 注册一个不存在的字段,返回值为""
names.append( _T( "瓦斯突出危险性综合指标K值" ) );
}
示例14: GetTopParentClass
bool ArxClassHelper::GetTopParentClass( const CString& type, CString& parentType )
{
AcStringArray types;
GetClassHierarchy( type, types, false );
if( types.isEmpty() ) return false; // type本身就是抽象类
parentType = types.first().kACharPtr();
return true;
}
示例15: ShowRetDlg
static BOOL ShowRetDlg()
{
ResultDlg retDlg;
AcStringArray datas;
datas.append(_T("目前矿井瓦斯抽采系统正常运转,能保证生产接续"));
datas.append(_T("建立了部分部分瓦斯抽采系统,无法保证生产接续"));
datas.append(_T("没有建立地面固定瓦斯抽采系统"));
datas.append(_T("其他"));
retDlg.setItemDatas(datas);
IntArray trueIndxs;
trueIndxs.push_back(0);
trueIndxs.push_back(1);
retDlg.setTrueIndex(trueIndxs,RET_GASSYS_OBJCT_NAME,DESC_GASSYS_OBJCT_NAME);
AcStringArray bookMks;
bookMks.append(_T("GasSys_Ret"));
bookMks.append(_T("GasSys_Method"));
bookMks.append(_T("GasSys_Conclusion"));
bookMks.append(_T("GasSys_YesOrNo"));
retDlg.setBookMarks(bookMks);
if(IDOK == retDlg.DoModal())
{
return TRUE;
}
else return FALSE;
}