Skip to content

Class SpiceQL::AliasMap

ClassList > SpiceQL > AliasMap

Public Functions

Type Name
void addAliasKey (const std::string & alias, const std::string & spiceqlName)
Adds an alias to the lookup table for the given SpiceQL name.
nlohmann::json getAliasMap ()
Retrieves the alias map lookup table as JSON object.
std::string getSpiceqlName (const std::string & name)
Gets SpiceQL name given alias or frame name.
void load (std::string path)
Loads an alias map from a JSON file path.
void setAliasMap (const nlohmann::json & newAliasMap)
Overwrites the current lookup table with a user-provided JSON object.

Public Static Functions

Type Name
AliasMap & instance ()
Accessor for AliasMap instance.

Public Functions Documentation

function addAliasKey

Adds an alias to the lookup table for the given SpiceQL name.

void SpiceQL::AliasMap::addAliasKey (
    const std::string & alias,
    const std::string & spiceqlName
) 

Parameters:

  • alias Alias string for SpiceQL name
  • spiceqlName The target SpiceQL name

function getAliasMap

Retrieves the alias map lookup table as JSON object.

nlohmann::json SpiceQL::AliasMap::getAliasMap () 

Returns:

A JSON object where keys are SpiceQL names and the values are an array of aliases


function getSpiceqlName

Gets SpiceQL name given alias or frame name.

std::string SpiceQL::AliasMap::getSpiceqlName (
    const std::string & name
) 

Parameters:

  • name Given string name to look up

Returns:

The SpiceQL name or empty string if not found


function load

Loads an alias map from a JSON file path.

void SpiceQL::AliasMap::load (
    std::string path
) 

Parameters:

  • path Filesystem path to the JSON file

function setAliasMap

Overwrites the current lookup table with a user-provided JSON object.

void SpiceQL::AliasMap::setAliasMap (
    const nlohmann::json & newAliasMap
) 

Parameters:

  • newAliasMap The alias map as a JSON object

Public Static Functions Documentation

function instance

Accessor for AliasMap instance.

static AliasMap & SpiceQL::AliasMap::instance () 

Returns:

A reference to the global AliasMap instance



The documentation for this class was generated from the following file SpiceQL/include/alias_map.h