Main Page | Data Structures | Directories | File List | Data Fields | Globals

ks_fact.h File Reference

Interface to the libkarmaclient fact type. More...

#include "ks_assoc.h"
#include "ks_combination.h"

Go to the source code of this file.

Defines

#define ks_fact_score(x)   ks_fact_value(x)

Typedefs

typedef ks_assoc_t ks_fact_t
 libkarmaclient fact type.

Functions

const char * ks_fact_identity (ks_fact_t *)
const char * ks_fact_feed (ks_fact_t *)
long ks_fact_value (ks_fact_t *)
const char * ks_fact_data (ks_fact_t *)


Detailed Description

Interface to the libkarmaclient fact type.

Type and function declaractions for the functions defined in ks_fact.c. Do not include this file directly in your client. Instead, include the application header file, ks.h, which will include all the libkarmaclient header files for you.

Definition in file ks_fact.h.


Define Documentation

#define ks_fact_score  )     ks_fact_value(x)
 

Definition at line 46 of file ks_fact.h.


Typedef Documentation

typedef ks_assoc_t ks_fact_t
 

libkarmaclient fact type.

Definition at line 41 of file ks_fact.h.


Function Documentation

const char* ks_fact_data ks_fact_t f  ) 
 

Returns the string data for ks_fact_t (f).

Parameters:
f A pointer to a ks_fact_t.
Returns:
the data associated with the fact, or NULL if it is not set.

Definition at line 115 of file ks_fact.c.

References ks_assoc_get(), KS_CAST, and ks_string_get().

const char* ks_fact_feed ks_fact_t f  ) 
 

Returns the feed name for ks_fact_t (f).

Parameters:
f A pointer to a ks_fact_t.
Returns:
the feed id or NULL if it is not set.

Definition at line 71 of file ks_fact.c.

References ks_assoc_get(), ks_assoc_put(), KS_CAST, ks_number_get(), ks_number_type(), ks_string_get(), ks_string_new(), and _ks_base_t::type.

const char* ks_fact_identity ks_fact_t f  ) 
 

Returns the identity test for ks_fact_t (f).

This may return NULL if the identity information is not available in the current version of the client library or server.

Parameters:
f A pointer to a ks_fact_t.
Returns:
the identity text or NULL if it is not set.

Definition at line 54 of file ks_fact.c.

References ks_assoc_get(), KS_CAST, and ks_string_get().

long ks_fact_value ks_fact_t f  ) 
 

Returns the fact value for ks_fact_t (f).

Parameters:
f A pointer to a ks_fact_t.
Returns:
the value associated with the fact or 0L if it is not set.

Definition at line 98 of file ks_fact.c.

References ks_assoc_get(), KS_CAST, and ks_number_get().


Generated on Tue Aug 7 21:11:31 2007 for libkarmaclient by  doxygen 1.4.4