function generateClassCPPInclude($class, $f) { fprintf($f, '"%s", "%s", ', $class['name'], strtolower($class['parent'])); foreach ($class['ifaces'] as $if) { fprintf($f, '"%s",', strtolower($if)); } fprintf($f, 'NULL, '); foreach ($class['methods'] as $m) { generateMethodCPPInclude($m, $f); fprintf($f, ","); } fprintf($f, "NULL,"); foreach ($class['properties'] as $p) { generatePropertyCPPInclude($p, $f); fprintf($f, ","); } fprintf($f, "NULL,"); foreach ($class['consts'] as $k) { fprintf($f, '"%s", T(%s),', $k['name'], typeenum($k['type'])); } fprintf($f, "NULL,\n"); fprintf($f, 'S(%d), ', $class['flags']); if (!empty($class['doc'])) { fprintf($f, '"%s", ', escape_cpp($class['doc'])); } }
function generateClassCPPInclude($class, $f) { fprintf($f, '"%s", "%s", ', strtolower($class['name']), strtolower($class['parent'])); foreach ($class['interfaces'] as $if) { fprintf($f, '"%s",', strtolower($if)); } fprintf($f, 'NULL, '); foreach ($class['methods'] as $m) { generateMethodCPPInclude($m, $f); fprintf($f, ","); } fprintf($f, "NULL,"); foreach ($class['consts'] as $k) { fprintf($f, '"%s", T(%s),', $k['name'], typeenum($k['type'])); } fprintf($f, "NULL,\n"); }