Skip to content

Documentation for translating IDL files. #2

@VorpalBlade

Description

@VorpalBlade

I have been looking into how to manually translate IDL files (or perhaps write a tool at some point to do so) to the required ctypes definitions used in this library, but I'm somewhat confused as to how sequences are handled. Are you supposed to represent something like this:

struct SomeElement
{
    string someData;
    // ... and some other fields
};

struct SomeKey
{
    unsigned long long low;   // first eight bytes
    unsigned long long high;  // last eight bytes
};

struct SomeSequence
{
    long id;
    unsigned long sequenceIndex;
    sequence<SomeElement> elements;
};
#pragma keylist SomeSequence id.low id.high sequenceIndex

Specifically I'm unsure of how to handle:

  1. Sequences. Do I have to use DDSSequence and manually serialize the elements to the _buffer member? (I don't really know how the low level API used by the generated files from idlpp works, I have previously only used the isocpp2 generator, I looked at the code now and it seems to treat everything as void* pointers and call C API functions to allocate for example arrays)
  2. Keys: Do I actually need to care about this at all? Looking at DDSKeyValue for example I don't see anything specific to mark what part is the key, like in the IDL file.

It would be great to either have some slightly non-trivial examples included, or perhaps some basic documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions