SofaBuffers TypeScript - v0.12.0
    Preparing search index...

    Class VisitorCache<D, V>

    One visitor per destination object, built on first use and kept for later decodes into that same destination.

    D is the generated message class, V its visitor. Neither is known here: the cache stores what make returns and never looks inside it.

    Type Parameters

    • D extends object
    • V
    Index
    • Type Parameters

      • D extends object
      • V

      Parameters

      • make: (destination: D) => V

        builds the visitor for one destination. Called once per destination this cache is asked for, never on a hit.

      Returns VisitorCache<D, V>

    • The visitor for destination, built on the first ask and kept after it.

      Parameters

      • destination: D

      Returns V