<commit_before>﻿using System;
using System.Collections.Generic;

namespace SimpleECS
{
    public abstract class System
    {
        public World world
        {
            get;
            private set;
        }

		protected virtual void Initialize() { }
		protected virtual void Uninitialize() { }
<commit_msg>Adds comments to system<commit_after>﻿using System;
using System.Collections.Generic;

namespace SimpleECS
{
	/// <summary>
	/// All systems should implement this class, and added to a world.
	/// It's your responsibility to add an Update method and invoke it
	/// yourself. A system only provides you the world & entity fetching
	/// mechanizm along side an initialize & uninitialize methods.
	/// </summary>
    public abstract class System
    {
		/// <summary>
		/// The world that this system is working on. You have add this system
		/// to a world using World.AddSystem(system) for this value to be set.
		/// Otherwise, it is null. You can add a system to a world only once.
		/// You have to remove it from its world to add it to another world.
		/// GetEntities method uses this world to fetch entities.
		/// </summary>
		/// <value>The world.</value>
        public World world
        {
            get;
            private set;
        }

		/// <summary>
		/// Override this method to do your initialization. For example
		/// event queue subscriptions, other events & initing your
		/// predicates. It is invoked after you add the system to a world.
		/// Inside this method, "world" reference is already set.
		/// </summary>
		protected virtual void Initialize() { }
		/// <summary>
		/// Override this method to undo everything you do in your Initialize
		/// implementation & do clean-up. "world" reference is still set inside
		/// this method.
		/// </summary>
		protected virtual void Uninitialize() { }

		/// <summary>
		/// Pass in a predicate to query & fetch entities from the world
		/// the system is added to. You can also do it manually by calling
		/// GetEntity method of World. This is a convenience method.
		/// </summary>
		/// <returns>The entities.</returns>
		/// <param name="predicate">Predicate.</param>
{'fraction_non_alphanumeric': 0.10277777777777777, 'fraction_numerical': 0.0, 'mean_word_length': 2.4631410256410255, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '4967770', 'n_tokens_mistral': 589, 'n_tokens_neox': 553, 'n_words': 257}