tizen.modelFactory.mustache Maven / Gradle / Ivy
#ifndef ModelFactory_H_
#define ModelFactory_H_
#include "{{prefix}}Object.h"
{{#models}}{{#model}}
#include "{{classname}}.h"{{/model}}{{/models}}
namespace Swagger {
void*
create(String type) {
{{#models}}{{#model}}if(type.Equals(L"{{classname}}", true)) {
return new {{classname}}();
}
{{/model}}{{/models}}
if(type.Equals(L"String", true)) {
return new String();
}
if(type.Equals(L"Integer", true)) {
return new Integer();
}
if(type.Equals(L"Long", true)) {
return new Long();
}
if(type.Equals(L"DateTime", true)) {
return new DateTime();
}
return null;
}
} /* namespace Swagger */
#endif /* ModelFactory_H_ */