/**
 * gles_texcombiner_operandRGB_enums.java This file was generated by XMLSpy
 * 2006sp2 Enterprise Edition. YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL
 * BE OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION. Refer to the XMLSpy
 * Documentation for further details. http://www.altova.com/xmlspy
 */

package com.jmex.model.collada.schema;

import com.jmex.model.collada.types.SchemaString;

public class gles_texcombiner_operandRGB_enums extends gl_blend_type {

    private static final long serialVersionUID = 1L;
    public static final int ESRC_COLOR = 0; /* SRC_COLOR */
    public static final int EONE_MINUS_SRC_COLOR = 1; /* ONE_MINUS_SRC_COLOR */
    public static final int ESRC_ALPHA = 2; /* SRC_ALPHA */
    public static final int EONE_MINUS_SRC_ALPHA = 3; /* ONE_MINUS_SRC_ALPHA */

    public static String[] sEnumValues = { "SRC_COLOR", "ONE_MINUS_SRC_COLOR",
            "SRC_ALPHA", "ONE_MINUS_SRC_ALPHA", };

    public gles_texcombiner_operandRGB_enums() {
        super();
    }

    public gles_texcombiner_operandRGB_enums(String newValue) {
        super(newValue);
        validate();
    }

    public gles_texcombiner_operandRGB_enums(SchemaString newValue) {
        super(newValue);
        validate();
    }

    public static int getEnumerationCount() {
        return sEnumValues.length;
    }

    public static String getEnumerationValue(int index) {
        return sEnumValues[index];
    }

    public static boolean isValidEnumerationValue(String val) {
        for (int i = 0; i < sEnumValues.length; i++) {
            if (val.equals(sEnumValues[i]))
                return true;
        }
        return false;
    }

    public void validate() {

        if (!isValidEnumerationValue(toString()))
            throw new com.jmex.model.collada.xml.XmlException(
                    "Value of gles_texcombiner_operandRGB_enums is invalid.");
    }
}
