<commit_before>
#pragma once

#include <ionCore.h>


namespace ion
{
	namespace GL
	{
		class Uniform
		{

		public:

			virtual void Bind(uint const Handle) const = 0;

		};

		template <typename T>
		class UniformTyped : public Uniform
		{

		public:

			virtual T const & GetValue() const = 0;

			void Bind(uint const Handle) const
			{
				Bind(Handle, GetValue());
			}

			static void Bind(uint const Handle, T const & Value);

		};

		template <typename T>
		class UniformReference : public UniformTyped<T>
		{

		public:

			T const * Value;

			UniformReference()
				: Value(0)
			{}

			UniformReference(T const * value)
				: Value(value)
			{}

			UniformReference(T const & value)
				: Value(& value)
			{}

			T const & GetValue() const
			{
				return * Value;
			}

		};

		template <typename T>
		class UniformValue : public UniformTyped<T>
		{

		public:

			T Value;

			UniformValue()
			{}

			UniformValue(T const & value)
				: Value(value)
			{}

			T const & GetValue() const
			{
				return Value;
			}

		};

		template <typename T>
		static sharedPtr<Uniform const> BindUniformReference(T const & uniform)
		{
			return sharedPtr<Uniform const>(new UniformReference<T>(uniform));
		}

		template <typename T>
		static sharedPtr<Uniform const> BindUniformValue(T const & uniform)
		{
			return sharedPtr<Uniform const>(new UniformValue<T>(uniform));
		}<commit_msg>Add type casting and assignment operators to UniformValue class in ionGL<commit_after>
#pragma once

#include <ionCore.h>


namespace ion
{
	namespace GL
	{
		class Uniform
		{

		public:

			virtual void Bind(uint const Handle) const = 0;

		};

		template <typename T>
		class UniformTyped : public Uniform
		{

		public:

			virtual T const & GetValue() const = 0;

			void Bind(uint const Handle) const
			{
				Bind(Handle, GetValue());
			}

			static void Bind(uint const Handle, T const & Value);

		};

		template <typename T>
		class UniformReference : public UniformTyped<T>
		{

		public:

			T const * Value;

			UniformReference()
				: Value(0)
			{}

			UniformReference(T const * value)
				: Value(value)
			{}

			UniformReference(T const & value)
				: Value(& value)
			{}

			T const & GetValue() const
			{
				return * Value;
			}

		};

		template <typename T>
		class UniformValue : public UniformTyped<T>
		{

		public:

			T Value;

			UniformValue()
			{}

			UniformValue(T const & value)
				: Value(value)
			{}

			T const & GetValue() const
			{
				return Value;
			}

			UniformValue & operator = (T const & value)
			{
				Value = value;
				return * this;
			}

			operator T()
			{
				return Value;
			}

			operator T() const
			{
				return Value;
			}

		};

		template <typename T>
		static sharedPtr<Uniform const> BindUniformReference(T const & uniform)
		{
			return sharedPtr<Uniform const>(new UniformReference<T>(uniform));
		}

		template <typename T>
		static sharedPtr<Uniform const> BindUniformValue(T const & uniform)
		{
			return sharedPtr<Uniform const>(new UniformValue<T>(uniform));
		}
{'fraction_non_alphanumeric': 0.10621506083525156, 'fraction_numerical': 0.0019730351857941467, 'mean_word_length': 2.783582089552239, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '7342137', 'n_tokens_mistral': 1259, 'n_tokens_neox': 953, 'n_words': 274}