Binary Raw - Docs
    Preparing search index...

    Class SectionBuilder

    Builder pattern for creating SectionNode instances with validation. Provides a fluent API for constructing sections step by step.

    const section = new SectionBuilder()
    .id(".text")
    .name("Code Section")
    .type("data")
    .range(Range.create(start, end))
    .flags({ readable: true, writable: false, executable: true })
    .build();
    Index

    Constructors

    Methods

    • Sets the access flags.

      Parameters

      • flags: { executable: boolean; readable: boolean; writable: boolean }

        The flags object.

        • Readonlyexecutable: boolean

          Whether the section is executable.

        • Readonlyreadable: boolean

          Whether the section is readable.

        • Readonlywritable: boolean

          Whether the section is writable.

      Returns this

    • Sets the section identifier.

      Parameters

      • id: string

        Unique identifier.

      Returns this

    • Adds a metadata key-value pair.

      Parameters

      • key: string

        Metadata key.

      • value: unknown

        Metadata value.

      Returns this

    • Sets the section name.

      Parameters

      • name: string

        Human-readable name.

      Returns this

    • Sets the parent section ID.

      Parameters

      • parent: string | undefined

        The parent section ID or undefined.

      Returns this