Esempio n. 1
0
void ZTS_Umbrella::pTranslate_LocalToGlobal(size_t iChildIndex, ZTuple& ioTuple)
	{
	for (ZTuple::const_iterator i = ioTuple.begin(), theEnd = ioTuple.end();
		i != theEnd; ++i)
		{
		switch (ioTuple.TypeOf(i))
			{
			case eZType_ID:
				{
				uint64 globalID = this->pLocalToGlobal(iChildIndex, ioTuple.GetID(i));
				ioTuple.SetID(i, globalID);
				break;
				}
			case eZType_Tuple:
				{
				this->pTranslate_LocalToGlobal(iChildIndex, ioTuple.GetMutableTuple(i));
				break;
				}
			case eZType_Vector:
				{
				vector<ZTupleValue>& theVector = ioTuple.GetMutableVector(i);
				for (vector<ZTupleValue>::iterator j = theVector.begin(); j != theVector.end(); ++j)
					{
					if (eZType_ID == (*j).TypeOf())
						{
						uint64 globalID = this->pLocalToGlobal(iChildIndex, ioTuple.GetID(i));
						(*j).SetID(globalID);
						}
					}
				}
			}
		}
	}