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


C++ IStream::serialCont方法代码示例

本文整理汇总了C++中nlmisc::IStream::serialCont方法的典型用法代码示例。如果您正苦于以下问题:C++ IStream::serialCont方法的具体用法?C++ IStream::serialCont怎么用?C++ IStream::serialCont使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nlmisc::IStream的用法示例。


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

示例1: serial

// ---------------------------------------------------------------------------
void CZoneRegion::serial (NLMISC::IStream &f)
{
	f.xmlPush ("LAND");

		sint32 version = f.serialVersion (1);
		f.serialCheck ((uint32)'DNAL');

		f.xmlSerial (_MinX, "MIN_X");
		f.xmlSerial (_MinY, "MIN_Y");
		f.xmlSerial (_MaxX, "MAX_X");
		f.xmlSerial (_MaxY, "MAX_Y");

		if (version == 1)
		{
			f.serialCont (_Zones);
		}

		if (version == 0)
		{
			std::vector<SZoneUnit> vZonesTmp;
			f.serialCont (vZonesTmp);
			_Zones.resize (vZonesTmp.size());
			for (uint32 i = 0; i < vZonesTmp.size(); ++i)
				_Zones[i] = vZonesTmp[i];
		}

	f.xmlPop ();
}
开发者ID:mixxit,项目名称:solinia,代码行数:29,代码来源:zone_region.cpp

示例2:

// ***************************************************************************
void			CSkills::serial(NLMISC::IStream &f)
{
    if (ShowDebugInChat) nlinfo("Skill are about to...");
    uint	ver= f.serialVersion(0);
    f.serialCont(_I16Skills);
    f.serialCont(_I16Tallies);
    if (ShowDebugInChat) nlinfo("Skills are in!");
}
开发者ID:rbjarnason,项目名称:Mayans,代码行数:9,代码来源:skills.cpp

示例3: if

// ***************************************************************************
void		CVegetableShape::serial(NLMISC::IStream &f)
{
	/*
	Version 1:
		- BestSidedPreComputeLighting
	*/
	sint	ver= f.serialVersion(1);
	f.serialCheck((uint32)'_LEN');
	f.serialCheck((uint32)'GEV_');
	f.serialCheck((uint32)'BATE');
	f.serialCheck((uint32)'__EL');

	f.serial(Lighted);
	f.serial(DoubleSided);
	f.serial(PreComputeLighting);
	f.serial(AlphaBlend);
	f.serialEnum(BendCenterMode);
	f.serial(VB);
	f.serialCont(TriangleIndices);

	if(ver>=1)
		f.serial(BestSidedPreComputeLighting);
	else if(f.isReading())
		BestSidedPreComputeLighting= false;

	// if reading
	if(f.isReading())
	{
		// prepare for instanciation
		InstanceVertices.resize(VB.getNumVertices());
	}
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:33,代码来源:vegetable_shape.cpp

示例4: throw

// ***************************************************************************
void	CSkeletonShape::CLod::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
{
	(void)f.serialVersion(0);

	f.serial(Distance);
	f.serialCont(ActiveBones);
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:8,代码来源:skeleton_shape.cpp

示例5: serial

//===========================================================
void CSegRemanenceShape::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
{
	// version 2 : added default tracks
	// version 1 : rollup ratio
	// version 0 : base version

	sint ver = f.serialVersion(2);
	f.serial(_NumSlices);
	f.serial(_SliceTime);
	f.serialCont(_Corners);
	f.serial(_Mat);
	f.serial(_BBox);
	f.serial(_TextureShifting);
	f.serialPtr(_AnimatedMat);
	if (f.isReading())
	{
		_GeomTouched = true;
		_MatTouched  = true;
	}
	if (ver >= 1)
	{
		f.serial(_RollUpRatio);
	}
	if (ver >= 2)
	{
		f.serial(_DefaultPos);
		f.serial(_DefaultRotQuat);
		f.serial(_DefaultScale);
	}
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:31,代码来源:seg_remanence_shape.cpp

示例6: serial

void CScriptData::serial(NLMISC::IStream &f)
{
	uint16 size;
	if (f.isReading())
	{
		Scripts.clear();
		f.serial(size);

		uint32 i = 0;
		for (; i < size; ++i)
		{
			//std::string tmpKey;
			CCustomElementId tmpKey;
			std::vector<std::string> tmpVal;
			f.serial(tmpKey);
			f.serialCont(tmpVal);
			Scripts.insert(make_pair(tmpKey,tmpVal));
		}
	}
	else
	{
		size = (uint16)Scripts.size();
		f.serial(size);	
		for (TScripts::iterator it = Scripts.begin(); it != Scripts.end(); ++it)
		{
			//std::string tmp = it->first;			
			nlWrite(f, serial, it->first);
			nlWrite(f, serialCont, it->second);			
		}
	}
}
开发者ID:Kiddinglife,项目名称:ryzom,代码行数:31,代码来源:npc_description_messages.cpp

示例7: serial

void CZoneEdge::serial (NLMISC::IStream& s)
{
	// Serial the version
	/*sint ver =*/ s.serialVersion (0);

	s.xmlPush ("VERTICES");
		s.serialCont (_TheEdge);
	s.xmlPop ();

	s.xmlPush ("VERTICES_ID");
		s.serialCont (_Id);
	s.xmlPop ();

	s.xmlSerial (_Rotation, "ROTATION");

	s.xmlSerial (_OffsetX, _OffsetY, "OFFSET");
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:17,代码来源:zone_edge.cpp

示例8: EOlderStream

void	NLPACS::CRetrievableSurface::serial(NLMISC::IStream &f)
{
	/*
	Version 0:
		- base version.
	Version 1:
		- absolute water height and flag
	Version 2:
		- no more topologies in stream (obsolete)
		- no more height quad
		- quantized height (_QuantHeight)
	*/
	sint	ver= f.serialVersion(2);

	if (ver < 2)
		throw EOlderStream();

	uint	i;
	f.serial(_NormalQuanta);
	f.serial(_OrientationQuanta);
	f.serial(_Material);
	f.serial(_Character);
	f.serial(_Level);
	f.serialCont(_Chains);
	f.serialCont(_Loops);
	if (ver <= 1)
	{
		f.serial(_Quad);
		for (i=0; i<NumMaxCreatureModels; ++i)
			f.serial(_Topologies[i]);
	}
	f.serial(_Center);
	f.serial(_IsFloor, _IsCeiling);
	f.serial(_Flags);

	if (ver >= 1)
	{
		f.serial(_WaterHeight);
	}

	if (ver >= 2)
	{
		f.serial(_QuantHeight);
	}
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:45,代码来源:retrievable_surface.cpp

示例9: serial

void CBackgroundSound::serial(NLMISC::IStream &s)
{
	CSound::serial(s);

	s.serialCont(_Sounds);

	if (s.isReading())
		_DurationValid = false;
}
开发者ID:mixxit,项目名称:solinia,代码行数:9,代码来源:background_sound.cpp

示例10: throw

///===========================================================================
void	CParticleSystemShape::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
{
	/* ***********************************************
	 *	WARNING: This Class/Method must be thread-safe (ctor/dtor/serial): no static access for instance
	 *	It can be loaded/called through CAsyncFileManager for instance
	 * ***********************************************/

	sint ver = f.serialVersion(6);
	/// version 6 : added sharing flag
	//NLMISC::CVector8 &buf = _ParticleSystemProto.bufferAsVector();
	//f.serialCont(buf);

	if (f.isReading ())
	{
		std::vector<uint8> buf;
		f.serialCont(buf);
		_ParticleSystemProto.fill(&buf[0], (uint32)buf.size());
	}
	else
	{
		f.serialBufferWithSize ((uint8*)_ParticleSystemProto.buffer(), _ParticleSystemProto.length());
	}

	if (ver > 1)
	{
		// serial default tracks
		for (uint k = 0; k < 4; ++k)
		{
			f.serial(_UserParamDefaultTrack[k]);
		}
	}
	if ( ver > 2)
	{
		f.serial (_DefaultPos);
		f.serial (_DefaultScale);
		f.serial (_DefaultRotQuat);
	}
	if ( ver > 3)
	{
		f.serial(_MaxViewDist);
		f.serial(_DestroyWhenOutOfFrustum);
		f.serial(_DestroyModelWhenOutOfRange);
	}
	if ( ver > 4)
	{
		f.serial(_UsePrecomputedBBox);
		if (_UsePrecomputedBBox)
		{
			f.serial(_PrecomputedBBox);
		}
	}
	if ( ver > 5)
	{
		f.serial(_Sharing);
	}
}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:57,代码来源:particle_system_shape.cpp

示例11: serial

///=======================================================================================
void CPSFloatCurveFunctor::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
{
	f.serialVersion(1);
	f.serial(_NumSamples, _Smoothing);
	f.serialCont(_CtrlPoints);
	if (f.isReading())
	{
		updateTab();
	}
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:11,代码来源:ps_float.cpp

示例12: serial

// ***************************************************************************
void CMeshMorpher::serial (NLMISC::IStream &f) throw(NLMISC::EStream)
{
	/* ***********************************************
	 *	WARNING: This Class/Method must be thread-safe (ctor/dtor/serial): no static access for instance
	 *	It can be loaded/called through CAsyncFileManager for instance
	 * ***********************************************/

	(void)f.serialVersion (0);

	f.serialCont (BlendShapes);
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:12,代码来源:mesh_morpher.cpp

示例13: serial

// ***************************************************************************
void CAnimationSet::serial (NLMISC::IStream& f)
{
	// serial not possible if header optimisation enabled
	nlassert(!_AnimHeaderOptimisation);

	// Serial an header
	f.serialCheck ((uint32)'_LEN');
	f.serialCheck ((uint32)'MINA');
	f.serialCheck ((uint32)'TES_');

	// Serial a version
	uint	ver= f.serialVersion (1);

	// Serial the class
	f.serialContPtr (_Animation);
	f.serialContPtr (_SkeletonWeight);
	f.serialCont (_AnimationName);
	f.serialCont (_SkeletonWeightName);
	f.serialCont(_ChannelIdByName);
	f.serialCont(_AnimationIdByName);
	f.serialCont(_SkeletonWeightIdByName);
	if(ver>=1)
		f.serialCont(_ChannelName);
	else
		buildChannelNameFromMap();
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:27,代码来源:animation_set.cpp

示例14:

/*
 * Serial Mapper
 */
void	CPDStringMapper::serial(NLMISC::IStream& f)
{
	f.serialCheck((uint32)'PDSM');

	uint	version = f.serialVersion(0);

	f.serialCont(_StringMap);

	if (f.isReading())
	{
		buildIdMap();
	}
}
开发者ID:Kiddinglife,项目名称:ryzom,代码行数:16,代码来源:pd_string_mapper.cpp

示例15: serial

void CAnimation::serial (NLMISC::IStream& f)
{
	// cannot save if anim header compressed
	nlassert(_IdByChannelId.empty());

	// Serial a header
	f.serialCheck (NELID("_LEN"));
	f.serialCheck (NELID("MINA"));

	// Serial a version
	sint version=f.serialVersion (2);

	// Serial the name
	f.serial (_Name);

	// Serial the name/id map
	f.serialCont(_IdByName);

	// Serial the vector
	f.serialContPolyPtr (_TrackVector);

	// Serial the min end time
	if (version>=1)
	{
		f.serial (_MinEndTime);
	}

	// Serial the SSS shapes
	if (version>=2)
	{
		f.serialCont (_SSSShapes);
	}

	// TestYoyo
	//nlinfo("ANIMYOYO: Anim NumTracks: %d", _TrackVector.size());
}
开发者ID:junhuac,项目名称:ryzomcore,代码行数:36,代码来源:animation.cpp


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