BEEP-8 Helper Lib 1.0.0
Loading...
Searching...
No Matches
MacroDict Class Reference

A dictionary for storing and retrieving macros. More...

#include <tokenizer.h>

Public Member Functions

void DumpAll () const
 Dump all macros to the console.
 
const char * Get (const char *key) const
 Get the value associated with a macro key.
 
 MacroDict (size_t num_of_macro, const Macro *macros)
 Constructor to initialize the dictionary with macros.
 

Public Attributes

std::map< str8, const char *, cmp_str_dict
 Internal storage for macros.
 

Detailed Description

A dictionary for storing and retrieving macros.

Constructor & Destructor Documentation

◆ MacroDict()

MacroDict::MacroDict ( size_t num_of_macro,
const Macro * macros )

Constructor to initialize the dictionary with macros.

Parameters
num_of_macroThe number of macros to initialize.
macrosAn array of Macro structures.

Member Function Documentation

◆ Get()

const char * MacroDict::Get ( const char * key) const

Get the value associated with a macro key.

Parameters
keyThe key of the macro.
Returns
The value associated with the key.

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