kwdset Class Reference

#include <kwdset.h>

List of all members.

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 enumstrset
 number of keywords in set

Detailed Description

Definition at line 10 of file kwdset.h.


Constructor & Destructor Documentation

kwdset ( const long  num,
const enumstr setptr 
)

Definition at line 5 of file kwdset.cpp.

References n.


Member Function Documentation

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

Parameters:
val - tested enum value
Return values:
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.

Parameters:
s - string with the enum alias name

Returns:

Returns:
The function enum integer value for the given string with enum alias.

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.

Parameters:
s - constant string with the enum alias name

Returns:

Returns:
The function enum integer value for the given string with enum alias.

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.

Parameters:
i - integer value of enum that would be converted to string representation

Returns:

Returns:
The function returns a constant string representation of the given enum integer value.

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().


Member Data Documentation

long n
const enumstr* set

number of keywords in set

Definition at line 28 of file kwdset.h.

Referenced by checkenumerr(), matchekwd(), matchekwdint(), and xfdetect_sect().


The documentation for this class was generated from the following files:

Generated by  doxygen 1.6.2