Browse Source

Fixed bad generation

master
Ludovic 'Archivist' Lagouardette 5 years ago
parent
commit
502427332f
4 changed files with 8 additions and 9 deletions
  1. +1
    -1
      src/views/attribute.ecr
  2. +1
    -1
      src/views/attribute_after.ecr
  3. +1
    -1
      src/views/class.ecr
  4. +5
    -6
      tests/record.yml

+ 1
- 1
src/views/attribute.ecr View File

@ -11,7 +11,7 @@
}
constexpr size_t <%= @name %>_position() {
return <%= @name %>_position;
return <%= @start %>;
}
constexpr size_t <%= @name %>_end_position() {

+ 1
- 1
src/views/attribute_after.ecr View File

@ -1,5 +1,5 @@
size_t <%= @name %>_position() {
return <%= @name %>_end_position());
return <%= @name %>_end_position();
}
size_t <%= @name %>_end_position() {

+ 1
- 1
src/views/class.ecr View File

@ -1,6 +1,6 @@
class <%= @name %> {
virtual <%= @name %>() = 0;
virtual ~<%= @name %>() = 0;
<% if !(@attributes.nil?) %>
<%- @attributes.not_nil!.each do |attr| -%>
<%- attr.class_name = @name -%>

+ 5
- 6
tests/record.yml View File

@ -1,6 +1,5 @@
includes:
- <array>
- "\"bitops.hpp\""
classes:
-
name: record_identifier
@ -11,11 +10,11 @@ classes:
start: 0
-
name: x
out_type: bitops::regulated<uint32_t>
out_type: uint32_t
start: 16
-
name: y
out_type: bitops::regulated<uint32_t>
out_type: uint32_t
start: 20
-
name: record
@ -26,14 +25,14 @@ classes:
start: 0
-
name: timestamp
out_type: bitops::regulated<uint64_t>
out_type: uint64_t
start: 24
attributeafters:
-
name: offset
out_type: bitops::regulated<uint64_t>
out_type: uint64_t
after_name: timestamp
-
name: flags
out_type: bitops::regulated<uint32_t>
out_type: uint32_t
after_name: offset

Loading…
Cancel
Save