mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 18:59:32 -06:00
an API to access the names of all fields withing a category
This commit is contained in:
@@ -163,6 +163,20 @@ pgf_category_prob(PgfPGF* pgf, PgfCId catname)
|
||||
return abscat->prob;
|
||||
}
|
||||
|
||||
PGF_API GuString*
|
||||
pgf_category_fields(PgfConcr* concr, PgfCId catname, size_t *n_lins)
|
||||
{
|
||||
PgfCncCat* cnccat =
|
||||
gu_map_get(concr->cnccats, catname, PgfCncCat*);
|
||||
if (!cnccat) {
|
||||
*n_lins = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*n_lins = cnccat->n_lins;
|
||||
return &cnccat->labels;
|
||||
}
|
||||
|
||||
PGF_API GuString
|
||||
pgf_language_code(PgfConcr* concr)
|
||||
{
|
||||
|
||||
@@ -95,6 +95,9 @@ pgf_category_context(PgfPGF *gr, PgfCId catname);
|
||||
PGF_API_DECL prob_t
|
||||
pgf_category_prob(PgfPGF* pgf, PgfCId catname);
|
||||
|
||||
PGF_API GuString*
|
||||
pgf_category_fields(PgfConcr* concr, PgfCId catname, size_t *n_lins);
|
||||
|
||||
PGF_API_DECL void
|
||||
pgf_iter_functions(PgfPGF* pgf, GuMapItor* itor, GuExn* err);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user