#include <kwdset.h>
Public Member Functions | |
long | check_int (int val) const |
checks the val whether is defined in the kwdset | |
const int | get_id (char *) const |
returns integer value for the given string alias | |
const int | get_id (const char *) const |
returns integer value for the given string alias | |
const char * | get_str (const int i) const |
returns string with alias for the given enum integer value | |
kwdset (const long num, const enumstr *setptr) | |
Public Attributes | |
long | n |
const enumstr * | set |
number of keywords in set |
Definition at line 10 of file kwdset.h.
Definition at line 5 of file kwdset.cpp.
References n.
long check_int | ( | int | val | ) | const |
checks the val whether is defined in the kwdset
The function checks whether the val is defined in the kwdset
val | - tested enum value |
0 | - on success - the val was found in the given kwdset | |
1 | - on error - the val is not defined in the given enum |
Created by Tomas Koudelka, 11.8.2014
Definition at line 95 of file kwdset.cpp.
References n.
Referenced by xfprintf().
const int get_id | ( | char * | s | ) | const |
returns integer value for the given string alias
The function returns string with the enum alias representation of the given enum integer value i.
s | - string with the enum alias name |
Returns:
Created by Tomas Koudelka, 4.7.2014
Definition at line 71 of file kwdset.cpp.
References n, and print_err().
const int get_id | ( | const char * | s | ) | const |
returns integer value for the given string alias
The function returns enum integer value for the given string with the enum alias.
s | - constant string with the enum alias name |
Returns:
Created by Tomas Koudelka, 4.7.2014
Definition at line 47 of file kwdset.cpp.
References n, and print_err().
const char * get_str | ( | const int | i | ) | const |
returns string with alias for the given enum integer value
The function returns string with the enum alias representation of the given enum integer value i.
i | - integer value of enum that would be converted to string representation |
Returns:
Created by Tomas Koudelka, 4.7.2014
Definition at line 23 of file kwdset.cpp.
References n, and print_err().
Referenced by transmat::printmatchar(), and xfprintf().
long n |
Definition at line 27 of file kwdset.h.
Referenced by check_int(), checkenumerr(), get_id(), get_str(), kwdset(), matchekwd(), matchekwdint(), and xfdetect_sect().
number of keywords in set
Definition at line 28 of file kwdset.h.
Referenced by checkenumerr(), matchekwd(), matchekwdint(), and xfdetect_sect().