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

C++ GetRows函数代码示例

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

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



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

示例1: SetOffset

void CGUIPanelContainer::ValidateOffset()
{
  if (!m_layout) return;
  // first thing is we check the range of our offset
  // don't validate offset if we are scrolling in case the tween image exceed <0, 1> range
  if (GetOffset() > (int)GetRows() - m_itemsPerPage || (!m_scroller.IsScrolling() && m_scroller.GetValue() > ((int)GetRows() - m_itemsPerPage) * m_layout->Size(m_orientation)))
  {
    SetOffset(std::max(0, (int)GetRows() - m_itemsPerPage));
    m_scroller.SetValue(GetOffset() * m_layout->Size(m_orientation));
  }
  if (GetOffset() < 0 || (!m_scroller.IsScrolling() && m_scroller.GetValue() < 0))
  {
    SetOffset(0);
    m_scroller.SetValue(0);
  }
}
开发者ID:0xheart0,项目名称:xbmc,代码行数:16,代码来源:GUIPanelContainer.cpp


示例2: RowGetFocused

void CSimpleReport::RowDelete()
{
	int idx = RowGetFocused();
	GetRecords()->RemoveAt(idx);
	Populate();
	SetFocusedRow(GetRows()->GetAt(idx));
	SetFocus();
}
开发者ID:tlogger,项目名称:TMon,代码行数:8,代码来源:SimpleReport.cpp


示例3: GetRows

NS_IMETHODIMP
HTMLFrameSetElement::GetRows(nsAString& aRows)
{
  nsString rows;
  GetRows(rows);
  aRows = rows;
  return NS_OK;
}
开发者ID:JSilver99,项目名称:mozilla-central,代码行数:8,代码来源:HTMLFrameSetElement.cpp


示例4: msg

void CGUIBaseContainer::SetPageControlRange()
{
  if (m_pageControl)
  {
    CGUIMessage msg(GUI_MSG_LABEL_RESET, GetID(), m_pageControl, m_itemsPerPage, GetRows());
    SendWindowMessage(msg);
  }
}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:8,代码来源:GUIBaseContainer.cpp


示例5: GetParent

void StatWin::ReSize()
{
    wxSize cs = GetParent()->GetClientSize();
    wxSize new_size;
    new_size.x = cs.x;
    new_size.y = 22 * GetRows();
    SetSize(new_size);
}
开发者ID:Choony,项目名称:OpenCPN,代码行数:8,代码来源:statwin.cpp


示例6: mid

void BaseGrid::ScrollTo(int y) {
	int nextY = mid(0, y, GetRows() - 1);
	if (yPos != nextY) {
		yPos = nextY;
		scrollBar->SetThumbPosition(yPos);
		Refresh(false);
	}
}
开发者ID:sthenc,项目名称:Aegisub,代码行数:8,代码来源:base_grid.cpp


示例7: GetRows

NS_IMETHODIMP
HTMLFrameSetElement::GetRows(nsAString& aRows)
{
  DOMString rows;
  GetRows(rows);
  rows.ToString(aRows);
  return NS_OK;
}
开发者ID:bgrins,项目名称:gecko-dev,代码行数:8,代码来源:HTMLFrameSetElement.cpp


示例8: Clear

bool NFCRecord::Clear()
{
    for (int i = GetRows() - 1; i >= 0; i--)
    {
        Remove(i);
    }

    return true;
}
开发者ID:tcomy,项目名称:NoahGameFrame,代码行数:9,代码来源:NFCRecord.cpp


示例9: ValidRow

bool NFCRecord::ValidRow(int nRow) const
{
    if (nRow >= GetRows() || nRow < 0)
    {
        return false;
    }

    return true;
}
开发者ID:tcomy,项目名称:NoahGameFrame,代码行数:9,代码来源:NFCRecord.cpp


示例10: GetRows

///////////////////////////
// Gets first selected row
int BaseGrid::GetFirstSelRow() {
	int nrows = GetRows();
	for (int i=0;i<nrows;i++) {
		if (IsInSelection(i,0)) {
			return i;
		}
	}
	return -1;
}
开发者ID:BackupTheBerlios,项目名称:aegisub-svn,代码行数:11,代码来源:base_grid.cpp


示例11: GetType

//---------------------------------------------------------------------------
bool IValue::operator!=(const IValue &a_Val) const
{
    char_type type1 = GetType(),
        type2 = a_Val.GetType();

    if (type1 == type2 || (IsScalar() && a_Val.IsScalar()))
    {
        switch (GetType())
        {
        case 's': return GetString() != a_Val.GetString();
        case 'i':
        case 'f': return GetFloat() != a_Val.GetFloat();
        case 'c': return (GetFloat() != a_Val.GetFloat()) || (GetImag() != a_Val.GetImag());
        case 'b': return GetBool() != a_Val.GetBool();
        case 'v': return true;
        case 'm': if (GetRows() != a_Val.GetRows() || GetCols() != a_Val.GetCols())
        {
            return true;
        }
                  else
                  {
                      for (int i = 0; i < GetRows(); ++i)
                      {
                          if (const_cast<IValue*>(this)->At(i) != const_cast<IValue&>(a_Val).At(i))
                              return true;
                      }

                      return false;
                  }
        default:
            ErrorContext err;
            err.Errc = ecINTERNAL_ERROR;
            err.Pos = -1;
            err.Type2 = GetType();
            err.Type1 = a_Val.GetType();
            throw ParserError(err);
        } // switch this type
    }
    else
    {
        return true;
    }
}
开发者ID:cloudqiu1110,项目名称:math-parser-benchmark-project,代码行数:44,代码来源:mpIValue.cpp


示例12: GetClientSize

/////////////
// Scroll to
void BaseGrid::ScrollTo(int y) {
	int w,h;
	GetClientSize(&w,&h);
	int nextY = MID(0,y,GetRows()+2 - h/lineHeight);
	if (yPos != nextY) {
		yPos = nextY;
		if (scrollBar->IsEnabled()) scrollBar->SetThumbPosition(yPos);
		Refresh(false);
	}
}
开发者ID:BackupTheBerlios,项目名称:aegisub-svn,代码行数:12,代码来源:base_grid.cpp


示例13: D

CMotion2DImage<Type> CMotion2DImage<Type>::operator-(const CMotion2DImage<Type> &image)
{

  CMotion2DImage<Type> D(GetRows(),GetCols());

  for (unsigned i=0; i<npixels; i++) {
    D.bitmap[i] = bitmap[i] - image.bitmap[i];
  }
  return D;
}
开发者ID:ciolben,项目名称:asmv,代码行数:10,代码来源:CMotion2DImage_base.cpp


示例14: BeginBatch

void BaseGrid::OnSubtitlesOpen() {
	BeginBatch();
	ClearMaps();
	UpdateMaps();

	if (GetRows()) {
		int row = context->ass->GetScriptInfoAsInt("Active Line");
		if (row < 0 || row >= GetRows())
			row = 0;

		SetActiveLine(GetDialogue(row));
		SelectRow(row);
	}

	ScrollTo(context->ass->GetScriptInfoAsInt("Scroll Position"));

	EndBatch();
	SetColumnWidths();
}
开发者ID:sthenc,项目名称:Aegisub,代码行数:19,代码来源:base_grid.cpp


示例15: GetRows

void CSimpleReport::RowSetFocused(CXTPReportRecord* pRec)
{
	CXTPReportRows* pRows = GetRows();
	for (int i = 0; i < pRows->GetCount(); i++) {
		CXTPReportRow* pRow = pRows->GetAt(i);
		if (pRow->GetRecord() == pRec) {
			SetFocusedRow(pRow);
			return;
		}
	}
}
开发者ID:tlogger,项目名称:TMon,代码行数:11,代码来源:SimpleReport.cpp


示例16: GetWidth

int  Table::GetWidth(int zoom) const {
	int cx = 0;
	for(int i = 0; i < GetRows(); i++) {
		const Array<TableCell>& row = cell[i];
		int x = 0;
		for(int j = 0; j < row.GetCount(); j++)
			x = max(x, row[j].GetWidth(zoom) / row[j].GetRatio());
		cx = max(cx, x * GetTotalRatio(row));
	}
	return cx + 2 * GetFrameWidth();
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:11,代码来源:DocTable.cpp


示例17: GetRows

// Result = A' * Vec
void TNGraphMtx::PMultiplyT(const TFltV& Vec, TFltV& Result) const {
  const int RowN = GetRows();
  Assert(Vec.Len() >= RowN && Result.Len() >= RowN);
  const THash<TInt, TNGraph::TNode>& NodeH = Graph->NodeH;
  for (int i = 0; i < RowN; i++) Result[i] = 0.0;
  for (int j = 0; j < RowN; j++) {
    const TIntV& RowV = NodeH[j].OutNIdV;
    for (int i = 0; i < RowV.Len(); i++) {
      Result[RowV[i]] += Vec[j];
    }
  }
}
开发者ID:Networks-Learning,项目名称:infopath,代码行数:13,代码来源:gsvd.cpp


示例18: GetRows

NS_IMETHODIMP
nsHTMLTableSectionElement::InsertRow(PRInt32 aIndex,
                                     nsIDOMHTMLElement** aValue)
{
  *aValue = nsnull;

  if (aIndex < -1) {
    return NS_ERROR_DOM_INDEX_SIZE_ERR;
  }

  nsCOMPtr<nsIDOMHTMLCollection> rows;
  GetRows(getter_AddRefs(rows));

  PRUint32 rowCount;
  rows->GetLength(&rowCount);

  if (aIndex > (PRInt32)rowCount) {
    return NS_ERROR_DOM_INDEX_SIZE_ERR;
  }

  PRBool doInsert = (aIndex < PRInt32(rowCount)) && (aIndex != -1);

  // create the row
  nsCOMPtr<nsINodeInfo> nodeInfo;
  nsContentUtils::NameChanged(mNodeInfo, nsGkAtoms::tr,
                              getter_AddRefs(nodeInfo));

  nsCOMPtr<nsIContent> rowContent = NS_NewHTMLTableRowElement(nodeInfo);
  if (!nodeInfo) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  nsCOMPtr<nsIDOMNode> rowNode(do_QueryInterface(rowContent));
  NS_ASSERTION(rowNode, "Should implement nsIDOMNode!");

  nsCOMPtr<nsIDOMNode> retChild;

  nsresult rv;
  if (doInsert) {
    nsCOMPtr<nsIDOMNode> refRow;
    rows->Item(aIndex, getter_AddRefs(refRow));

    rv = InsertBefore(rowNode, refRow, getter_AddRefs(retChild));
  } else {
    rv = AppendChild(rowNode, getter_AddRefs(retChild));
  }

  if (retChild) {
    CallQueryInterface(retChild, aValue);
  }

  return NS_OK;
}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:53,代码来源:nsHTMLTableSectionElement.cpp


示例19: CreateTextureObject

void CDXTexture::LoadToGPU()
{
  if (!m_pixels)
  {
    // nothing to load - probably same image (no change)
    return;
  }

  if (m_texture.Get() == NULL)
  {
    CreateTextureObject();
    if (m_texture.Get() == NULL)
    {
      CLog::Log(LOGDEBUG, "CDXTexture::CDXTexture: Error creating new texture for size %d x %d", m_textureWidth, m_textureHeight);
      return;
    }
  }

  D3DLOCKED_RECT lr;
  if (m_texture.LockRect( 0, &lr, NULL, D3DLOCK_DISCARD ))
  {
    unsigned char *dst = (unsigned char *)lr.pBits;
    unsigned char *src = m_pixels;
    unsigned int dstPitch = lr.Pitch;
    unsigned int srcPitch = GetPitch();
    unsigned int minPitch = std::min(srcPitch, dstPitch);

    unsigned int rows = GetRows();
    if (srcPitch == dstPitch)
    {
      memcpy(dst, src, srcPitch * rows);
    }
    else
    {
      for (unsigned int y = 0; y < rows; y++)
      {
        memcpy(dst, src, minPitch);
        src += srcPitch;
        dst += dstPitch;
      }
    }
  }
  else
  {
    CLog::Log(LOGERROR, __FUNCTION__" - failed to lock texture");
  }
  m_texture.UnlockRect(0);

  delete [] m_pixels;
  m_pixels = NULL;

  m_loadedToGPU = true;
}
开发者ID:AWilco,项目名称:xbmc,代码行数:53,代码来源:TextureDX.cpp


示例20: GDALOpen

int Raster::Uniform(const char * pOutputRaster, double fValue)
{

    // Open up the Input File
    GDALDataset * pInputDS = (GDALDataset*) GDALOpen(m_sFilePath, GA_ReadOnly);
    if (pInputDS == NULL)
        throw RasterManagerException( INPUT_FILE_ERROR, "Input file could not be opened");

    GDALRasterBand * pRBInput = pInputDS->GetRasterBand(1);

    // Create the output dataset for writing
    GDALDataset * pOutputDS = CreateOutputDS(pOutputRaster, this);
    GDALRasterBand * pOutputRB = pOutputDS->GetRasterBand(1);

    // Assign our buffers
    double * pInputLine = (double*) CPLMalloc(sizeof(double) * GetCols());
    double * pOutputLine = (double*) CPLMalloc(sizeof(double) * GetCols());

    // Loop over rows
    for (int i=0; i < GetRows(); i++)
    {
        // Populate the buffer
        pRBInput->RasterIO(GF_Read, 0,  i, GetCols(), 1, pInputLine, GetCols(), 1, GDT_Float64, 0, 0);

        // Loop over columns
        for (int j=0; j < GetCols(); j++)
        {
            if (pInputLine[j] != GetNoDataValue()){
                pOutputLine[j] = fValue;
            }
            else {
                pOutputLine[j] = GetNoDataValue();
            }

        }
        // Write the row
        pOutputRB->RasterIO(GF_Write, 0, i, GetCols(), 1, pOutputLine, GetCols(), 1, GDT_Float64, 0, 0 );
    }

    CPLFree(pOutputLine);
    CPLFree(pInputLine);

    CalculateStats(pOutputDS->GetRasterBand(1));

    if ( pInputDS != NULL)
        GDALClose(pInputDS);
    if ( pOutputDS != NULL)
        GDALClose(pOutputDS);

    return PROCESS_OK;

}
开发者ID:JamesSLC,项目名称:rasterman,代码行数:52,代码来源:raster.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetRunningObjectTable函数代码示例发布时间:2022-05-30
下一篇:
C++ GetRow函数代码示例发布时间: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