codegen_define_DTO_.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/codegen/codegen_define_DTO_.hpp"

This file contains "defines" for DTO code generating macro.
Usage:

#include OATPP_CODEGEN_BEGIN(DTO)
...
// Generated Endpoints.
...
#include OATPP_CODEGEN_END(DTO)

For details see:

DTO_INIT

Codegen macoro to be used in classes extending oatpp::data::mapping::type::Object to generate required fields/methods/constructors for DTO object.

  • @param TYPE_NAME - name of the DTO class.
  • @param TYPE_EXTEND - name of the parent DTO class. If DTO extends oatpp::data::mapping::type::Object TYPE_EXETENDS should be Object.

#define DTO_INIT(TYPE_NAME, TYPE_EXTEND)

DTO_FIELD

Codegen macro to generate fields of DTO object.

  • @param TYPE - type of the field.
  • @param NAME - name of the field.
  • @param QUALIFIER_NAME - additional (optional) field to specify serialized name of the field. If not specified it will be same as NAME.

#define DTO_FIELD(TYPE, ...)