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


C++ DBResultRow::getDoubleNC方法代码示例

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


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

示例1: loadStaStationTypes

bool EVEStatic::loadStaStationTypes()
{
    DBQueryResult result;
    DBResultRow row;
    std::string columns = "stationTypeID, dockEntryX, dockEntryY, dockEntryZ,"
            " dockOrientationX, dockOrientationY, dockOrientationZ,"
            " operationID, officeSlots, reprocessingEfficiency, conquerable,"
            " dockingBayGraphicID, hangarGraphicID";
    std::string qry = "SELECT " + columns + " FROM staStationTypes LEFT JOIN extStaStationTypes Using(stationTypeID)";
    if (!DBcore::RunQuery(result, qry.c_str()))
    {
        SysLog::Error("Static DB", "Error in query: %s", result.error.c_str());
        return false;
    }
    while (result.GetRow(row))
    {
        uint32 stationTypeID = row.GetInt(0);
        double dockEntryX = row.GetDouble(1);
        double dockEntryY = row.GetDouble(2);
        double dockEntryZ = row.GetDouble(3);
        double dockOrientationX = row.GetDouble(4);
        double dockOrientationY = row.GetDouble(5);
        double dockOrientationZ = row.GetDouble(6);
        uint32 operationID = row.getIntNC(7);
        uint32 officeSlots = row.getIntNC(8);
        double reprocessingEfficiency = row.getDoubleNC(9);
        bool conquerable = row.GetBool(10);
        // From extStaStationTypes
        uint32 dockingBayGraphicID = row.getIntNC(11);
        uint32 hangarGraphicID = row.getIntNC(12);
        new StaStationType(
                           stationTypeID,
                           dockEntryX,
                           dockEntryY,
                           dockEntryZ,
                           dockOrientationX,
                           dockOrientationY,
                           dockOrientationZ,
                           operationID,
                           officeSlots,
                           reprocessingEfficiency,
                           conquerable,
                           dockingBayGraphicID,
                           hangarGraphicID
                           );
    }

    return true;
}
开发者ID:eve-moo,项目名称:evemu_server,代码行数:49,代码来源:StaStationType.cpp


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