using System;
using System.IO;
using wf;

namespace MaidStatus
{
	public class BodyData
	{
		public int height
		{
			get
			{
				return (int)this.height_;
			}
			set
			{
				this.height_ = (ushort)wf.Math.Round4(value);
			}
		}

		public int weight
		{
			get
			{
				return (int)this.weight_;
			}
			set
			{
				this.weight_ = (ushort)wf.Math.Round4(value);
			}
		}

		public int bust
		{
			get
			{
				return (int)this.bust_;
			}
			set
			{
				this.bust_ = (ushort)wf.Math.Round4(value);
			}
		}

		public int waist
		{
			get
			{
				return (int)this.waist_;
			}
			set
			{
				this.waist_ = (ushort)wf.Math.Round4(value);
			}
		}

		public int hip
		{
			get
			{
				return (int)this.hip_;
			}
			set
			{
				this.hip_ = (ushort)wf.Math.Round4(value);
			}
		}

		public string cup
		{
			get
			{
				return this.cup_;
			}
			set
			{
				this.cup_ = ((!string.IsNullOrEmpty(value)) ? value : string.Empty);
			}
		}

		public void Serialize(BinaryWriter binary)
		{
			binary.Write(this.height_);
			binary.Write(this.weight_);
			binary.Write(this.bust_);
			binary.Write(this.waist_);
			binary.Write(this.hip_);
			binary.Write(this.cup);
		}

		public void Deserialize(BinaryReader binary, int version)
		{
			this.height_ = binary.ReadUInt16();
			this.weight_ = binary.ReadUInt16();
			this.bust_ = binary.ReadUInt16();
			this.waist_ = binary.ReadUInt16();
			this.hip_ = binary.ReadUInt16();
			this.cup = binary.ReadString();
		}

		private ushort height_;

		private ushort weight_;

		private ushort bust_;

		private ushort waist_;

		private ushort hip_;

		private string cup_ = string.Empty;
	}
}
