您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetRows函数代码示例

51自学网 2021-06-01 21:14:24
  C++
这篇教程C++ GetRows函数代码示例写得很实用,希望能帮到您。

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

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


示例2: RowGetFocused

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


示例3: GetRows

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


示例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,


示例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,


示例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,


示例7: GetRows

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


示例8: Clear

bool NFCRecord::Clear(){    for (int i = GetRows() - 1; i >= 0; i--)    {        Remove(i);    }    return true;}
开发者ID:tcomy,项目名称:NoahGameFrame,代码行数:9,


示例9: ValidRow

bool NFCRecord::ValidRow(int nRow) const{    if (nRow >= GetRows() || nRow < 0)    {        return false;    }    return true;}
开发者ID:tcomy,项目名称:NoahGameFrame,代码行数:9,


示例10: GetRows

///////////////////////////// Gets first selected rowint 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,


示例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,


示例12: GetClientSize

/////////////// Scroll tovoid 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,


示例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,


示例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,


示例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,


示例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,


示例17: GetRows

// Result = A' * Vecvoid 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,


示例18: GetRows

NS_IMETHODIMPnsHTMLTableSectionElement::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,


示例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,


示例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,


示例21: DocZoomLn

void Table::GetValueRects(int zoom, Draw& w, int x, int& y, int cx, Vector<ValueRect>& vr)const {	int zfw = DocZoomLn(zoom, GetFrameWidth());	int li = 0;	cx -= 2 * zfw + DocZoom(zoom, GetLm()) + DocZoom(zoom, GetRm());	y += zfw;	while(li < GetRows()) {		Vector<Line> line;		int span = 0;		for(;;) {			int k = li + line.GetCount();			if(k >= GetRows() || line.GetCount() && !KeepLine(k) && span <= 0)				break;			span = max((line.Add() = GetLine(zoom, k, cx, NULL)).span, span);			span--;		}		y += Span(line);		RectLines(zoom, w, x, y, li, line, vr);		li += line.GetCount();	}	y += zfw;}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:22,


示例22: IAnimationBase

	CBasicAnimation::CBasicAnimation(ALLEGRO_BITMAP* sheet, size_t rows, size_t cols, double fps)		: IAnimationBase(rows, cols, fps)		, m_animationSheet(sheet)		, m_frame()		, m_frameW(DEFAULTFRAMEW)		, m_frameH(DEFAULTFRAMEH)	{		assert(m_animationSheet.IsValid() == true);		assert(rows > 0);		assert(cols > 0);		assert(fps > 0.0);		if (!m_animationSheet || !GetRows() || !GetCols() || (GetFPS() <= 0))			abort();		if (m_animationSheet)		{			m_frameW = m_animationSheet.GetWidth() / GetCols();			m_frameH = m_animationSheet.GetHeight() / GetRows();			FrameChanged();		}	}
开发者ID:NaturalDre,项目名称:VEngine,代码行数:22,


示例23: Allocate

void CBaseTexture::Update(unsigned int width, unsigned int height, unsigned int pitch, unsigned int format, const unsigned char *pixels, bool loadToGPU){  if (pixels == NULL)    return;  if (format & XB_FMT_DXT_MASK && !g_Windowing.SupportsDXT())  { // compressed format that we don't support    Allocate(width, height, XB_FMT_A8R8G8B8);    CDDSImage::Decompress(m_pixels, std::min(width, m_textureWidth), std::min(height, m_textureHeight), GetPitch(m_textureWidth), pixels, format);  }  else  {    Allocate(width, height, format);    unsigned int srcPitch = pitch ? pitch : GetPitch(width);    unsigned int srcRows = GetRows(height);    unsigned int dstPitch = GetPitch(m_textureWidth);    unsigned int dstRows = GetRows(m_textureHeight);    if (srcPitch == dstPitch)      memcpy(m_pixels, pixels, srcPitch * std::min(srcRows, dstRows));    else    {      const unsigned char *src = pixels;      unsigned char* dst = m_pixels;      for (unsigned int y = 0; y < srcRows && y < dstRows; y++)      {        memcpy(dst, src, std::min(srcPitch, dstPitch));        src += srcPitch;        dst += dstPitch;      }    }  }  ClampToEdge();  if (loadToGPU)    LoadToGPU();}
开发者ID:AWilco,项目名称:xbmc,代码行数:38,


示例24: m_area

ConnectThree::ConnectThree(  const int n_cols,  const int n_rows)  : m_area(n_cols, std::vector<int>(n_rows,no_player)),    m_player(ConnectThree::player1){  Restart();  //assert(m_is_player_human.size() == 3);  assert(player1 == 0);  assert(player2 == 1);  assert(player3 == 2);  assert(GetCols() == n_cols);  assert(GetRows() == n_rows);}
开发者ID:markwiering,项目名称:ProjectRichelBilderbeek,代码行数:14,


示例25: Allocate

void CBaseTexture::Update(unsigned int width, unsigned int height, unsigned int pitch, unsigned int format, const unsigned char *pixels, bool loadToGPU){  if (pixels == NULL)    return;  if (format & XB_FMT_DXT_MASK)    return;  Allocate(width, height, format);  if (m_pixels == nullptr)    return;  unsigned int srcPitch = pitch ? pitch : GetPitch(width);  unsigned int srcRows = GetRows(height);  unsigned int dstPitch = GetPitch(m_textureWidth);  unsigned int dstRows = GetRows(m_textureHeight);  if (srcPitch == dstPitch)    memcpy(m_pixels, pixels, srcPitch * std::min(srcRows, dstRows));  else  {    const unsigned char *src = pixels;    unsigned char* dst = m_pixels;    for (unsigned int y = 0; y < srcRows && y < dstRows; y++)    {      memcpy(dst, src, std::min(srcPitch, dstPitch));      src += srcPitch;      dst += dstPitch;    }  }  ClampToEdge();  if (loadToGPU)    LoadToGPU();}
开发者ID:AndyPeterman,项目名称:mrmc,代码行数:37,


示例26: switch

std::string CGUIBaseContainer::GetLabel(int info) const{  std::string label;  switch (info)  {  case CONTAINER_NUM_PAGES:    label = StringUtils::Format("%u", (GetRows() + m_itemsPerPage - 1) / m_itemsPerPage);    break;  case CONTAINER_CURRENT_PAGE:    label = StringUtils::Format("%u", GetCurrentPage());    break;  case CONTAINER_POSITION:    label = StringUtils::Format("%i", GetCursor());    break;  case CONTAINER_CURRENT_ITEM:    {      if (m_items.size() && m_items[0]->IsFileItem() && (std::static_pointer_cast<CFileItem>(m_items[0]))->IsParentFolder())        label = StringUtils::Format("%i", GetSelectedItem());      else        label = StringUtils::Format("%i", GetSelectedItem() + 1);    }    break;  case CONTAINER_NUM_ALL_ITEMS:  case CONTAINER_NUM_ITEMS:    {      unsigned int numItems = GetNumItems();      if (info == CONTAINER_NUM_ITEMS && numItems && m_items[0]->IsFileItem() && (std::static_pointer_cast<CFileItem>(m_items[0]))->IsParentFolder())        label = StringUtils::Format("%u", numItems-1);      else        label = StringUtils::Format("%u", numItems);    }    break;  case CONTAINER_NUM_NONFOLDER_ITEMS:    {      int numItems = 0;      for (auto item : m_items)      {        if (!item->m_bIsFolder)          numItems++;      }      label = StringUtils::Format("%u", numItems);    }    break;  default:    break;  }  return label;}
开发者ID:FernetMenta,项目名称:xbmc,代码行数:48,



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


C++ GetRunningObjectTable函数代码示例
C++ GetRow函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。