diff --git a/src/apps/haikudepot/build/scripts/hdsjsonschemacommon.py b/src/apps/haikudepot/build/scripts/hdsjsonschemacommon.py index 0435801384..e951ff484f 100644 --- a/src/apps/haikudepot/build/scripts/hdsjsonschemacommon.py +++ b/src/apps/haikudepot/build/scripts/hdsjsonschemacommon.py @@ -20,7 +20,7 @@ JSON_TYPE_NUMBER = "number" # The possible C++ types CPP_TYPE_STRING = "BString" -CPP_TYPE_ARRAY = "List" +CPP_TYPE_ARRAY = "BObjectList" CPP_TYPE_BOOLEAN = "bool" CPP_TYPE_INTEGER = "int64" CPP_TYPE_NUMBER = "double" @@ -75,7 +75,7 @@ def propmetadatatocpptypename(propmetadata): if not itemsjavatype or 0 == len(itemsjavatype): raise Exception('missing "javaType" field') - return "%s <%s*, true>" % (CPP_TYPE_ARRAY, javatypetocppname(itemsjavatype)) + return "%s <%s>" % (CPP_TYPE_ARRAY, javatypetocppname(itemsjavatype)) raise Exception('unknown json-schema type [' + type + ']') diff --git a/src/apps/haikudepot/build/scripts/jsonschema2cppmodel.py b/src/apps/haikudepot/build/scripts/jsonschema2cppmodel.py index 8eb54ad943..be671729ab 100644 --- a/src/apps/haikudepot/build/scripts/jsonschema2cppmodel.py +++ b/src/apps/haikudepot/build/scripts/jsonschema2cppmodel.py @@ -38,15 +38,15 @@ void ${cppclassname}::AddTo${cppname}(${cppcontainertype}* value) { if (${cppmembername} == NULL) - ${cppmembername} = new List<${cppcontainertype}*, true>(); - ${cppmembername}->Add(value); + ${cppmembername} = new BObjectList<${cppcontainertype}>(); + ${cppmembername}->AddItem(value); } void -${cppclassname}::Set${cppname}(List<${cppcontainertype}*, true>* value) +${cppclassname}::Set${cppname}(BObjectList<${cppcontainertype}>* value) { - ${cppmembername} = value; + ${cppmembername} = value; } @@ -82,7 +82,7 @@ def writelistaccessorsheader(outputfile, cppname, cppcontainertype): outputfile.write( string.Template(""" void AddTo${cppname}(${cppcontainertype}* value); - void Set${cppname}(List<${cppcontainertype}*, true>* value); + void Set${cppname}(BObjectList<${cppcontainertype}>* value); int32 Count${cppname}(); ${cppcontainertype}* ${cppname}ItemAt(int32 index); bool ${cppname}IsNull(); @@ -336,7 +336,7 @@ def schematocppmodels(inputfile, schema, outputdirectory): #ifndef ${guarddefname} #define ${guarddefname} -#include "List.h" +#include #include "String.h" """).substitute({'guarddefname': guarddefname})) diff --git a/src/apps/haikudepot/build/scripts/jsonschema2cppparser.py b/src/apps/haikudepot/build/scripts/jsonschema2cppparser.py index ca8b8a6f9b..78d555ad3b 100644 --- a/src/apps/haikudepot/build/scripts/jsonschema2cppparser.py +++ b/src/apps/haikudepot/build/scripts/jsonschema2cppparser.py @@ -442,11 +442,11 @@ public: bool Handle(const BJsonEvent& event); - List<${subtype_cppmodelclassname}*, true>* Target(); // list of %s pointers + BObjectList<${subtype_cppmodelclassname}>* Target(); // list of %s pointers private: - List<${subtype_cppmodelclassname}*, true>* fTarget; + BObjectList<${subtype_cppmodelclassname}>* fTarget; }; """).substitute(jscom.uniondicts(naming.todict(), subtypenaming.todict()))) @@ -758,7 +758,7 @@ ${subtype_cppstackedlistlistenerclassname}::${subtype_cppstackedlistlistenerclas : ${cppsuperstackedlistenerclassname}(mainListener, parent) { - fTarget = new List<${subtype_cppmodelclassname}*, true>(); + fTarget = new BObjectList<${subtype_cppmodelclassname}>(); } @@ -767,7 +767,7 @@ ${subtype_cppstackedlistlistenerclassname}::~${subtype_cppstackedlistlistenercla } -List<${subtype_cppmodelclassname}*, true>* +BObjectList<${subtype_cppmodelclassname}>* ${subtype_cppstackedlistlistenerclassname}::Target() { return fTarget; @@ -792,7 +792,7 @@ ${subtype_cppstackedlistlistenerclassname}::Handle(const BJsonEvent& event) { ${subtype_cppstackedlistenerclassname}* nextListener = new ${subtype_cppstackedlistenerclassname}(fMainListener, this); - fTarget->Add(nextListener->Target()); + fTarget->AddItem(nextListener->Target()); Push(nextListener); break; } @@ -1164,8 +1164,9 @@ def schematocppparser(inputfile, schema, outputdirectory, supportbulkcontainer): """).substitute({'guarddefname': guarddefname})) cpphfile.write( - string.Template(""" + string.Template(""" #include +#include #include "${cpprootmodelclassname}.h" @@ -1272,7 +1273,7 @@ private: istate = CppParserImplementationState(cppifile, naming) jscom.writetopcomment(cppifile, os.path.split(inputfile)[1], 'Listener') cppifile.write('#include "%s"\n' % cppheaderleafname) - cppifile.write('#include "List.h"\n\n') + cppifile.write('#include \n\n') cppifile.write('#include \n\n') cppifile.write('// #pragma mark - private interfaces for the stacked listeners\n\n')