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


C++ Child函数代码示例

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


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

示例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,代码来源:archive.cpp

示例3: setExists

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

示例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,代码来源:treecode.c

示例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,代码来源:z47.c

示例6: setExists

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

示例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,代码来源:test.confignode.cpp

示例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,代码来源:sp2_generic_question_window.cpp

示例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,代码来源:sp2_save_confirmation_window.cpp

示例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,代码来源:XMLEntity.cpp

示例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,代码来源:z22.c

示例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,代码来源:treecode.c

示例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,代码来源:z29.c

示例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,代码来源:testhash.cpp

示例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,代码来源:testlist.cpp


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