1 /*
2 * Copyright (c) 2017, Red Hat, Inc.
3 * Copyright (c) 2017, Masatake YAMATO
4 *
5 * This source code is released for free distribution under the terms of the
6 * GNU General Public License version 2 or (at your option) any later version.
7 *
8 * main part private interface to entry.c
9 */
10
11 #include "general.h"
12 #include "entry_p.h"
13 #include "parse_p.h"
14
getTagKind(const tagEntryInfo * const tag)15 extern const kindDefinition* getTagKind(const tagEntryInfo *const tag)
16 {
17 return getLanguageKind(tag->langType, tag->kindIndex);
18 }
19
getTagKindLetter(const tagEntryInfo * const tag)20 extern char getTagKindLetter(const tagEntryInfo *const tag)
21 {
22 kindDefinition *kdef = getLanguageKind(tag->langType, tag->kindIndex);
23 return kdef->letter;
24 }
25
getTagKindName(const tagEntryInfo * const tag)26 extern const char* getTagKindName(const tagEntryInfo *const tag)
27 {
28 kindDefinition *kdef = getLanguageKind(tag->langType, tag->kindIndex);
29 return kdef->name;
30 }
31
getTagRole(const tagEntryInfo * const tag,int roleIndex)32 extern const roleDefinition* getTagRole(const tagEntryInfo *const tag,
33 int roleIndex)
34 {
35 if (roleIndex == ROLE_DEFINITION_INDEX)
36 return NULL;
37 return getLanguageRole(tag->langType, tag->kindIndex, roleIndex);
38 }
39