pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
NoCopyMap< Key, Val > Class Template Reference

forward declare register map LUT types More...

#include <register_maps_types.h>

Inheritance diagram for NoCopyMap< Key, Val >:
[legend]
Collaboration diagram for NoCopyMap< Key, Val >:
[legend]

Public Types

using Mapping = std::map<Key, Val>
 

Public Member Functions

 NoCopyMap (const NoCopyMap &)=delete
 
NoCopyMapoperator= (const NoCopyMap &)=delete
 
 NoCopyMap (const Mapping &contents)
 Constructor necessary to support a simpler definition syntax.
 
- Public Member Functions inherited from std::map< Key, Val >
Val begin (Val... args)
 
Val erase (Val... args)
 
Val insert (Val... args)
 
Val swap (Val... args)
 
Val end (Val... args)
 
Val emplace_hint (Val... args)
 
Val key_comp (Val... args)
 
Val cbegin (Val... args)
 
Val count (Val... args)
 
Val find (Val... args)
 
Val map (Val... args)
 
Val crbegin (Val... args)
 
Val at (Val... args)
 
Val upper_bound (Val... args)
 
Val rbegin (Val... args)
 
Val crend (Val... args)
 
Val size (Val... args)
 
Val operator= (Val... args)
 
Val ~map (Val... args)
 
Val value_comp (Val... args)
 
Val empty (Val... args)
 
Val lower_bound (Val... args)
 
Val cend (Val... args)
 
Val max_size (Val... args)
 
Val rend (Val... args)
 
Val get_allocator (Val... args)
 
Val clear (Val... args)
 
Val equal_range (Val... args)
 
Val emplace (Val... args)
 
Val operator[] (Val... args)
 

Additional Inherited Members

- Public Attributes inherited from std::map< Key, Val >
Key keys
 STL member.
 
Val elements
 STL member.
 

Detailed Description

template<typename Key, typename Val>
class NoCopyMap< Key, Val >

forward declare register map LUT types

A non-copyable mapping.

These should not be used directly when using the Compiler. If you are tempted to access these directly, you probably need to patch a bug or add a feature to the Compiler instead.

This is helpful for our Look Up Tables (LUTs) since we want to define them once and then just pass them around without copying their large size.

Always retrieve constant references of these types, for example

const auto& my_handle = get_lut();

Constructor & Destructor Documentation

◆ NoCopyMap()

template<typename Key , typename Val >
NoCopyMap< Key, Val >::NoCopyMap ( const Mapping & contents)
inline

Constructor necessary to support a simpler definition syntax.

using MyLUT = NoCopyMap<Key,Val>;
const MyLUT EXAMPLE = NoCopyMap::Mapping({
{key, val},
// etc...
});
forward declare register map LUT types
Definition register_maps_types.h:96

I tried playing around with std::initializer_list but I couldn't get it to work and since the headers where these LUTs are defined are written by a script anyways, I decided to leave the boilerplate in.


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