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
Afficher le fichier Open project: tpb3d/TPB3D Class Usage Examples

Méthodes publiques

Méthode 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 méthode

Creates an empty Constant.
public Constant ( ) : System
Résultat System

Constant() public méthode

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.
Résultat System

ToString() public méthode

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
Résultat string

Translate() public static méthode

public static Translate ( string s, bool isValue ) : string
s string
isValue bool
Résultat string

TranslateConstantWithReference() public static méthode

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.
Résultat bool