All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tizen.modelFactory.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
#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_ */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy