123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
-
- #ifndef _clish_ptype_h
- #define _clish_ptype_h
- typedef struct clish_ptype_s clish_ptype_t;
- #include "lub/types.h"
- #include "lub/bintree.h"
- #include "lub/argv.h"
- #include <stddef.h>
- typedef enum {
-
- CLISH_PTYPE_REGEXP,
-
- CLISH_PTYPE_INTEGER,
- CLISH_PTYPE_UNSIGNEDINTEGER,
-
- CLISH_PTYPE_SELECT
- } clish_ptype_method_e;
- typedef enum {
-
- CLISH_PTYPE_NONE,
-
- CLISH_PTYPE_TOUPPER,
-
- CLISH_PTYPE_TOLOWER
- } clish_ptype_preprocess_e;
- int clish_ptype_bt_compare(const void *clientnode, const void *clientkey);
- void clish_ptype_bt_getkey(const void *clientnode, lub_bintree_key_t * key);
- size_t clish_ptype_bt_offset(void);
- const char *clish_ptype_method__get_name(clish_ptype_method_e method);
- clish_ptype_method_e clish_ptype_method_resolve(const char *method_name);
- const char *clish_ptype_preprocess__get_name(clish_ptype_preprocess_e
- preprocess);
- clish_ptype_preprocess_e clish_ptype_preprocess_resolve(const char
- *preprocess_name);
- clish_ptype_t *clish_ptype_new(const char *name, const char *text,
- const char *pattern, clish_ptype_method_e method,
- clish_ptype_preprocess_e preprocess);
- void clish_ptype_delete(clish_ptype_t * instance);
- char *clish_ptype_validate(const clish_ptype_t * instance, const char *text);
- char *clish_ptype_translate(const clish_ptype_t * instance, const char *text);
- void clish_ptype_word_generator(clish_ptype_t * instance,
- lub_argv_t *matches, const char *text);
- void clish_ptype_dump(clish_ptype_t * instance);
- const char *clish_ptype__get_name(const clish_ptype_t * instance);
- const char *clish_ptype__get_text(const clish_ptype_t * instance);
- const char *clish_ptype__get_range(const clish_ptype_t * instance);
- void clish_ptype__set_preprocess(clish_ptype_t * instance,
- clish_ptype_preprocess_e preprocess);
- void clish_ptype__set_pattern(clish_ptype_t * instance,
- const char *pattern, clish_ptype_method_e method);
- void clish_ptype__set_text(clish_ptype_t * instance, const char *text);
- #endif
|