Esempio n. 1
0
        /**
         * バイナリ形式のログファイルにログを出力する
         *
         * @output fs: 書き込み先のファイルオブジェクト
         * @output encoding: 文字列のエンコードタイプ
         */
        public override void WriteToBinFile(UFileStream fs, Encoding encoding)
        {
            // データログ
            fs.WriteByte((byte)LogType.Data);
            // ログID
            fs.WriteUInt32(logId);
            // ログタイプ
            fs.WriteByte((byte)logType);
            // 表示レーンID
            fs.WriteUInt32(laneId);

            if (text == null)
            {
                //タイトルの長さ
                fs.WriteUInt32((UInt32)0);
            }
            else
            {
                //タイトル
                fs.WriteSizeString(text, encoding);
            }
            //時間
            fs.WriteDouble(time);
            if (detail == null)
            {
                // ログデータ(詳細)の種類
                fs.WriteByte((byte)DetailDataType.None);
            }
            else
            {
                // ログデータ(詳細)の種類
                fs.WriteByte(detail.dataTypeByte());
                // ログデータ(詳細)
                fs.WriteSizeString(detail.ToString(), encoding);
            }
        }