Skip to content

High Level API Implementation Policy

kojix2 edited this page Jul 13, 2021 · 2 revisions

High level API Implementation Policy

  • HighLevelClass
    • attributes
      • @ffi_struct or @pointer
        • has only one FFI::Struct or FFI::Pointer that best represents the concept.
      • @header, @etc...
        • Other instance variables should be pure ruby object.
        • They works transparently because they have to_ptr method.
    • methods
      • struct
        • return @ffi_struct
      • to_ptr
        • return @ffi_struct.to_ptr or @pointer #=> FFI::Pointer

Clone this wiki locally