tmap

package
v0.113.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 1 Imported by: 8

Documentation

Overview

Package tmap provides type mapping facility that maps type id to type name.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor struct {
	// contains filtered or unexported fields
}

Constructor maps type id to type constructor.

func NewConstructor

func NewConstructor(mappings ...map[uint32]func() bin.Object) *Constructor

NewConstructor merges mappings into Constructor.

func (*Constructor) New

func (c *Constructor) New(id uint32) bin.Object

New instantiates new value for type id or returns nil.

type Map

type Map struct {
	// contains filtered or unexported fields
}

Map is type mapping.

func New

func New(mappings ...map[uint32]string) *Map

New creates new Map from mappings.

func (*Map) Get

func (m *Map) Get(id uint32) string

Get returns type string or blank.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL