/**************************************************************************** ** ** This file is part of GAP, a system for computational discrete algebra. ** ** Copyright of GAP belongs to its developers, whose names are too numerous ** to list here. Please refer to the COPYRIGHT file for details. ** ** SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef GAP_SYMBOLS_H #define GAP_SYMBOLS_H
#include"common.h"
#ifdef HPCGAP #include <pthread.h> // for pthread_rwlock_t #endif
// A SymbolTable maps strings to unique monotonously increasing // integer ids. struct SymbolTable { // number of symbols, stored as an object so it can be saved // in workspaces
Obj count;
// hashtable: a plist containing integers
Obj table;
// a function which maps symbol ids back to names
SymbolIdToNameFunc nameFunc;
// a function which is called whenever a new symbol is // added to the table
NewSymbolFunc newSymbolFunc;
// Initialize kernel part of a SymbolTable (to be called from InitKernel) void InitSymbolTableKernel(SymbolTable * symtab, constchar * cookieCount, constchar * cookieTable,
SymbolIdToNameFunc nameFunc,
NewSymbolFunc newSymbolFunc);
// Initialize library part of a SymbolTable (to be called from InitLibrary) void InitSymbolTableLibrary(SymbolTable * symtab, UInt initialSize);
// Return the number of symbols contained in a SymbolTable (thread safe) int LengthSymbolTable(SymbolTable * symtab);
// Return a unique id for the symbol <name> in <symtab>. If the entry // is not yet in the table, it is added, and <symtab->newSymbolFunc> is // invoked.
UInt LookupSymbol(SymbolTable * symtab, constchar * name);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.22Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.