Search Token. More...
#include <gsearchtoken.h>
Public Types | |
enum | tType { tTerm, tStem, tRawConcept } |
Search Token Type. More... | |
Public Member Functions | |
GSearchToken (GConcept *concept, tType type) | |
GSearchToken (GSession *session, const R::RString &token, tType type) | |
int | Compare (const GSearchToken &token) const |
int | Compare (const R::RString &token) const |
GConcept * | GetConcept (void) const |
void | SetConcept (GConcept *concept) |
tType | GetType (void) const |
Private Attributes | |
GConcept * | Concept |
tType | Type |
Detailed Description
Search Token.
The GSearchToken provides a representation for a search token (such as a keyword). In practice, a search token can correspond to multiple concepts in different languages (typically the stems in the case of a keyword).
Member Enumeration Documentation
enum tType |
Search Token Type.
This enumeration represents the different type of search tokens recognised.
Constructor & Destructor Documentation
GSearchToken | ( | GConcept * | concept, |
tType | type | ||
) |
Create a search token.
- Parameters
-
concept Concept. type Type of the token.
GSearchToken | ( | GSession * | session, |
const R::RString & | token, | ||
tType | type | ||
) |
Create a search token based on a string. The corresponding may be null if the token is not defined in the session.
- Parameters
-
session Session for which the token must be created. token Token. type Type of the token.
Member Function Documentation
int Compare | ( | const GSearchToken & | token | ) | const |
Compare two tokens by their strings.
- Parameters
-
token Token to compare with.
- Returns
- -1,0 or +1 depending of the comparison of the strings.
int Compare | ( | const R::RString & | token | ) | const |
Compare a token by a string.
- Parameters
-
token String to compare with.
- Returns
- -1,0 or +1 depending of the comparison of the strings.
GConcept* GetConcept | ( | void | ) | const |
Get the concept corresponding to the token.
- Returns
- a pointer to a concept.
void SetConcept | ( | GConcept * | concept | ) |
Set the concept corresponding to the token.
- Parameters
-
concept Concept to set.
tType GetType | ( | void | ) | const |
Get the type of the token.
- Returns
- the token type.
Member Data Documentation
|
private |
Concept associated to the search token.
|
private |
Type of the token.