Ejemplo n.º 1
0
        /// <summary>
        ///		Writes a specified number of integers.
        /// </summary>
        /// <param name="writer"></param>
        /// <param name="count">Number of values to write.</param>
        /// <param name="src">Pointer that holds the values.</param>
        protected void WriteInts(BinaryWriter writer, int count, BufferBase src)
        {
            // blast the data into the buffer
#if !AXIOM_SAFE_ONLY
            unsafe
#endif
            {
                var pointer = src.ToIntPointer();

                for (var i = 0; i < count; i++)
                {
                    writer.Write(pointer[i]);
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///		Reads a specified number of integers and copies them into the destination pointer.
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="count">Number of values to read.</param>
        /// <param name="dest">Pointer to copy the values into.</param>
        protected void ReadInts(BinaryReader reader, int count, BufferBase dest)
        {
            // blast the data into the buffer
#if !AXIOM_SAFE_ONLY
            unsafe
#endif
            {
                var pointer = dest.ToIntPointer();

                for (var i = 0; i < count; i++)
                {
                    pointer[i] = ReadInt(reader);
                }
            }
        }
Ejemplo n.º 3
0
		/// <summary>
		///		Writes a specified number of integers.
		/// </summary>
		/// <param name="writer"></param>
		/// <param name="count">Number of values to write.</param>
		/// <param name="src">Pointer that holds the values.</param>
		protected void WriteInts( BinaryWriter writer, int count, BufferBase src )
		{
			// blast the data into the buffer
#if !AXIOM_SAFE_ONLY
			unsafe
#endif
			{
				var pointer = src.ToIntPointer();

				for ( var i = 0; i < count; i++ )
				{
					writer.Write( pointer[ i ] );
				}
			}
		}
Ejemplo n.º 4
0
		/// <summary>
		///		Reads a specified number of integers and copies them into the destination pointer.
		/// </summary>
		/// <param name="reader"></param>
		/// <param name="count">Number of values to read.</param>
		/// <param name="dest">Pointer to copy the values into.</param>
		protected void ReadInts( BinaryReader reader, int count, BufferBase dest )
		{
			// blast the data into the buffer
#if !AXIOM_SAFE_ONLY
			unsafe
#endif
			{
				var pointer = dest.ToIntPointer();

				for ( var i = 0; i < count; i++ )
				{
					pointer[ i ] = ReadInt( reader );
				}
			}
		}