Enums

Exposing c++ enumerations can be done as shown below:

    //Defining enumeration
    enum colors {
	red,
	green,
	blue
    };
    enum global_values {
	fixed
    };

    //exposing enumeration
    enum_<colors> cls("colors",c);
    cls.value("red",red);
    cls.value("green",green);
    cls.value("blue",blue);

    //Exposing enumeration to the global namespace
    cls.global_value("fixed",fixed);

In javascript, you can use this in the following way:

    //Using the enumerated values;
    var red = colors.red;
    var green = colors.green;
    var blue =colors.blue;
    
    //The global vaules are, as stated, global:
    var fixed_value = fixed;