corpus.h File Reference

#include "globals.h"
#include "storage.h"

Data Structures

Defines

Typedefs

Functions

Variables


Define Documentation

#define IDList_check_member ( l,
 )     memberIDList(s, l)
#define IDList_delete (  )     FreeIDList(l)

Typedef Documentation

typedef struct _idbuf IDBuf

Underlying structure for the IDList class.

typedef struct _idbuf* IDList

The IDList class: entries in linked lists of identifier strings.

These identifier strings can be usernames, groupnames or hostnames and are used to restrict access to particular corpora.

Note that IDLists are added to Corpus objects by the registry parser.

NOT to be confused with "idlist" in the sense of cl_idlist2cpos().


Function Documentation

void add_corpus_property ( Corpus corpus,
char *  property,
char *  value 
)

Adds a property to the list of corpus properties.

If the property is already defined, ignore and warn. If the property is 'charset', corpus charset is set as well.

Parameters:
corpus Corpus object to add property to.
property Name of property to add.
value Value of property to add.

References TCorpus::charset, charset, cl_charset_from_name(), cl_corpus_property(), cl_malloc(), cregin_name, cregin_path, TCorpusProperty::next, TCorpus::properties, TCorpusProperty::property, and TCorpusProperty::value.

void FreeIDList ( IDList list  ) 

Deletes an IDList object, and sets the argument pointer to NULL.

Parameters:
list IDList to delete.

References cl_free, _idbuf::next, and _idbuf::string.

Referenced by drop_corpus().

int memberIDList ( char *  s,
IDList  l 
)

Checks whether the specified string occurs in the given IDList.

Parameters:
s The username, groupname, or hostname to look for.
l The IDList to search.
Returns:
Boolean: true if s is a member of the list, else false.

References _idbuf::next, and _idbuf::string.

Referenced by check_access_conditions().


Variable Documentation

char* cregin_name

The name of registry file currently being parsed (for registry parser error messages).

See also:
cregparse

Referenced by add_corpus_property(), and setup_corpus().

char* cregin_path

Full path of the registry file currently being parsed (for registry parser error messages).

See also:
cregparse

Referenced by add_corpus_property(), and setup_corpus().

Head of a linked list of loaded corpus handles (for memory manager).


Generated on Sun Feb 28 18:08:04 2010 for CWB by  doxygen 1.6.1