uint32_t getField(uint32_t enumValue) throw (enum_error) {
		uint32_t result = 0;
		if ((enumValue < 0) || enumValue >= SIZE) {
			throw enum_error();
		}
		return result;
	}
static void GLAPIENTRY _save_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
{
   if (index < VERT_ATTRIB_MAX)
      DISPATCH_ATTR4FV( index, v );
   else
      enum_error();
}
static void GLAPIENTRY _save_VertexAttrib2fNV( GLuint index, GLfloat x, GLfloat y )
{
   if (index < VERT_ATTRIB_MAX)
      DISPATCH_ATTR2F( index, x, y );
   else
      enum_error();
}
	uint32_t getField(uint32_t enumValue) throw (enum_error) {
		uint32_t result = 0;
		if ((enumValue < 0) || enumValue >= SIZE) {
			throw enum_error();
		}
		switch (enumValue) {
		case T:
			result = getBits(0, 1);
			break;
		case Address:
			result = (getBits(8, 24) << 8) | (getBits(1, 7) << 1);
			break;
		case AltIS:
			result = getBits(34, 1);
			break;
		case NS:
			result = getBits(35, 1);
			break;
		case Reason:
			result = getBits(37, 2);
			break;
		case CycleCount:
			result = (getBits(48, 7) << 4)| (getBits(42, 4) << 0);
			break;
		case ContextID:
			result = getBits(72, 32);
			break;
		}
		return result;
	}
static void GLAPIENTRY
_save_VertexAttrib1fARB( GLuint index, GLfloat x )
{
   if (index < VERT_ATTRIB_MAX)
      DISPATCH_ATTR1F( index, x );
   else
      enum_error(); 
}
static void GLAPIENTRY _save_VertexAttrib4fNV( GLuint index, GLfloat x, GLfloat y,
				  GLfloat z, GLfloat w )
{
   if (index < VERT_ATTRIB_MAX)
      DISPATCH_ATTR4F( index, x, y, z, w );
   else
      enum_error();
}
static void GLAPIENTRY
_save_VertexAttrib3fARB( GLuint index, GLfloat x, GLfloat y, GLfloat z )
{
   if (index < VERT_ATTRIB_MAX)
      DISPATCH_ATTR3F( index, x, y, z );
   else
      enum_error();
}
Beispiel #8
0
std::string Environment::describeComponent(const Component c) {
  switch (c) {
    case Component::Map: return "map";
    case Component::Visuals: return "visuals";
    case Component::Mechanics: return "mechanics";
  }
  throw enum_error();
}
Beispiel #9
0
Page &Client::referencePage(const PageType type) {
  switch (type) {
    case PageType::Home:
      return homePage.ctrl;
    case PageType::Settings:
      return settingsPage.ctrl;
    case PageType::Listing:
      return listingPage.ctrl;
  }
  throw enum_error();
}
Beispiel #10
0
ui::TransformedBase &Client::referencePageBase(const PageType type) {
  switch (type) {
    case PageType::Home:
      return homePage.base;
    case PageType::Settings:
      return settingsPage.base;
    case PageType::Listing:
      return listingPage.base;
  }
  throw enum_error();
}