<commit_before>﻿using System;

namespace Leaf
{
    /// <summary>
    /// Handles serialization and meta-data of nodes in a container.
    /// </summary>
    public abstract class Engine
    {
        /// <summary>
        /// Numerical version used to distinguish this engine from others.
        /// </summary>
        public abstract int Version { get; }

        /// <summary>
        /// Header containing information on how the nodes are structured.
        /// </summary>
        protected Header InternalHeader { get; }

        /// <summary>
        /// Create the base of the engine.
        /// </summary>
        /// <param name="header">Header containing information on how the nodes are structured.</param>
        protected Engine(Header header)
        {
            throw new NotImplementedException();
        }
    }
}
<commit_msg>Change structure of engine class<commit_after>﻿using System.IO;
using Leaf.Nodes;

namespace Leaf
{
    /// <summary>
    /// Handles serialization and meta-data of nodes in a container.
    /// </summary>
    public abstract class Engine
    {
        /// <summary>
        /// Numerical version used to distinguish this engine from others.
        /// </summary>
        public abstract int Version { get; }

        /// <summary>
        /// Create a header that contains the node structure information that the engine can use later after serialization.
        /// </summary>
        /// <return>Header containing information on how the nodes are structured.</return>
        internal abstract Header CreateHeader();

        /// <summary>
        /// Reads a root node (structure) from a stream.
        /// </summary>
        /// <param name="reader">Reader used to pull data from the stream.</param>
        /// <returns>Root node (structure).</returns>
        internal abstract Node ReadStructure(BinaryReader reader);

        /// <summary>
        /// Writes a root node (structure) to a stream.
        /// </summary>
        /// <param name="writer">Writer used to put data into the stream.</param>
        /// <param name="node">Root node (structure).</param>
        internal abstract void WriteStructure(BinaryWriter writer, Node node);
    }
}

{'fraction_non_alphanumeric': 0.11668928086838534, 'fraction_numerical': 0.0, 'mean_word_length': 1.9811320754716981, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5960499', 'n_tokens_mistral': 532, 'n_tokens_neox': 521, 'n_words': 204}