Beispiel #1
0
/**
 * 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);
}
Beispiel #2
0
/**
 * 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;
}
Beispiel #3
0
/**
 * 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);
}
Beispiel #4
0
/**
 * 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;
}
Beispiel #5
0
/**
 * 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;
}