Skip to content

use SBE generated message types as plain C/C++ structure #553

Open
@ayubsayyad

Description

@ayubsayyad

[C++]
I understood that SBE is for sending messages on wire, but often we use same types in our program to pass to functions and get values populated before doing so. Here we always need to provide buffer externally and maintain its lifetime

e.g.
Car carObj;
carObj.serialNumber(1234); //segmentation fault, as expected

can we generate something as below, this will enable developers not to maintain buffer explicitly. This will be backward compatible as we will not touch auto generated Car object.

struct CarWrapper{
CarWrapper(){
obj.wrap(buffer, 0, ..., ...)
}
Car obj;
char buffer[];
};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions