• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetField函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetField函数的典型用法代码示例。如果您正苦于以下问题:C++ GetField函数的具体用法?C++ GetField怎么用?C++ GetField使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: IMPORT_LOG0

/*
    This is where the real work happens!
    Go through the field map and set the data in a new database row
*/
nsresult nsTextAddress::ProcessLine(const nsAString &aLine, nsString& errors)
{
    if (!m_fieldMap) {
        IMPORT_LOG0("*** Error, text import needs a field map\n");
        return NS_ERROR_FAILURE;
    }

    nsresult rv;

    // Wait until we get our first non-empty field, then create a new row,
    // fill in the data, then add the row to the database.
    nsCOMPtr<nsIMdbRow> newRow;
    nsAutoString   fieldVal;
    int32_t        fieldNum;
    int32_t        numFields = 0;
    bool           active;
    rv = m_fieldMap->GetMapSize(&numFields);
    for (int32_t i = 0; (i < numFields) && NS_SUCCEEDED(rv); i++) {
        active = false;
        rv = m_fieldMap->GetFieldMap(i, &fieldNum);
        if (NS_SUCCEEDED(rv))
            rv = m_fieldMap->GetFieldActive(i, &active);
        if (NS_SUCCEEDED(rv) && active) {
            if (GetField(aLine, i, fieldVal, m_delim)) {
                if (!fieldVal.IsEmpty()) {
                    if (!newRow) {
                        rv = m_database->GetNewRow(getter_AddRefs(newRow));
                        if (NS_FAILED(rv)) {
                            IMPORT_LOG0("*** Error getting new address database row\n");
                        }
                    }
                    if (newRow) {
                        rv = m_fieldMap->SetFieldValue(m_database, newRow, fieldNum, fieldVal.get());
                    }
                }
            }
            else
                break;
        }
        else if (active) {
          IMPORT_LOG1("*** Error getting field map for index %ld\n", (long) i);
        }
    }

    if (NS_SUCCEEDED(rv) && newRow)
      rv = m_database->AddCardRowToDB(newRow);

    return rv;
}
开发者ID:MoonchildProductions,项目名称:FossaMail,代码行数:53,代码来源:nsTextAddress.cpp


示例2: ProcessFieldAnim

void ProcessFieldAnim(int x, int y)
{
    int oldt, t;
    TSprite *s;
    int rx, ry, drawx, drawy;
    
    t = oldt = GetField(x, y)->Terrain2;
    t = CycleF(t, 389, 390, 900, 901, 902, 903, 904, 905);
    t = CycleF(t, 391, 392, 906, 907, 908, 909, 910, 911);
    t = CycleF(t, 395, 396, 397, 912, 913, 914, 915, 916);
    t = CycleF(t, 398, 399, 400, 918, 919, 920, 921, 922);
    if (t != oldt) {
        PlaceL2(x, y, t, 1);
        s = (TSprite*)(BmpTerr2[GetField(x, y)->Terrain2]);
        if (s) {
            rx = GetRelX(x), ry = GetRelY(y);
            drawx = 28 * (rx - ry) + 28;
            drawy = 14 * (rx + ry - (GetField(x, y)->Height)) + 14;
            StartDraw(drawx - s->dx, drawy - s->dy, s->w, s->h);
            PaintUnits();
            EndDraw();
        }
    }
}
开发者ID:zarevucky,项目名称:signus,代码行数:24,代码来源:fields.cpp


示例3: IsHeartRateLocalDeviceTypeValid

    ///////////////////////////////////////////////////////////////////////
    // Checks the validity of heart_rate_local_device_type field
    // Returns FIT_TRUE if field is valid
    ///////////////////////////////////////////////////////////////////////
    FIT_BOOL IsHeartRateLocalDeviceTypeValid() const
    {
        const Field* field = GetField(20);
        if( FIT_NULL == field )
        {
            return FIT_FALSE;
        }

        if( !CanSupportSubField( field, (FIT_UINT16) Profile::DIVE_SETTINGS_MESG_HEART_RATE_SOURCE_FIELD_HEART_RATE_LOCAL_DEVICE_TYPE ) )
        {
            return FIT_FALSE;
        }

        return field->IsValueValid(0, (FIT_UINT16) Profile::DIVE_SETTINGS_MESG_HEART_RATE_SOURCE_FIELD_HEART_RATE_LOCAL_DEVICE_TYPE);
    }
开发者ID:tmholt,项目名称:BC.Repository,代码行数:19,代码来源:fit_dive_settings_mesg.hpp


示例4: GetField

const FIT_UINT16 Profile::GetSubFieldIndex(const std::string& mesgName, const std::string& fieldName, const std::string& subFieldName)
{
   const FIELD *field = GetField(mesgName, fieldName);

   if (field == NULL)
      return FIT_SUBFIELD_INDEX_MAIN_FIELD;

   for (FIT_UINT16 i = 0; i < field->numSubFields; i++)
   {
      if (field->subFields[i].name == subFieldName)
         return i;
   }

   return FIT_SUBFIELD_INDEX_MAIN_FIELD;
}
开发者ID:McWare,项目名称:cycling-data-view,代码行数:15,代码来源:fit_profile.cpp


示例5: while

void MainWindow::onLoadTareas()
{
    addingTarea_ = true;

    while (ui->tblTareas->rowCount())
        ui->tblTareas->removeRow(0);

    //Obtenemos las tareas
    QSqlQuery q = db_.exec("SELECT * "
                           "FROM tareas "
                           "WHERE id_categ = " + ui->comboCategoria->currentData().toString());

    while (q.next()) {
        //Añadimos la tarea a la tabla de categorias
        int rowNumber = ui->tblTareas->rowCount();
        int id = GetField(q, "id").toInt();
        ui->tblTareas->insertRow(rowNumber);

        QTableWidgetItem* item = new QTableWidgetItem(GetField(q, "name").toString());
        item->setData(Qt::UserRole, id);
        ui->tblTareas->setItem(rowNumber, 0, item);

        ui->tblTareas->setItem(rowNumber, 1, new QTableWidgetItem(GetField(q, "date").toString()));

        item = new QTableWidgetItem("");
        item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
        if (GetField(q, "done").toInt())
            item->setCheckState(Qt::Checked);
        else
            item->setCheckState(Qt::Unchecked);
        ui->tblTareas->setItem(rowNumber, 2, item);
    }
    //Activamos el sorting en la tabla de categorias
    ui->tblTareas->setSortingEnabled(true);
    addingTarea_ = false;
}
开发者ID:DavidHerBet,项目名称:Curso-Qt-OSL-Tareas,代码行数:36,代码来源:mainwindow.cpp


示例6: FieldTurnEnd

void FieldTurnEnd(int x, int y)
{
    int oldt, t;
    int anim = 1;
    
    t = oldt = GetField(x, y)->Terrain2;
    t = DegradeF(t, 401, 398, 399, 400, 918, 919, 920, 921, 922);
    t = DegradeF(t, 398, 395, 396, 397, 912, 913, 914, 915, 916);
    t = DegradeF(t, 393, 391, 392, 906, 907, 908, 909, 910, 911);
    t = DegradeF(t, 391, 389, 390, 900, 901, 902, 903, 904, 905);
    if (t != oldt) {
        if ((t == 401) || (t == 393)) anim = 0;
        PlaceL2(x, y, t, anim);
    }
}
开发者ID:zarevucky,项目名称:signus,代码行数:15,代码来源:fields.cpp


示例7: IsAnalogLayoutValid

    ///////////////////////////////////////////////////////////////////////
    // Checks the validity of analog_layout field
    // Returns FIT_TRUE if field is valid
    ///////////////////////////////////////////////////////////////////////
    FIT_BOOL IsAnalogLayoutValid() const
    {
        const Field* field = GetField(1);
        if( FIT_NULL == field )
        {
            return FIT_FALSE;
        }

        if( !CanSupportSubField( field, (FIT_UINT16) Profile::WATCHFACE_SETTINGS_MESG_LAYOUT_FIELD_ANALOG_LAYOUT ) )
        {
            return FIT_FALSE;
        }

        return field->IsValueValid(0, (FIT_UINT16) Profile::WATCHFACE_SETTINGS_MESG_LAYOUT_FIELD_ANALOG_LAYOUT);
    }
开发者ID:tmholt,项目名称:BC.Repository,代码行数:19,代码来源:fit_watchface_settings_mesg.hpp


示例8: AssignResult5

int AssignResult5 ()
{
    int i, t = 0;
    
    Base8 = GetField (B8X, B8Y) -> Unit;
    if (Base8 == NO_UNIT || Units [Base8] -> Type % BADLIFE != unBase) 
        Base8 = NO_UNIT;

    for (i = 0; i < BADLIFE; i++)
        if (Units [i] != NULL && Units [i] -> Type < unRadar) t++;
    if (t == 0) return -1; // GoodLife prohral  

    if (Base8 == NO_UNIT || Base8 < BADLIFE) return 1; // BadLife prohral
    
    return 0; // Zatim se jeste hraje
}
开发者ID:danvac,项目名称:signus,代码行数:16,代码来源:ai5.cpp


示例9: GetFormal

	const IAccess* CFrame::GetAccess( std::string _name ) const
	{
		const IAccess* result = GetFormal( _name );
		if( result != 0 ) {
			return result;
		}
		result = GetLocal( _name );
		if( result != 0 ) {
			return result;
		}
		result = GetField( _name );
		if( result != 0 ) {
			return result;
		}
		return nullptr;
	}
开发者ID:goalkick,项目名称:Compilers,代码行数:16,代码来源:Frame.cpp


示例10: GetField

 // get the subtype
 string MimeHeader::GetSubType() const
 {
    string strSubType;
    MimeField *pfd = GetField(CMimeConst::ContentType());
    if (pfd != NULL)
    {
       string strType;
       pfd->GetValue(strType);
       string::size_type nSlash = strType.find('/');
       if (nSlash > 0)
          strSubType = strType.substr(nSlash+1);
    }
    else
       strSubType = "plain";
    return strSubType;
 }
开发者ID:Bill48105,项目名称:hmailserver,代码行数:17,代码来源:Mime.cpp


示例11: HideHelpers

void TThor::GoOverground(int over)
{
    int i;

    if (over == IsOverground) return;

    if (TimeUnits < 30) {
        if (ID < BADLIFE) Message(MSG_OUT_OF_TIME);
        return;
    }
    TimeUnits -= 30;
    IsOverground = over;
    HideHelpers();
    if (GetField(X, Y)->Visib == 2) {
        if (over) PlaySample(GetUnitSound(6), 6, EffectsVolume, GetFieldPanning(X, Y));
        else PlaySample(GetUnitSound(7), 6, EffectsVolume, GetFieldPanning(X, Y));
    }
    if (over) {
        for (i = 9; i < 16; i++) {
            ActualSprite = i;
            PaintUnit();
            SDL_Delay(iniAnimDelay2);
        }
        Orient = 3; ActualSprite = 3;
        Weapons[0]->Ammo = 8;
        TotalRockets -= 8;
        if (TotalRockets < 0) {
            Weapons[0]->Ammo += TotalRockets;
            TotalRockets = 0;
        }
        Defense[0] = -utTH_DND0,    Defense[1] -= utTH_DND1,    Defense[2] -= utTH_DND2;
    }
    else {
        Rotate(3);
        for (i = 15; i > 8; i--) {
            ActualSprite = i;
            PaintUnit();
            SDL_Delay(iniAnimDelay2);
        }
        ActualSprite = 8;
        TotalRockets += Weapons[0]->Ammo;
        Weapons[0]->Ammo = 0;
        Defense[0] += utTH_DND0,    Defense[1] += utTH_DND1,    Defense[2] += utTH_DND2;
    }
    ShowHelpers();
    PaintUnit();
}
开发者ID:danvac,项目名称:signus,代码行数:47,代码来源:utowers.cpp


示例12: s_Field

void CDatabaseManager::RemoveField(QString *pICAO)
{
    //First remove the directory
    s_Field* lfld = new s_Field();
    GetField(*pICAO, lfld);
    QDir ldir(lfld->Path);
    ldir.cd(lfld->Path);
    QStringList lFiles;
    lFiles = ldir.entryList();
    QString fileName;
    foreach(fileName, lFiles)
    {
        QString fn(lfld->Path);
        fn.append("/");
        fn.append(fileName);
        QFile::remove(fn);
    }
开发者ID:joergpauly,项目名称:chartbutler,代码行数:17,代码来源:cdatabasemanager.cpp


示例13: AssignResult19

int AssignResult19 ()
{
    int i, t = 0;

    Base1 = GetField (B1X, B1Y) -> Unit;
    if (Base1 == NO_UNIT || Units [Base1] -> Type % BADLIFE != unArtefactHouse) 
        Base1 = NO_UNIT;
    
    for (i = 0; i < BADLIFE; i++)
        if (Units [i] != NULL) t++;
    if (t == 0) return -1; // GoodLife prohral  
    
    if (Base1 == NO_UNIT || Base1 < BADLIFE) return 1;

    
    return 0; // Zatim se jeste hraje
}
开发者ID:danvac,项目名称:signus,代码行数:17,代码来源:ai19.cpp


示例14: AssignResult8

int AssignResult8 ()
{
    int i, t = 0;

    Docks2 = GetField (D2X, D2Y) -> Unit;
    if (Docks2 == NO_UNIT || Units [Docks2] -> Type % BADLIFE != unDocks) 
        Docks2 = NO_UNIT;
    
    for (i = 0; i < BADLIFE; i++)
        if (Units [i] != NULL) t++;
    if (t == 0) return -1; // GoodLife prohral  
    
    if (Docks2 == NO_UNIT || Docks2 < BADLIFE) return 1; // BadLife prohral

    
    return 0; // Zatim se jeste hraje
}
开发者ID:danvac,项目名称:signus,代码行数:17,代码来源:ai8.cpp


示例15: luacapstone_memoperand_metaIndex

static int luacapstone_memoperand_metaIndex(lua_State* l)
{
    sparc_op_mem* memop = *((sparc_op_mem**)lua_touserdata(l, 1));
    const char* field = lua_tostring(l, 2);

    VALIDATE_FIELD(sparc_op_mem, field);
    const sparc_op_mem_FieldInfo* fi = GetField(sparc_op_mem, field);

    if(fi->IsIntegral)
        lua_pushinteger(l, fieldValue<lua_Integer>(memop, fi));
    else
    {
        NOT_IMPLEMENTED(field);
    }

    return 1;
}
开发者ID:baiyunping333,项目名称:PREF,代码行数:17,代码来源:sparc.cpp


示例16: SetCombo

void RecConditionForm :: SetCombo(short typ)
{
	wComboField *fld = (wComboField *)GetField(E_CONDITION);
	fld->Clear();
	fld->DeleteAll();

	if (typ == 0)	// error
	{
		fld->AddString("03 - Cannot Open...");
		fld->AddString("04 - Resource...");
		fld->AddString("05 - General Failure...");
	}
	else			// warning
	{
		fld->AddString("06 - Note that...");
	}
}
开发者ID:OS2World,项目名称:DEV-SAMPLES-ObjectPM,代码行数:17,代码来源:errdemo.cpp


示例17: main

//メイン関数
int main() {
    char read[100];
    int i,j;
    int line;

    srand((unsigned int)time(NULL));
    line=GetField();

    SetMan();
    while(1) {
        system("cls");
        output();
        move();
    }

    printf("end");
    return 0;
}
开发者ID:BlaMilk,项目名称:rogue,代码行数:19,代码来源:rogue.c


示例18: CString

CString CYazOpacXMLParser::GetValue(CString name)
{
	if (name.IsEmpty() || m_Document == NULL)
		return CString("");

	CString str(_T(""));
	if (name.CompareNoCase(STR_AUTHOR) == 0) {
		str = GetField(_T("100"));
		if (str.IsEmpty())
			str = GetField(_T("700"));
	} else if (name.CompareNoCase(STR_TITLE) == 0) {
		str = GetField(_T("245"));
	} else if (name.CompareNoCase(STR_EDITION) == 0) {
		str = GetField(_T("250"));
	} else if (name.CompareNoCase(STR_SERIES) == 0) {
		str = GetField(_T("490"));
	} else if (name.CompareNoCase(STR_PUBLISHER) == 0) {
		str = GetField(_T("260"));
	} else if (name.CompareNoCase(STR_ADDRESS) == 0) {
		str = GetField(_T("490"));
	} else if (name.CompareNoCase(STR_YEAR) == 0) {
		str = GetField(_T("490"));
		int i = str.GetLength()-1;
		_TUCHAR c = str.GetAt(i--);
		while (_istdigit(c) || c == _T('-')) {
			c = str.GetAt(i--);
		}
		str = str.Mid(i);
	} else if (name.CompareNoCase(_T("ISBN")) == 0) {
		str = GetField(_T("020"));
	} else if (name.CompareNoCase(_T("Topic")) == 0) {
	} else if (name.CompareNoCase(_T("Contents")) == 0) {
	} else if (name.CompareNoCase(_T("Performer")) == 0) {
	}

	return str;
}
开发者ID:stievie,项目名称:bibedt,代码行数:37,代码来源:YazOpacXMLParser.cpp


示例19: NoLabelInicialisationException

af::TList Scheme::GetEqvList()
{
	if(Root.IsNull())
	{
		throw NoLabelInicialisationException("Scheme: label do not inicialised.");
	}
	bool ok;
	TList eqv (GetField("EqvList",ok));

	if (ok)
	{
		EqvList = eqv;
		return EqvList;
	}
	
	SetEqvList ();

	return EqvList;
}
开发者ID:laduga,项目名称:pradis,代码行数:19,代码来源:Scheme.cpp


示例20: luacapstone_sparc_metaIndex

static int luacapstone_sparc_metaIndex(lua_State* l)
{
    cs_sparc* sparc = (*(cs_sparc**)lua_touserdata(l, 1));
    const char* field = lua_tostring(l, 2);

    VALIDATE_FIELD(cs_sparc, field);
    const cs_sparc_FieldInfo* fi = GetField(cs_sparc, field);

    if(fi->IsIntegral || fi->IsEnum)
        lua_pushinteger(l, fieldValue<lua_Integer>(sparc, fi));
    else if(fi->IsStruct)
        lua_pushcstruct(l, &(sparc->operands), &luacapstone_operandarray_metaIndex, "__sparc_operands");
    else
    {
        NOT_IMPLEMENTED(field);
    }

    return 1;
}
开发者ID:baiyunping333,项目名称:PREF,代码行数:19,代码来源:sparc.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetFieldENUMValue函数代码示例发布时间:2022-05-30
下一篇:
C++ GetFd函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap