C# Class Bind.Structures.Constant

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
Show file Open project: tpb3d/TPB3D Class Usage Examples

Public Methods

Method Description
Constant ( ) : System

Creates an empty Constant.

Constant ( string name, string value ) : System

Creates a Constant with the given name and value.

ToString ( ) : string

Returns a string that represents the full constant declaration without decorations (eg GL_XXX_YYY = (int)0xDEADBEEF or GL_XXX_YYY = GL_ZZZ.FOOBAR).

Translate ( string s, bool isValue ) : string
TranslateConstantWithReference ( Constant c, EnumCollection enums, EnumCollection auxEnums ) : bool

Replces the Value of the given constant with the value referenced by the [c.Reference, c.Value] pair.

Method Details

Constant() public method

Creates an empty Constant.
public Constant ( ) : System
return System

Constant() public method

Creates a Constant with the given name and value.
public Constant ( string name, string value ) : System
name string The Name of the Constant.
value string The Type of the Constant.
return System

ToString() public method

Returns a string that represents the full constant declaration without decorations (eg GL_XXX_YYY = (int)0xDEADBEEF or GL_XXX_YYY = GL_ZZZ.FOOBAR).
public ToString ( ) : string
return string

Translate() public static method

public static Translate ( string s, bool isValue ) : string
s string
isValue bool
return string

TranslateConstantWithReference() public static method

Replces the Value of the given constant with the value referenced by the [c.Reference, c.Value] pair.
public static TranslateConstantWithReference ( Constant c, EnumCollection enums, EnumCollection auxEnums ) : bool
c Constant The Constant to translate
enums EnumCollection The list of enums to check.
auxEnums EnumCollection The list of auxilliary enums to check.
return bool