Options
All
  • Public
  • Public/Protected
  • All
Menu

DataMapperChain is a simple collection of mappers and allows for serializing and loading configurations of mappers. [[include:data-mapper-tutorial.md]]

Hierarchy

  • DataMapperChain

Index

Constructors

constructor

Properties

initialValue

initialValue: DataValue = ""

mappers

mappers: Mapper[] = []

meta

meta: object = {}

name

name: string = ""

Methods

addMapper

  • addMapper(mapper: Mapper): void

addNewMapperType

  • Make a new mapper type available to the DataMapperChain. If the mapper type already exists it will be overwritten.

    Parameters

    Returns void

base64

chunk

createMapperByConfig

  • Create a IMapper based on the given IMapperConfig. If no mapper type is found the function returns false.

    Parameters

    Returns false | Mapper

findMapperTypeById

  • findMapperTypeById(id: string): undefined | MapperType
  • Helper function to find a mapper in available mappers.

    Parameters

    • id: string

      Mapper ID as string

    Returns undefined | MapperType

fromJson

hexToFloat

hexToInt

loadConfig

  • Loads a configuration which has been exported earlier by serializeConfig.

    Parameters

    • configString: string

      Configuration string as exported from serializeConfig @see serializeConfig

    Returns DataMapperChain

mapData

  • Uses the configured mappers for the DataMapperChain and maps the given data through the mappers.

    Parameters

    • value: DataValue = ""

      Data to be mapped through the configured mappers

    Returns DataValue

offset

serializeConfig

  • serializeConfig(): string
  • Serializes the DataMapperChain configuration including the mappers added to the chain. Returns a string representation of the configuration which has been run through JSON.stringify.

    Returns string

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method

Generated using TypeDoc