コード例 #1
0
bool IntStrListHelper::AddIntStrPair( const CString& name, int intValue, const CString& strValue )
{
    if( ( name.GetLength() == 0 ) || strValue.GetLength() == 0 ) return false;

    AcStringArray strList;
    AcDbIntArray intList;
    GetIntStrList( name, intList, strList );
    if( intList.contains( intValue ) || strList.contains( strValue ) ) return false;

    intList.append( intValue );
    strList.append( strValue );
    RemoveIntStrList( name );
    return AddIntStrList( name, intList, strList );
}
コード例 #2
0
ファイル: ArxClassHelper.cpp プロジェクト: kanbang/TIDS
bool ArxClassHelper::GetAllTopParentClass( const CString& root, AcStringArray& types )
{
    AcStringArray allGETypes;
    ArxClassHelper::GetArxClassTypes( root, allGETypes, false );
    if( allGETypes.isEmpty() ) return false;

    int len = allGETypes.length();
    for( int i = 0; i < len; i++ )
    {
        CString parentType;
        if( !ArxClassHelper::GetTopParentClass( allGETypes[i].kACharPtr(), parentType ) ) continue;
        if( allGETypes[i].compareNoCase( parentType ) != 0 ) continue;
        if( !types.contains( parentType ) )
        {
            types.append( parentType );
        }
    }
    return true;
}