swift
Loading...
Searching...
No Matches
swift::misc::CMemoTable< T > Class Template Reference

A data memoization pattern useful for compressing JSON representations of containers. More...

#include <memotable.h>

Public Member Functions

int getIndex (const T &value)
 Return the index of a value, inserting it if it is not already in the table.
const CSequence< T > & getTable () const
 Return the values in the table as a flat list.

Detailed Description

template<typename T>
class swift::misc::CMemoTable< T >

A data memoization pattern useful for compressing JSON representations of containers.

Definition at line 18 of file memotable.h.

Member Function Documentation

◆ getIndex()

template<typename T>
int swift::misc::CMemoTable< T >::getIndex ( const T & value)
inline

Return the index of a value, inserting it if it is not already in the table.

Definition at line 22 of file memotable.h.

◆ getTable()

template<typename T>
const CSequence< T > & swift::misc::CMemoTable< T >::getTable ( ) const
inline

Return the values in the table as a flat list.

Definition at line 34 of file memotable.h.


The documentation for this class was generated from the following file: