------------------------------------------------------------------------------- // private RplArgList *RplSet::makeArgList (int argCount, va_list arg_list) { RplArgList *argList = new RplArgList; char argName[10]; RplValue::Type_ID argType; for (int i = 0; i < argCount; i++) { sprintf (argName, "arg%d", i); <<<<< e.g. arg0 <<<<< argType = va_arg (arg_list, RplValue::Type_ID); argList->append (new RplTypeNamePair (argType, argName)); } return (argList); } ------------------------------------------------------------------------------- // private void RplSet::addPredefinedFunction (RplUtilityGroup *group, const QString &functionName, PtrToDefiningFunction functionPtr, bool deprecated, RplValue::Type_ID returnType, int argCount, ...) { // Create a list containing the type of each formal parameter. va_list arg_list; va_start (arg_list, argCount); RplArgList *argList = makeArgList (argCount, arg_list); va_end (arg_list); // Create a predefined function. PredefinedFunction *newFunc = new PredefinedFunction ( functionName, returnType, "", "", TRUE, FALSE, FALSE, NULL, argList, functionPtr, deprecated); // Add to list of functions group->addFunction(newFunc); } ------------------------------------------------------------------------------- ====== Stack: ====== RplTypeNamePair::RplTypeNamePair (RplValue::Type_ID type, const QString& name) RplSet::makeArgList (int argCount, char * arg_list) RplSet::addPredefinedFunction (RplUtilityGroup*, const QString& funcName, RplResult::Status (PredefinedFunction*, const ListValue&, RplValue*&, std::set,std::allocator>*, QString &)* functionPtr, bool deprecated, RplValue::Type_ID returnType, int argCount, ...) RplSet::loadDefaultFunctions() ---