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


C# IO.WriteTag方法代码示例

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


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

示例1: Write

			public override void Write(IO.EndianWriter stream)
			{
				Compiler comp = stream.Owner as Compiler;

				uint elementsAddress = 0;
				int flags = (
						(tagRef.IsNonResolving ? 1<<1 : 0)
					);

				if (tagRef.Elements.Count > 1)
				{
					elementsAddress = stream.PositionUnsigned;
					foreach (string i in tagRef.Elements)
						stream.WriteTag(i);

					comp.MarkLocationFixup(tagRef.Name, stream, true);
					stream.Write(flags);
					stream.Write((int)-1);
					stream.WritePointer(elementsAddress);
				}
				else
				{
					comp.MarkLocationFixup(tagRef.Name, stream, true);
					stream.Write(flags);
					stream.WriteTag(tagRef.Elements[0]);
					stream.Write((int)0);
				}
			}
开发者ID:guardian2433,项目名称:open-sauce,代码行数:28,代码来源:Compiler_Tags.cs

示例2: Write

			public override void Write(IO.EndianWriter stream)
			{
				Compiler comp = stream.Owner as Compiler;

				int flags;

				#region Block
				var tag_block = tagGroup.Block as Import.TagBlock;
				uint fieldsAddress = new FieldsWriter(tag_block.Fields).WriteFields(stream, comp);
				//comp.MarkLocationFixup(tag_block.Name, stream, false);

				flags = (
						(tag_block.DontReadChildren ? 1 << 0 : 0)
					);

				uint blockAddress = stream.PositionUnsigned;
				stream.Write(tagGroup.BlockName);
				stream.Write(flags);
				stream.Write((int)1); // max elements
				stream.Write(tag_block.CalculateSize(comp.OwnerState));
				stream.Write((int)0);
				stream.WritePointer(fieldsAddress);

				// procs
				stream.Write((int)0); stream.Write((int)0); stream.Write((int)0); stream.Write((int)0);

				stream.Write((int)0); // byte swap codes address
				#endregion

				comp.MarkLocationFixup(tagGroup.Name, stream, false);

				flags = (
						(tagGroup.IsIncludedInTagGroupsChecksum ? 1 << 0 : 0)
					);

				stream.Write(tagGroup.Name);
				stream.Write(flags);
				if (string.IsNullOrEmpty(tagGroup.GroupTag))
					Debug.LogFile.WriteLine("CheApe: tag_group '{0}' has a bad group-tag...check your XML?");
				stream.WriteTag(tagGroup.GroupTag);
				if (tagGroup.ParentTag != null)
				{
					if (string.IsNullOrEmpty(tagGroup.GroupTag))
						Debug.LogFile.WriteLine("CheApe: tag_group '{0}' has a bad parent group-tag...check your XML?");
					stream.WriteTag(tagGroup.ParentTag);
				}
				else
					stream.Write((int)-1);
				stream.Write(tagGroup.Version); stream.Write((short)0);
				stream.Write((int)0); // post process proc
				stream.WritePointer(blockAddress);
				for (int x = 0; x < 17; x++) stream.Write((int)0); // child group tags
				stream.Write((int)0); // we don't support that shit, gtfo
				stream.Write((int)0);
			}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:55,代码来源:Compiler.cs

示例3: Write

		/// <summary>
		/// Stream the field to a buffer
		/// </summary>
		/// <param name="ew"></param>
		public override void Write(IO.EndianWriter ew) { ew.WriteTag(Value); }
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:5,代码来源:Integers.cs

示例4: Write

			public override void Write(IO.EndianWriter stream)
			{
				Compiler comp = stream.Owner as Compiler;

				TagBlock tb = new TagBlock((Import.TagBlock)tagGroup.Block);
				tb.Write(stream);

				comp.MarkLocationFixup(tagGroup.Name, stream, false);

				stream.Write(tagGroup.Name);
				stream.Write((int)0);
				stream.WriteTag(tagGroup.GroupTag);
				if (tagGroup.ParentTag != null)
					stream.WriteTag(tagGroup.ParentTag);
				else
					stream.Write((int)-1);
				stream.Write(tagGroup.Version);
				stream.Write((short)1); // init'd
				stream.Write((int)0);
				stream.Write((int)0);
				stream.Write((int)0);
				stream.Write((int)0);
				stream.WritePointer(tb.RuntimeAddress);
				for (int x = 0; x < 17; x++) stream.Write((int)0); // child group tags
				stream.Write((int)0); // we don't support that shit, gtfo
				stream.Write(comp.Strings.GetNull());
			}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:27,代码来源:Compiler.cs


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