Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp committed Aug 21, 2023
1 parent 3ee40ce commit 5928e3a
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/generator/zcl_protobuf_generate_clas.clas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>ZCL_PROTOBUF_GENERATE_CLAS</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>ZCL_PROTOBUF_GENERATOR CLAS</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>
2 changes: 2 additions & 0 deletions src/generator/zcl_protobuf_generate_intf.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ CLASS zcl_protobuf_generate_intf IMPLEMENTATION.
ENDCASE.
ENDLOOP.

rv_abap = rv_abap && |* Message "| && io_message->mv_name && |",\n|.
rv_abap = rv_abap && |TYPES: BEGIN OF { io_message->mv_name },\n|.

LOOP AT io_message->mt_artefacts INTO lo_artefact.
Expand All @@ -92,6 +93,7 @@ CLASS zcl_protobuf_generate_intf IMPLEMENTATION.

METHOD enum.
* targeting 750, so cannot use ENUM,
rv_abap = rv_abap && |* Enum "| && io_enum->mv_name && |",\n|.
rv_abap = rv_abap && |TYPES { io_enum->mv_name } TYPE i.\n|.
rv_abap = rv_abap && |CONSTANTS: BEGIN OF { io_enum->mv_name },\n|.
LOOP AT io_enum->mt_fields INTO DATA(ls_field).
Expand Down
Loading

0 comments on commit 5928e3a

Please sign in to comment.