Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ILinearContainer<T, SourceT, IteratorT, ReverseT, PElem>

Common interface for linear containers.

author

Jeongho Nam - https://github.com/samchon

Type parameters

  • T: PElem

    Stored elements' type

  • SourceT: ILinearContainer<T, SourceT, IteratorT, ReverseT, T>

    Derived type extending this ILinearContainer

  • IteratorT: ILinearContainer.Iterator<T, SourceT, IteratorT, ReverseT, T>

    Iterator type

  • ReverseT: ILinearContainer.ReverseIterator<T, SourceT, IteratorT, ReverseT, T>

    Reverse iterator type

  • PElem = T

    Parent type of T, used for inserting elements through assign and insert.

Hierarchy

Index

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<T>

assign

  • assign(n: number, val: T): void
  • assign<InputIterator>(first: InputIterator, last: InputIterator): void
  • Fill Assigner.

    Parameters

    • n: number

      Initial size.

    • val: T

      Value to fill.

    Returns void

  • Range Assigner.

    Type parameters

    Parameters

    • first: InputIterator

      Input iterator of the first position.

    • last: InputIterator

      Input iterator of the last position.

    Returns void

back

  • back(): T
  • back(val: T): void

begin

  • begin(): IteratorT

clear

  • clear(): void

empty

  • empty(): boolean

end

  • end(): IteratorT

erase

  • erase(pos: IteratorT): IteratorT
  • erase(first: IteratorT, last: IteratorT): IteratorT
  • Erase an element.

    Parameters

    • pos: IteratorT

      Position to erase.

    Returns IteratorT

    Iterator following the pos, strained by the erasing.

  • Erase elements in range.

    Parameters

    • first: IteratorT

      Range of the first position to erase.

    • last: IteratorT

      Rangee of the last position to erase.

    Returns IteratorT

    Iterator following the last removed element, strained by the erasing.

front

  • front(): T
  • front(val: T): void

insert

  • insert(pos: IteratorT, val: T): IteratorT
  • insert(pos: IteratorT, n: number, val: T): IteratorT
  • insert<InputIterator>(pos: IteratorT, first: InputIterator, last: InputIterator): IteratorT
  • Insert a single element.

    Parameters

    • pos: IteratorT

      Position to insert.

    • val: T

      Value to insert.

    Returns IteratorT

    An iterator to the newly inserted element.

  • Insert repeated elements.

    Parameters

    • pos: IteratorT

      Position to insert.

    • n: number

      Number of elements to insert.

    • val: T

      Value to insert repeatedly.

    Returns IteratorT

    An iterator to the first of the newly inserted elements.

  • Insert range elements.

    Type parameters

    Parameters

    • pos: IteratorT

      Position to insert.

    • first: InputIterator

      Input iterator of the first position.

    • last: InputIterator

      Input iteartor of the last position.

    Returns IteratorT

    An iterator to the first of the newly inserted elements.

pop_back

  • pop_back(): void

push

  • push(...items: PElem[]): number

push_back

  • push_back(val: T): void

rbegin

  • rbegin(): ReverseT

rend

  • rend(): ReverseT

resize

  • resize(n: number): void

size

  • size(): number

swap

  • swap(obj: SourceT): void

toJSON

  • toJSON(): Array<T>

Generated using TypeDoc