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

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

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

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

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

示例1: ReadId

void ColladaParser::ReadGeometry(XmlElement* e){	Geometry g;	g.id = e->Attribute("id");	g.name = e->Attribute("name");	{		auto v = e->Child("mesh")->Childs("source");		for (int ia = 0; ia < v.size(); ia++)			g.ReadSource(v[ia]);	}	{		auto v = e->Child("mesh")->Childs("vertices");		for (int ia = 0; ia < v.size(); ia++)		{			Geometry::Vertices vert;			vert.id = v[ia]->Attribute("id");			vert.positionSourceId = ReadId(v[ia]->Child("input", "semantic", "POSITION")->Attribute("source"));			vert.normalSourceId = ReadId(v[ia]->Child("input", "semantic", "NORMAL")->Attribute("source"));			vert.texcoordSourceId = ReadId(v[ia]->Child("input", "semantic", "TEXCOORD")->Attribute("source"));			g.vertices.emplace(vert.id, vert);		}	}	auto t = e->Child("mesh")->Child("triangles");	auto count = ReadInt(t->Attribute("count"));	g.triangleVerticesId = ReadId(t->Child("input")->Attribute("source"));	g.triangleIndices = ReadInts(t->Child("p")->content, count * 3);	geometries.emplace(g.id, g);}
开发者ID:ColacX,项目名称:Omega,代码行数:31,


示例2: Child

Archive::Child Archive::Child::getNext(bool& error) const {  uint32_t nextOffset = len + (len & 1); // Members are aligned to even byte boundaries.  if ((size_t)(data - (const uint8_t*)parent->data.data() + nextOffset) >= parent->data.size()) {  // End of the archive.    return Child();  }  return Child(parent, data + nextOffset, &error);}
开发者ID:Unity-Technologies,项目名称:binaryen,代码行数:7,


示例3: setExists

Void testlist::Parent::reset() const  {    setExists(true);    setFirstChild(Child());    setLastChild(Child());    setNextParentFreeParent(Parent());    setNumChilds(0);}
开发者ID:ivandzen,项目名称:HSDB,代码行数:7,


示例4: makeThread

void makeThread(nodeptr start, nodeptr stop){	int ndesc, i;	nodeptr desc[NCHILD + 1];	/* Set link to the next node */	Next(start) = stop;	/* If could descendent to thread */	if (Type(start) == CELL) {		/* Start counting */		ndesc = 0;		/* Loop over all child cells  */		for (i = 0; i < NCHILD; i++)			/* If this one is occupied */			if (Child(start)[i] != NULL)				/* Store it in the table */				desc[ndesc++] = Child(start)[i];		/* Set link to the first one */		More(start) = desc[0];		/* Thread last one to next */		desc[ndesc] = stop;		/* Loop over descendents */		for (i = 0; i < ndesc; i++)			/* Thread them together */			makeThread(desc[i], desc[i + 1]);	}}
开发者ID:petrabarus,项目名称:nbodyc,代码行数:26,


示例5: EnvWriteRetrieve

BOOLEAN EnvWriteRetrieve(OBJECT env, FILE_NUM fnum, int *offset, int *lnum){ unsigned int pos;  OBJECT link, y, z;  debug2(DET, DD, "EnvWriteRetrieve(env %d, %s)", (int) env, FileName(fnum));  debug1(DET, DDD, "  %s", EchoObject(env));  stat_writes++;  hash1(pos, env, fnum);  if( tab[pos] != nilobj )  {    for( link = Down(tab[pos]);  link != tab[pos];  link = NextDown(link) )    { Child(y, link);      Child(z, Down(y));      if( env_fnum(y) == fnum && z == env && !env_read(y) )      { MoveLink(LastUp(y), env_cache, PARENT);	*offset = env_offset(y);	*lnum   = env_lnum(y);	stat_write_hits++;	debug2(DET, DD, "EnvWriteRetrieve returning TRUE (offset %d, lnum %d)",	  *offset, *lnum);	return TRUE;      }    }  }  debug0(DET, DD, "EnvWriteRetrieve returning FALSE");  return FALSE;} /* end EnvWriteRetrieve */
开发者ID:thektulu,项目名称:lout,代码行数:25,


示例6: setExists

Void testhash::Child::reset() const  {    setExists(true);    setNextChildFreeChild(Child());    setNextParentTableListChild(Child());    setParent(Parent());    setParentKey(0);    setPrevParentTableListChild(Child());}
开发者ID:ivandzen,项目名称:HSDB,代码行数:8,


示例7: TEST_F

TEST_F(ConfigNodeTest, Value){	const auto node = config.LoadFromStringAndGetFirstChild(ConfigNodeData_1);	EXPECT_EQ(10, node.Child("a").Value<int>());	EXPECT_TRUE(ExpectNear(Math::Float(1.5), node.Child("b").Value<Math::Float>()));	EXPECT_EQ("world", node.Child("c").Value());	EXPECT_EQ("world", node.Child("c").Value<std::string>());}
开发者ID:Vertexwahn,项目名称:lightmetrica,代码行数:8,


示例8: OnCreate

bool GGenericQuestionWindow::OnCreate(){	__super::OnCreate();   m_pObjOkBtn = (GUI::GButton*)Child(L"btnOk");   m_pObjCancelBtn = (GUI::GButton*)Child(L"btnCancel");   m_pObjTextLbl = (GUI::GLabel*)Child(L"lblMessage");	return true;}
开发者ID:zhudavi2,项目名称:SP2-HDM,代码行数:10,


示例9: BringToFront

bool GSaveConfirmationWindow::OnCreate(){	__super::OnCreate();   BringToFront();   m_pObjApplyBtn       = (GUI::GButton*)Child(L"btnApply");   m_pObjDontApplyBtn   = (GUI::GButton*)Child(L"btnDont");   m_pObjRememberTog    = (GUI::GToggle*)Child(L"togRemember");	return true;}
开发者ID:zhudavi2,项目名称:SP2-HDM,代码行数:11,


示例10: Child

XMLEntity*XMLEntity::Child(const char *name){	if (name)	{		for (int i=0; i<CountChildren(); ++i)			if (!strcasecmp(Child(i)->Name(), name))				return Child(i);	}	return NULL;}
开发者ID:devaspot,项目名称:chat,代码行数:11,


示例11: FlushInners

void FlushInners(OBJECT inners, OBJECT hd){ OBJECT y, z, tmp, dest_index;  ifdebug(DGF, D,    OBJECT link;    fprintf(stderr, "dgf: [ FlushInners(");    for( link = Down(inners);  link != inners;  link = NextDown(link) )    {      Child(y, link);      fprintf(stderr, " %s", Image(type(y)));      switch( type(y) )      {        case DEAD:      	  break;        case RECEIVING:        case UNATTACHED:      	  if( Down(y) != y )	/* bug fix (was assert before) */	  { assert( Down(y) != y, "FlushInners: UNATTACHED!");	    Child(z, Down(y));	    fprintf(stderr, " %s", SymName(actual(z)));	  }	  break;        case PRECEDES:      	  break;        case GALL_PREC:	  break;        default:      	  break;      }    }    fprintf(stderr, ")");    debug0(DGF, D, "");  )  /* check for root galley case */  if( hd != nilobj )
开发者ID:thektulu,项目名称:lout,代码行数:50,


示例12: treeFree

void treeFree(cellptr * cell){	int i;	nodeptr q;	for (i = 0; i < NCHILD; i++) {		if (Child(*cell)[i] != NULL)			if (Type(Child(*cell)[i]) == CELL) {				cellptr a = (cellptr) Child(*cell)[i];				treeFree(&a);			}	}	free(*cell);}
开发者ID:petrabarus,项目名称:nbodyc,代码行数:14,


示例13: SearchSym

OBJECT SearchSym(FULL_CHAR *str, int len){ register int rlen, sum;  register FULL_CHAR *x, *y;  OBJECT p, q, link, plink, entry;  int s;  debug2(DST, DDD, "SearchSym( %c..., %d )", str[0], len);  hash(str, len, sum);  rlen = len;  entry = (OBJECT) &symtab[sum];  for( plink = Down(entry);  plink != entry;  plink = NextDown(plink) )  { Child(p, plink);    if( rlen == length(p) )    { x = str;  y = string(p);      do; while( *x++ == *y++ && --rlen );      if( rlen == 0 )      {	debug1(DST, DDD, "  found %s", string(p));	s = scope_top;	do	{ s--;	  for( link = Down(p);  link != p;  link = NextDown(link) )	  { Child(q, link);	    { debugcond4(DST, DDD, enclosing(q) == scope[s],	       "  !npars_only[s] = %s, !vis_only[s] = %s, body_ok[s] = %s, !ss = %s",	       bool(!npars_only[s]), bool(!vis_only[s]), bool(body_ok[s]),	       bool(!suppress_scope));	    }	    if( enclosing(q) == scope[s]	      && (!npars_only[s] || type(q) == NPAR)	      && (!vis_only[s] || visible(q) || suppress_visible )	      && (body_ok[s] || type(q)!=RPAR || !has_body(enclosing(q))		  || suppress_visible )	      && (!suppress_scope || StringEqual(string(p), KW_INCLUDE) ||				     StringEqual(string(p), KW_SYSINCLUDE))	    )	    {	debug3(DST, DD, "SearchSym returning %s %s%%%s",		  Image(type(q)), SymName(q), SymName(enclosing(q)));		return q;	    }	  }	} while( scope[s] != StartSym );      }    }    rlen = len;  }  debug0(DST, DDD, "SearchSym returning <nilobj>");  return nilobj;} /* end SearchSym */
开发者ID:thektulu,项目名称:lout,代码行数:50,


示例14: getChildHash

Bool testhash::Parent::removeChild(const Child & child) const  {    if(!child.isExists() || child.getParent() != *this )        return false;    StdUInt hash_value = getChildHash(child.getParentKey());    Child next = child.getNextParentTableListChild();    Child prev = child.getPrevParentTableListChild();    if (prev.isValid()) //! Previous exists    {        if (getChildHash(prev.getParentKey()) != hash_value) //! Previous has different hash        {            if (next.isValid()) //! And next exists            {                if (getChildHash(next.getParentKey()) != hash_value) //! But next has different hash                    setiChildTable(hash_value, Child());                else  //! Next has the same hash                    setiChildTable(hash_value, next);            }            else  //! Next is absent            {                setiChildTable(hash_value, Child());                setChildTableMax(getChildHash(prev.getParentKey()));            }        }    }    else  //! Previous absent    {        if (next.isValid()) //! Next exists        {            if (getChildHash(next.getParentKey()) != hash_value) //! Next has different hash            {                setiChildTable(hash_value, Child());                setChildTableMin(getChildHash(next.getParentKey()));            }            else //! Next has the same hash                setiChildTable(hash_value, next);        }        else //! Next is absent        {            setiChildTable(hash_value, Child());            setChildTableMax(0);            setChildTableMin(0);        }    }    removeTableListChild(child);    child.setParent(Parent());    child.removeParentHandler();    setNumChilds(getNumChilds() - 1);    return true;}
开发者ID:ivandzen,项目名称:HSDB,代码行数:49,


示例15: Child

testlist::Child testlist::Child::create()  {    if(instanceCount() == 0)        return Child();    Child result = popFreeChild();    if(!result.isValid())    {        if(getUsed() >= instanceCount())            reallocInstances(instanceCount() << 1);        result = Child(getUsed());        setUsed(getUsed() + 1);    }    result.reset();    result.onCreate();    return result;}
开发者ID:ivandzen,项目名称:HSDB,代码行数:15,


示例16: setChildTableIndex

Void testhash::Parent::reset() const  {    setChildTableIndex(Null);    setChildTableLen(0);    setChildTableMax(0);    setChildTableMin(0);    setChildTableSize(DEFAULT_HASH_TABLE_SIZE);    setExists(true);    setFirstTableListChild(Child());    setLastTableListChild(Child());    setNextParentFreeParent(Parent());    setNextParent__ChildTableBlock__Parent(Parent());    setNumChilds(0);    setNumTableListChilds(0);    setPrevParent__ChildTableBlock__Parent(Parent());}
开发者ID:ivandzen,项目名称:HSDB,代码行数:15,


示例17: SearchGalley

OBJECT SearchGalley(OBJECT start, OBJECT sym, BOOLEAN forwards,BOOLEAN subgalleys, BOOLEAN closures, BOOLEAN input){ OBJECT y, res, z, zlink, link;  debug5(DGA, DD, "[ SearchGalley(start, %s, %s, %s, %s, %s)", SymName(sym),	forwards ? "fwd" : "back", subgalleys ? "subgalleys" : "nosubgalleys",	closures ? "closures" : "noclosures", input ? "input" : "noinput");  assert( type(start) == LINK || type(start) == HEAD, "SearchGalley: start!" );  link = forwards ? NextDown(start) : PrevDown(start);  res = nilobj;  while( res == nilobj && type(link) != HEAD )  { Child(y, link);    switch( type(y) )    {      case UNATTACHED:      case RECEIVING:	        debug1(DGA, DD, "  examining %s", EchoIndex(y));	if( subgalleys )	for( zlink = Down(y); zlink!=y && res==nilobj; zlink=NextDown(zlink) )	{ Child(z, zlink);	  res = SearchGalley(z, sym, TRUE, TRUE, TRUE, input);	}	if( res == nilobj && input && type(y) == RECEIVING &&	    actual(actual(y)) == InputSym )	  res = y;	break;      case RECEPTIVE:	        debug1(DGA, DD, "  examining %s", EchoIndex(y));	if( closures && type(actual(y)) == CLOSURE		     && SearchUses(actual(actual(y)), sym) )  res = y;	else if( input && actual(actual(y)) == InputSym )  res = y;	break;      default:		break;    }    link = forwards ? NextDown(link) : PrevDown(link);  }  debug1(DGA, DD, "] SearchGalley returning %s", EchoIndex(res));  return res;} /* end SearchGalley */
开发者ID:thektulu,项目名称:lout,代码行数:48,


示例18: OnCreate

bool GServerInfoWindow::OnCreate(){	__super::OnCreate();   m_pObjInnerFrm = (GUI::GFrame*)Child(L"frmInner");   m_pObjServerNameTxt  = (GUI::GLabel*)m_pObjInnerFrm->Child(L"frmInfo")->Child(L"txtName");   m_pObjIpAddressTxt   = (GUI::GLabel*)m_pObjInnerFrm->Child(L"frmInfo")->Child(L"txtIpAddress");   m_pObjPlayersTxt     = (GUI::GLabel*)m_pObjInnerFrm->Child(L"frmInfo")->Child(L"txtPlayers");   m_pObjJoinGameBtn    = (GUI::GButton*)m_pObjInnerFrm->Child(L"btnJoinGame");   m_pObjModsTxt        = (GUI::GLabel*)m_pObjInnerFrm->Child(L"frmInfo")->Child(L"txtMods");   m_pObjScenarioTxt    = (GUI::GLabel*)m_pObjInnerFrm->Child(L"frmInfo")->Child(L"txtScenario");   m_pObjPasswordCbo    = (GUI::GToggle*)m_pObjInnerFrm->Child(L"frmInfo")->Child(L"togPassword");   m_pObjPasswordCbo->Enabled(false);   CGFX_Renderer_Init_Mode mode;   g_Joshua.Renderer()->Get_Current_Mode(&mode);   Position(((INT16)mode.m_Resolution.x / 2) - (Width() / 2),((INT16)mode.m_Resolution.y / 2) - (Height() / 2));	return true;}
开发者ID:zhudavi2,项目名称:SP2-HDM,代码行数:26,


示例19: OnCreate

bool GCovertActionsNewMissionWindow::OnCreate(){	__super::OnCreate();   m_pObjInnerFrm       = (GUI::GFrame*)Child(L"frmInner");   m_pObjTypeCbo        = (GUI::GComboBox*)m_pObjInnerFrm->Child(L"frmMission")->Child(L"cboMissionType");   m_pObjSectorCbo      = (GUI::GComboBox*)m_pObjInnerFrm->Child(L"frmMission")->Child(L"cboSector");   m_pObjComplexityCbo  = (GUI::GComboBox*)m_pObjInnerFrm->Child(L"frmMission")->Child(L"cboComplexity");   m_pObjResourceCbo    = (GUI::GComboBox*)m_pObjInnerFrm->Child(L"frmMission")->Child(L"cboResourceUnit");   m_pObjTargetLbl      = (GUI::GLabel*)   m_pObjInnerFrm->Child(L"frmMission")->Child(L"txtCountry");   m_pObjFramedCbo      = (GUI::GComboBox*)m_pObjInnerFrm->Child(L"frmMission")->Child(L"cboCountry");   m_pObjResourceLbl    = (GUI::GLabel*)m_pObjInnerFrm->Child(L"frmMission")->Child(L"lblResourceUnit");   m_pObjSectorLbl      = (GUI::GLabel*)m_pObjInnerFrm->Child(L"frmMission")->Child(L"lblTargetSector");   m_pObjConfirm        = (GUI::GButton*)m_pObjInnerFrm->Child(L"btnConfirm");   m_pObjCancel         = (GUI::GButton*)m_pObjInnerFrm->Child(L"btnCancel");   m_pObjTypeCbo->Add_Item( g_ClientDAL.GetString(EStrId::MissionTypeEspionage) );   m_pObjTypeCbo->Add_Item( g_ClientDAL.GetString(EStrId::MissionTypeSabotage) );   m_pObjTypeCbo->Add_Item( g_ClientDAL.GetString(EStrId::MissionTypeAssassination) );   m_pObjTypeCbo->Add_Item( g_ClientDAL.GetString(EStrId::MissionTypeTerrorism) );   m_pRowCoupDetat = m_pObjTypeCbo->Add_Item( g_ClientDAL.GetString(EStrId::MissionTypeCoupEtat) );   m_pObjSectorCbo->Add_Item( g_ClientDAL.GetString(EStrId::MissionTargetCivilian) );   m_pObjSectorCbo->Add_Item( g_ClientDAL.GetString(EStrId::MissionTargetMilitary) );   if(m_pObjApplyBtn)      m_pObjApplyBtn->Hide();	return true;}
开发者ID:zhudavi2,项目名称:SP2-HDM,代码行数:34,


示例20: printf

void Archive::dump() const {  printf("Archive data %p len %zu, firstRegularData %p/n", data.data(),         data.size(), firstRegularData);  printf("Symbol table %p, len %u/n", symbolTable.data, symbolTable.len);  printf("string table %p, len %u/n", stringTable.data, stringTable.len);  const uint8_t* buf = symbolTable.data;  if (!buf) {    for (auto c = child_begin(), e = child_end(); c != e; ++c) {      printf("Child %p, len %u, name %s, size %u/n", c->data, c->len,             c->getName().c_str(), c->getSize());    }    return;  }  uint32_t symbolCount = read32be(buf);  printf("Symbol count %u/n", symbolCount);  buf += sizeof(uint32_t) + (symbolCount * sizeof(uint32_t));  uint32_t string_start_offset = buf - symbolTable.data;  Symbol sym = {0, string_start_offset};  while (sym.symbolIndex != symbolCount) {    printf("Symbol %u, offset %u/n", sym.symbolIndex, sym.stringIndex);    // get the member    uint32_t offset = read32be(symbolTable.data + sym.symbolIndex * 4);    auto* loc = (const uint8_t*)&data[offset];    child_iterator it;    it.child = Child(this, loc, &it.error);    printf("Child %p, len %u/n", it.child.data, it.child.len);  }}
开发者ID:Unity-Technologies,项目名称:binaryen,代码行数:28,


示例21: calculateCenterOfMass

void calculateCenterOfMass(cellptr cell){	/* Center of mass position */	vector cmPos;	vector tempV;	nodeptr q;	int i;	/* Init the cell's total mass */	Mass(cell) = 0.0;	/* Init the cell's center of mass position */	CLRV(cmPos);	/* Loop over the subnodes */	for (i = 0; i < NCHILD; i++) {		/* Skipping empty child nodes */		if ((q = Child(cell)[i]) != NULL) {			/* If node is a cell */			if (Type(q) == CELL)				/* Recursively do the same */				calculateCenterOfMass((cellptr) q);			/* Accumulate total mass */			Mass(cell) = Mass(q);			/* Accumulate center of mass */			ADDMULVS(cmPos, Pos(q), Mass(q));		}	}	/* Usually, cell has mass */	if (Mass(cell) > 0.0) {		/* Find center of mass position */		DIVVS(cmPos, cmPos, Mass(cell));	} else { /* If no mass inside */		SETV(cmPos, Pos(cell));	}	SETV(Pos(cell), cmPos);}
开发者ID:petrabarus,项目名称:nbodyc,代码行数:34,



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


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