MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getFieldValue

Method getFieldValue

Engine/source/console/persistenceManager.cpp:999–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

997}
998
999const char* PersistenceManager::getFieldValue(SimObject* object, const char* fieldName, U32 arrayPos)
1000{
1001 // Our return string
1002 char* ret = NULL;
1003
1004 // Buffer to hold the string equivalent of the arrayPos
1005 char arrayPosStr[8];
1006 dSprintf(arrayPosStr, 8, "%d", arrayPos);
1007
1008 // Get the object's value
1009 const char *value = object->getDataField(fieldName, arrayPosStr );
1010 if (value)
1011 ret = dStrdup(value);
1012
1013 return ret;
1014}
1015
1016const char* PersistenceManager::createNewProperty(const char* name, const char* value, bool isArray, U32 arrayPos)
1017{

Callers 5

onTamlCustomReadMethod · 0.45
getDataFieldMethod · 0.45
setDataFieldTypeMethod · 0.45
onTamlCustomReadMethod · 0.45
onTamlCustomReadMethod · 0.45

Calls 2

dSprintfFunction · 0.85
getDataFieldMethod · 0.80

Tested by

no test coverage detected