当前位置: 首页>>代码示例>>C++>>正文


C++ TAlias::isTempAlias方法代码示例

本文整理汇总了C++中TAlias::isTempAlias方法的典型用法代码示例。如果您正苦于以下问题:C++ TAlias::isTempAlias方法的具体用法?C++ TAlias::isTempAlias怎么用?C++ TAlias::isTempAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TAlias的用法示例。


在下文中一共展示了TAlias::isTempAlias方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _assembleReport

void AliasUnit::_assembleReport( TAlias * pChild )
{
    typedef list<TAlias *>::const_iterator I;
    list<TAlias*> * childrenList = pChild->mpMyChildrenList;
    for( I it2 = childrenList->begin(); it2 != childrenList->end(); it2++)
    {
        TAlias * pT = *it2;
        _assembleReport( pT );
        if( pT->isActive() ) statsActiveAliass++;
        if( pT->isTempAlias() ) statsTempAliass++;
        statsAliasTotal++;
    }
}
开发者ID:Chris7,项目名称:Mudlet1,代码行数:13,代码来源:AliasUnit.cpp

示例2: assembleReport

QString AliasUnit::assembleReport()
{
    statsActiveAliass = 0;
    statsAliasTotal = 0;
    statsTempAliass = 0;
    typedef list<TAlias *>::const_iterator I;
    for( I it = mAliasRootNodeList.begin(); it != mAliasRootNodeList.end(); it++)
    {
        TAlias * pChild = *it;
        if( pChild->isActive() ) statsActiveAliass++;
        if( pChild->isTempAlias() ) statsTempAliass++;
        statsAliasTotal++;
        list<TAlias*> * childrenList = pChild->mpMyChildrenList;
        for( I it2 = childrenList->begin(); it2 != childrenList->end(); it2++)
        {
            TAlias * pT = *it2;
            _assembleReport( pT );
            if( pT->isActive() ) statsActiveAliass++;
            if( pT->isTempAlias() ) statsTempAliass++;
            statsAliasTotal++;
        }
    }
    QStringList msg;
    msg << "Aliass current total: " << QString::number(statsAliasTotal) << "\n"
        << "tempAliass current total: " << QString::number(statsTempAliass) << "\n"
        << "active Aliass: " << QString::number(statsActiveAliass) << "\n";
        /*<< "active Aliass max this session: " << QString::number(statsActiveAliassMax) << "\n"
        << "active Aliass min this session: " << QString::number(statsActiveAliassMin) << "\n"
        << "active Aliass average this session: " << QString::number(statsActiveAliassAverage) << "\n"*/
        //<< "tempAliass created this session: " << QString::number(statsTempAliassCreated) << "\n"
        //<< "tempAliass killed this session: " << QString::number(statsTempAliassKilled) << "\n"
        //<< "current total regex Aliass: " << QString::number(statsRegexAliass) << "\n"
        //<< "average line processing time: " << QString::number(statsAverageLineProcessingTime) << "\n"
        //<< "max line processing time: " << QString::number(statsMaxLineProcessingTime) << "\n"
        //<< "min line processing time: " << QString::number(statsMinLineProcessingTime) << "\n";
    return msg.join("");

}
开发者ID:Chris7,项目名称:Mudlet1,代码行数:38,代码来源:AliasUnit.cpp

示例3: recurseAliases

void dlgPackageExporter::recurseAliases(TAlias* item, QTreeWidgetItem* qItem){
    list<TAlias *> * childList = item->getChildrenList();
    if (!childList->size())
        return;
    list<TAlias *>::iterator it;
    for(it=childList->begin(); it!=childList->end();it++){
        TAlias * pChild = *it;
        if (pChild->isTempAlias())
            continue;
        QStringList sl;
        sl << pChild->getName();
        QTreeWidgetItem * pItem = new QTreeWidgetItem(sl);
        pItem->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsTristate|Qt::ItemIsEnabled|Qt::ItemIsSelectable);
        pItem->setCheckState(0, Qt::Unchecked);
        qItem->addChild(pItem);
        aliasMap.insert(pItem, pChild);
        recurseAliases(pChild, pItem);
    }
}
开发者ID:Akivaii,项目名称:Mudlet,代码行数:19,代码来源:dlgPackageExporter.cpp

示例4: listAliases

void dlgPackageExporter::listAliases()
{
    AliasUnit* tu = mpHost->getAliasUnit();
    list<TAlias *>::const_iterator it;
    std::list<TAlias *> tList = tu->getAliasRootNodeList();
    QList<QTreeWidgetItem *> items = treeWidget->findItems(QString("Aliases"), Qt::MatchExactly, 0);
    QTreeWidgetItem * top = items.first();
    for(it = tList.begin(); it != tList.end(); it++)
    {
        TAlias * pChild = *it;
        if (pChild->isTempAlias())
            continue;
        QStringList sl;
        sl << pChild->getName();
        QTreeWidgetItem * pItem = new QTreeWidgetItem(sl);
        pItem->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsTristate|Qt::ItemIsEnabled|Qt::ItemIsSelectable);
        pItem->setCheckState(0, Qt::Unchecked);
        top->addChild(pItem);
        aliasMap.insert(pItem, pChild);
        recurseAliases(pChild, pItem);
    }
}
开发者ID:Akivaii,项目名称:Mudlet,代码行数:22,代码来源:dlgPackageExporter.cpp

示例5: killAlias

bool AliasUnit::killAlias( QString & name )
{
    typedef list<TAlias *>::const_iterator I;
    for( I it = mAliasRootNodeList.begin(); it != mAliasRootNodeList.end(); it++)
    {
        TAlias * pChild = *it;
        if( pChild->getName() == name )
        {
            // only temporary Aliass can be killed
            if( ! pChild->isTempAlias() )
            {
                return false;
            }
            else
            {
                pChild->setIsActive( false );
                markCleanup( pChild );
                return true;
            }
        }
    }
    return false;
}
开发者ID:Chris7,项目名称:Mudlet1,代码行数:23,代码来源:AliasUnit.cpp

示例6: writeModuleXML

bool XMLexport::writeModuleXML( QIODevice * device, QString moduleName){
    setDevice(device);
    qDebug()<<moduleName;
    writeStartDocument();
    writeDTD("<!DOCTYPE MudletPackage>");

    writeStartElement( "MudletPackage" );
    writeAttribute("version", "1.0");
    qDebug()<<"starting writeModule routine";

    writeStartElement( "TriggerPackage" );
    Host * pT = mpHost;
    bool ret = true;
    int nodesWritten = 0;
    //we go a level down for all these functions so as to not infinitely nest the module
    typedef list<TTrigger *>::const_iterator ItTriggerUnit;
    for( ItTriggerUnit it1 = pT->mTriggerUnit.mTriggerRootNodeList.begin(); it1 != pT->mTriggerUnit.mTriggerRootNodeList.end(); it1++ ) {
        TTrigger * pChildTrigger = *it1;
        if( ! pChildTrigger || pChildTrigger->mPackageName != moduleName ) continue;
        if( ! pChildTrigger->isTempTrigger() && pChildTrigger->mModuleMember ) {
            bool result = writeTrigger( pChildTrigger );
            if( ! result )
                ret = false;
            nodesWritten+=1;
        }
    }
    if( ! nodesWritten )
        writeEndElement(); //end trigger package tag
    nodesWritten=0;

    writeStartElement( "TimerPackage" );
    typedef list<TTimer *>::const_iterator ItTimerUnit;
    for( ItTimerUnit it2 = pT->mTimerUnit.mTimerRootNodeList.begin(); it2 != pT->mTimerUnit.mTimerRootNodeList.end(); it2++ ) {
        TTimer * pChildTimer = *it2;
        if( ! pChildTimer || pChildTimer->mPackageName != moduleName ) continue;
        if( ! pChildTimer->isTempTimer() && pChildTimer->mModuleMember ) {
            bool result = writeTimer( pChildTimer );
            if( ! result )
                ret = false;
            nodesWritten+=1;
        }
    }
    if( ! nodesWritten )
        writeEndElement(); //end trigger package tag
    nodesWritten=0;

    writeStartElement( "AliasPackage" );
    typedef list<TAlias *>::const_iterator ItAliasUnit;
    for( ItAliasUnit it3 = pT->mAliasUnit.mAliasRootNodeList.begin(); it3 != pT->mAliasUnit.mAliasRootNodeList.end(); it3++ ) {
        TAlias * pChildAlias = *it3;
        if( ! pChildAlias || pChildAlias->mPackageName != moduleName ) continue;
        if( ! pChildAlias->isTempAlias() && pChildAlias->mModuleMember ) {
            bool result = writeAlias( pChildAlias );
            if( ! result )
                ret = false;
            nodesWritten+=1;
        }
    }
    if( ! nodesWritten )
        writeEndElement(); //end trigger package tag
    nodesWritten=0;

    writeStartElement( "ActionPackage" );
    typedef list<TAction *>::const_iterator ItActionUnit;
    for( ItActionUnit it4 = pT->mActionUnit.mActionRootNodeList.begin(); it4 != pT->mActionUnit.mActionRootNodeList.end(); it4++ ) {
        TAction * pChildAction = *it4;
        if( ! pChildAction || pChildAction->mPackageName != moduleName ) continue;
        if( pChildAction->mModuleMember ) {
            bool result = writeAction( pChildAction );
            if( ! result )
                ret = false;
            nodesWritten+=1;
        }
    }
    if( ! nodesWritten )
        writeEndElement(); //end trigger package tag
    nodesWritten=0;

    writeStartElement( "ScriptPackage" );
    typedef list<TScript *>::const_iterator ItScriptUnit;
    for( ItScriptUnit it5 = pT->mScriptUnit.mScriptRootNodeList.begin(); it5 != pT->mScriptUnit.mScriptRootNodeList.end(); it5++ ) {
        TScript * pChildScript = *it5;
        if( ! pChildScript || pChildScript->mPackageName != moduleName ) continue;
        if( pChildScript->mModuleMember ) {
            bool result = writeScript( pChildScript );
            if( ! result )
                ret = false;
            nodesWritten+=1;
        }
    }
    if( ! nodesWritten )
        writeEndElement(); //end trigger package tag
    nodesWritten=0;

    writeStartElement( "KeyPackage" );
    typedef list<TKey *>::const_iterator ItKeyUnit;
    for( ItKeyUnit it6 = pT->mKeyUnit.mKeyRootNodeList.begin(); it6 != pT->mKeyUnit.mKeyRootNodeList.end(); it6++ ) {
        TKey * pChildKey = *it6;
        if( ! pChildKey || pChildKey->mPackageName != moduleName ) continue;
        if( pChildKey->mModuleMember ) {
//.........这里部分代码省略.........
开发者ID:Akivaii,项目名称:Mudlet,代码行数:101,代码来源:XMLexport.cpp

示例7: writeGenericPackage

bool XMLexport::writeGenericPackage( Host * pT )
{
    writeStartElement( "TriggerPackage" );
    bool ret = true;
    typedef list<TTrigger *>::const_iterator ItTriggerUnit;
    for( ItTriggerUnit it1 = pT->mTriggerUnit.mTriggerRootNodeList.begin(); it1 != pT->mTriggerUnit.mTriggerRootNodeList.end(); it1++)
    {
        TTrigger * pChildTrigger = *it1;
        if( ! pChildTrigger ) continue;
        if( ! pChildTrigger->isTempTrigger())
        {
            ret = writeTrigger( pChildTrigger );
        }
    }
    writeEndElement(); //end trigger package tag

    writeStartElement("TimerPackage");
    typedef list<TTimer *>::const_iterator ItTimerUnit;
    for( ItTimerUnit it2 = pT->mTimerUnit.mTimerRootNodeList.begin(); it2 != pT->mTimerUnit.mTimerRootNodeList.end(); it2++)
    {
        TTimer * pChildTimer = *it2;
        if( ! pChildTimer->isTempTimer())
        {
            ret = writeTimer( pChildTimer );
        }
    }
    writeEndElement();

    writeStartElement("AliasPackage");
    typedef list<TAlias *>::const_iterator ItAliasUnit;
    for( ItAliasUnit it3 = pT->mAliasUnit.mAliasRootNodeList.begin(); it3 != pT->mAliasUnit.mAliasRootNodeList.end(); it3++)
    {
        TAlias * pChildAlias = *it3;
        if( ! pChildAlias->isTempAlias())
        {
            ret = writeAlias( pChildAlias );
        }
    }
    writeEndElement();

    writeStartElement("ActionPackage");
    typedef list<TAction *>::const_iterator ItActionUnit;
    for( ItActionUnit it4 = pT->mActionUnit.mActionRootNodeList.begin(); it4 != pT->mActionUnit.mActionRootNodeList.end(); it4++)
    {
        TAction * pChildAction = *it4;
            ret = writeAction( pChildAction );
    }
    writeEndElement();

    writeStartElement("ScriptPackage");
    typedef list<TScript *>::const_iterator ItScriptUnit;
    for( ItScriptUnit it5 = pT->mScriptUnit.mScriptRootNodeList.begin(); it5 != pT->mScriptUnit.mScriptRootNodeList.end(); it5++)
    {
        TScript * pChildScript = *it5;
            ret = writeScript( pChildScript );
    }
    writeEndElement();

    writeStartElement("KeyPackage");
    typedef list<TKey *>::const_iterator ItKeyUnit;
    for( ItKeyUnit it6 = pT->mKeyUnit.mKeyRootNodeList.begin(); it6 != pT->mKeyUnit.mKeyRootNodeList.end(); it6++)
    {
        TKey * pChildKey = *it6;
            ret = writeKey( pChildKey );
    }
    writeEndElement();

    return ret;
}
开发者ID:Akivaii,项目名称:Mudlet,代码行数:69,代码来源:XMLexport.cpp

示例8: writeHost


//.........这里部分代码省略.........
    writeTextElement( "mWhite2", pT->mWhite_2.name() );
    writeTextElement( "mLightWhite2", pT->mLightWhite_2.name() );
    writeTextElement( "mSpellDic", pT->mSpellDic );
    writeTextElement( "mLineSize", QString::number(pT->mLineSize) );
    writeTextElement( "mRoomSize", QString::number(pT->mRoomSize) );
    writeEndElement(); // end Host tag
    writeEndElement(); // end HostPackage tag

    writeStartElement( "TriggerPackage" );
    bool ret = true;
    typedef list<TTrigger *>::const_iterator ItTriggerUnit;
    for( ItTriggerUnit it1 = pT->mTriggerUnit.mTriggerRootNodeList.begin(); it1 != pT->mTriggerUnit.mTriggerRootNodeList.end(); it1++)
    {
        TTrigger * pChildTrigger = *it1;
        if( ! pChildTrigger || pChildTrigger->mModuleMember) continue;
        if( ! pChildTrigger->isTempTrigger())
        {
            ret = writeTrigger( pChildTrigger );
        }
    }
    writeEndElement(); //end trigger package tag

    writeStartElement("TimerPackage");
    typedef list<TTimer *>::const_iterator ItTimerUnit;
    for( ItTimerUnit it2 = pT->mTimerUnit.mTimerRootNodeList.begin(); it2 != pT->mTimerUnit.mTimerRootNodeList.end(); it2++)
    {
        TTimer * pChildTimer = *it2;
        if (pChildTimer->mModuleMember) continue;
        if( ! pChildTimer->isTempTimer())
        {
            ret = writeTimer( pChildTimer );
        }
    }
    writeEndElement();

    writeStartElement("AliasPackage");
    typedef list<TAlias *>::const_iterator ItAliasUnit;
    for( ItAliasUnit it3 = pT->mAliasUnit.mAliasRootNodeList.begin(); it3 != pT->mAliasUnit.mAliasRootNodeList.end(); it3++)
    {
        TAlias * pChildAlias = *it3;
        if (pChildAlias->mModuleMember) continue;
        if( ! pChildAlias->isTempAlias())
        {
            ret = writeAlias( pChildAlias );
        }
    }
    writeEndElement();

    writeStartElement("ActionPackage");
    typedef list<TAction *>::const_iterator ItActionUnit;
    for( ItActionUnit it4 = pT->mActionUnit.mActionRootNodeList.begin(); it4 != pT->mActionUnit.mActionRootNodeList.end(); it4++)
    {
        TAction * pChildAction = *it4;
        if (pChildAction->mModuleMember) continue;
        ret = writeAction( pChildAction );
    }
    writeEndElement();

    writeStartElement("ScriptPackage");
    typedef list<TScript *>::const_iterator ItScriptUnit;
    for( ItScriptUnit it5 = pT->mScriptUnit.mScriptRootNodeList.begin(); it5 != pT->mScriptUnit.mScriptRootNodeList.end(); it5++)
    {
        TScript * pChildScript = *it5;
        if (pChildScript->mModuleMember) continue;
        ret = writeScript( pChildScript );
    }
    writeEndElement();

    writeStartElement("KeyPackage");
    typedef list<TKey *>::const_iterator ItKeyUnit;
    for( ItKeyUnit it6 = pT->mKeyUnit.mKeyRootNodeList.begin(); it6 != pT->mKeyUnit.mKeyRootNodeList.end(); it6++)
    {
        TKey * pChildKey = *it6;
        if (pChildKey->mModuleMember) continue;
        ret = writeKey( pChildKey );
    }
    writeEndElement();

    writeStartElement("VariablePackage");
    LuaInterface * lI = pT->getLuaInterface();
    VarUnit * vu = lI->getVarUnit();
    //do hidden variables first
    writeStartElement("HiddenVariables");
    QSetIterator<QString> it8( vu->hiddenByUser );
    while( it8.hasNext() )
    {
        writeTextElement( "name", it8.next() );
    }
    writeEndElement();
    TVar * base = vu->getBase();
    QListIterator<TVar *> it7( base->getChildren() );
    while( it7.hasNext() )
    {
        TVar * var = it7.next();
        writeVariable( var, lI, vu );
    }
    writeEndElement();

    return ret;
}
开发者ID:Akivaii,项目名称:Mudlet,代码行数:101,代码来源:XMLexport.cpp

示例9: writeHost


//.........这里部分代码省略.........
    writeTextElement( "mMagenta", pT->mMagenta.name() );
    writeTextElement( "mLightMagenta", pT->mLightMagenta.name() );
    writeTextElement( "mWhite", pT->mWhite.name() );
    writeTextElement( "mLightWhite", pT->mLightWhite.name() );
    writeTextElement( "mDisplayFont", pT->mDisplayFont.toString() );
    writeTextElement( "mCommandLineFont", pT->mCommandLineFont.toString() );
    writeTextElement( "mCommandSeparator", pT->mCommandSeparator );
    writeTextElement( "commandLineMinimumHeight", QString::number(pT->commandLineMinimumHeight) );

    writeTextElement( "mFgColor2", pT->mFgColor_2.name() );
    writeTextElement( "mBgColor2", pT->mBgColor_2.name() );
    writeTextElement( "mBlack2", pT->mBlack_2.name() );
    writeTextElement( "mLightBlack2", pT->mLightBlack_2.name() );
    writeTextElement( "mRed2", pT->mRed_2.name() );
    writeTextElement( "mLightRed2", pT->mLightRed_2.name() );
    writeTextElement( "mBlue2", pT->mBlue_2.name() );
    writeTextElement( "mLightBlue2", pT->mLightBlue_2.name() );
    writeTextElement( "mGreen2", pT->mGreen_2.name() );
    writeTextElement( "mLightGreen2", pT->mLightGreen_2.name() );
    writeTextElement( "mYellow2", pT->mYellow_2.name() );
    writeTextElement( "mLightYellow2", pT->mLightYellow_2.name() );
    writeTextElement( "mCyan2", pT->mCyan_2.name() );
    writeTextElement( "mLightCyan2", pT->mLightCyan_2.name() );
    writeTextElement( "mMagenta2", pT->mMagenta_2.name() );
    writeTextElement( "mLightMagenta2", pT->mLightMagenta_2.name() );
    writeTextElement( "mWhite2", pT->mWhite_2.name() );
    writeTextElement( "mLightWhite2", pT->mLightWhite_2.name() );
    writeTextElement( "mSpellDic", pT->mSpellDic );
    writeTextElement( "mLineSize", QString::number(pT->mLineSize) );
    writeTextElement( "mRoomSize", QString::number(pT->mRoomSize) );
    writeEndElement(); // end Host tag
    writeEndElement(); // end HostPackage tag

    writeStartElement( "TriggerPackage" );
    bool ret = true;
    typedef list<TTrigger *>::const_iterator ItTriggerUnit;
    for( ItTriggerUnit it1 = pT->mTriggerUnit.mTriggerRootNodeList.begin(); it1 != pT->mTriggerUnit.mTriggerRootNodeList.end(); it1++)
    {
        TTrigger * pChildTrigger = *it1;
        if( ! pChildTrigger ) continue;
        if( ! pChildTrigger->isTempTrigger() )
        {
            ret = writeTrigger( pChildTrigger );
        }
    }
    writeEndElement(); //end trigger package tag

    writeStartElement("TimerPackage");
    typedef list<TTimer *>::const_iterator ItTimerUnit;
    for( ItTimerUnit it2 = pT->mTimerUnit.mTimerRootNodeList.begin(); it2 != pT->mTimerUnit.mTimerRootNodeList.end(); it2++)
    {
        TTimer * pChildTimer = *it2;
        if( ! pChildTimer->isTempTimer() )
        {
            ret = writeTimer( pChildTimer );
        }
    }
    writeEndElement();

    writeStartElement("AliasPackage");
    typedef list<TAlias *>::const_iterator ItAliasUnit;
    for( ItAliasUnit it3 = pT->mAliasUnit.mAliasRootNodeList.begin(); it3 != pT->mAliasUnit.mAliasRootNodeList.end(); it3++)
    {
        TAlias * pChildAlias = *it3;
        if( ! pChildAlias->isTempAlias() )
        {
            ret = writeAlias( pChildAlias );
        }
    }
    writeEndElement();

    writeStartElement("ActionPackage");
    typedef list<TAction *>::const_iterator ItActionUnit;
    for( ItActionUnit it4 = pT->mActionUnit.mActionRootNodeList.begin(); it4 != pT->mActionUnit.mActionRootNodeList.end(); it4++)
    {
        TAction * pChildAction = *it4;
        ret = writeAction( pChildAction );
    }
    writeEndElement();

    writeStartElement("ScriptPackage");
    typedef list<TScript *>::const_iterator ItScriptUnit;
    for( ItScriptUnit it5 = pT->mScriptUnit.mScriptRootNodeList.begin(); it5 != pT->mScriptUnit.mScriptRootNodeList.end(); it5++)
    {
        TScript * pChildScript = *it5;
        ret = writeScript( pChildScript );
    }
    writeEndElement();

    writeStartElement("KeyPackage");
    typedef list<TKey *>::const_iterator ItKeyUnit;
    for( ItKeyUnit it6 = pT->mKeyUnit.mKeyRootNodeList.begin(); it6 != pT->mKeyUnit.mKeyRootNodeList.end(); it6++)
    {
        TKey * pChildKey = *it6;
        ret = writeKey( pChildKey );
    }
    writeEndElement();

    return ret;
}
开发者ID:daagar,项目名称:Mudlet,代码行数:101,代码来源:XMLexport.cpp


注:本文中的TAlias::isTempAlias方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。