/** * Get a property value from global test structure * @param name Name of the property * @return A property value, else 0 if property not found. */ long TEST_GetLongProperty (const char* name) { const test_property_t* element = TEST_GetProperty(name); if (element == nullptr) { Com_Printf("WARNING: Test property \"%s\" not found. 0 returned.\n", name); return 0; } return atol(element->value); }
/** * Get a property value from global test structure * @param name Name of the property * @return A property value, else nullptr if property not found. */ const char* TEST_GetStringProperty (const char* name) { const test_property_t* element = TEST_GetProperty(name); if (element == nullptr) { Com_Printf("WARNING: Test property \"%s\" not found. nullptr returned.\n", name); return nullptr; } return element->value; }
/** * Get a property value from global test structure * @param name Name of the property * @return A property value, else 0 if property not found. */ int TEST_GetIntProperty (const char* name) { const test_property_t *element = TEST_GetProperty(name); if (element == NULL) { Com_Printf("WARNING: Test property \"%s\" not found. 0 returned.\n", name); return 0; } return atoi(element->value); }
/** * Test if a property from global test structure exists * @param name Name of the property * @return True if the property exists */ bool TEST_ExistsProperty (const char* name) { return TEST_GetProperty(name) != nullptr; }
/** * Test if a property from global test structure exists * @param name Name of the property * @return True if the property exists */ qboolean TEST_ExistsProperty (const char* name) { return TEST_GetProperty(name) != NULL; }