gtranslationTable
Loading...
Searching...
No Matches
tt_example.cc File Reference

Example program demonstrating basic usage of GTranslationTable. More...

Include dependency graph for tt_example.cc:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Entry point for the Translation Table example.
 

Detailed Description

This example shows how to:

  • Initialize the project options object with the Translation Table module options.
  • Create a module logger instance using the module logger name.
  • Construct a GTranslationTable bound to the same options.
  • Register multiple identities and associated electronics configurations.
  • Retrieve a configuration by identity and print it.

Expected behavior:

  • Two identities are inserted into the translation table.
  • One identity is retrieved and printed at verbosity level 0.
  • If retrieval fails, the module will log an error and return a default-constructed GElectronic.
Note
This example is intentionally minimal and focuses on the public API: addGElectronicWithIdentity() and getElectronics().

Definition in file tt_example.cc.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

The program constructs an options object, configures logging, registers two electronics configurations using two distinct identity vectors, retrieves one configuration, and prints it.

Parameters
argcNumber of command-line arguments.
argvCommand-line argument values.
Returns
EXIT_SUCCESS on normal completion.

Definition at line 41 of file tt_example.cc.