#region License //Copyright (c) 2006 Stefanos Apostolopoulos //See license.txt for license info #endregion using System; using System.Collections.Generic; using System.Text; namespace OpenTK.OpenGL.Bind { #region Constant class /// /// Represents an opengl constant in C# format. Both the constant name and value /// can be retrieved or set. The value can be either a number, another constant /// or an alias to a constant /// public class Constant { #region Name string _name; /// /// Gets or sets the name of the opengl constant (eg. GL_LINES). /// public string Name { get { return _name; } set { if (!String.IsNullOrEmpty(value)) _name = value.Trim(); } } #endregion #region Value string _value; /// /// Gets or sets the value of the opengl constant (eg. 0x00000001). /// public string Value { get { return _value; } set { if (!String.IsNullOrEmpty(value)) _value = value.Trim(); } } #endregion #region Constructors /// /// Creates an empty Constant. /// public Constant() { } /// /// Creates a Constant with the given name and value. /// /// The Name of the Constant. /// The Type of the Constant. public Constant(string name, string value) { Name = name; Value = value; } #endregion #region public string ToString() /// /// Returns a string that represents the full constant declaration without decorations /// (eg const uint GL_XXX_YYY = 0xDEADBEEF). /// /// override public string ToString() { return Name + " = " + Value; } #endregion } #endregion }