Version 3 (modified by blb@…, 16 years ago) (diff) |
---|
Introduction
Note that some source files have doxygen-style comments, so some docs can be created by running doxygen on them.
registry2.0 code
Code: trunk/base/src/registry2.0
Tcl commands created
registry::entry cmd ?arg ...?
- Run a command against registry entries (implemented in entry.c)
- Commands are:
- create - entry_create()
- delete - entry_delete()
- open - entry_open()
- close - entry_close()
- search - entry_search()
- exists - entry_exists()
- imaged - entry_imaged()
- intalled - entry_installed()
- owner - entry_owner()
${entry} cmd ?arg ...?
- Commands specific to just one registry entry (usually gained from
registry::entry
) (implemented in entryobj.c) - Commands are:
- name - entry_obj_prop()
- portfile - entry_obj_prop()
- url - entry_obj_prop()
- location - entry_obj_prop()
- epoch - entry_obj_prop()
- version - entry_obj_prop()
- revision - entry_obj_prop()
- variants - entry_obj_prop()
- default_variants - entry_obj_prop()
- date - entry_obj_prop()
- state - entry_obj_prop()
- installtype - entry_obj_prop()
- map - entry_obj_filemap()
- unmap - entry_obj_filemap()
- files - entry_obj_files()
- imagefiles - entry_obj_imagefiles()
- activate - entry_obj_activate()
- deactivate - entry_obj_filemap()
- dependents - entry_obj_dependents()
- dependencies - entry_obj_dependencies()
- depends - entry_obj_depends()
- Commands specific to just one registry entry (usually gained from
item cmd ?arg ...?
- Implemented in item.c
- Commands are:
- create - item_create()
- search - item_search()
- exists - item_exists()
- others are commented-out (retain, release, name, url, path, worker, options, and variants)
${item} cmd ?arg ...?
- Implemented in itemobj.c
- Commands are:
- retain - item_obj_retain()
- release - item_obj_release()
- key - item_obj_key()
- Top-level registry commands (implemented in registry.c):
- registry::open - registry_open()
- registry::close - registry_close()
- registry::read - registry_read()
- registry::write - registry_write()
- registry::entry - entry_cmd()
C code files
entry.[ch]
- void delete_entry(ClientData clientData)
- to be used as the 'Tcl_CmdDeleteProc' for an entry object
- int entry_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
- implements "registry::entry cmd ?arg ...?"
entryobj.[ch]
- int entry_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
- implements "${entry} cmd ?arg ...?" (procs for entry objects from "registry::entry")
graph.[ch]
graphobj.[ch]
- Not completed, not built
item.[ch]
- int item_cmd(ClientData clientData UNUSED, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
- implements "item cmd ?arg ...?"
itemobj.[ch]
- int item_obj_cmd(ClientData clientData, Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[])
- implements "${item} cmd ?arg ...?" (procs for item objects from "item"
registry.[ch]
- reg_registry* registry_for(Tcl_Interp* interp, int status)
- Get the appropriate registry for the given Tcl interpreter
- int registry_failed(Tcl_Interp* interp, reg_error* errPtr)
- Sets a Tcl object result based on errPtr
- int Registry_Init(Tcl_Interp* interp)
util.[ch]
- char* unique_name(Tcl_Interp* interp, char* prefix)
- Generate a unique proc name starting with the given prefix (eg, <prefix>123, <prefix>124, etc)
- int parse_flags(Tcl_Interp* interp, int objc, Tcl_Obj* CONST objv[], int* start, option_spec options[], int* flags)
- Handle flags (-flag) in Tcl command strings
- void* get_object(Tcl_Interp* interp, char* name, char* type, Tcl_ObjCmdProc* proc, reg_error* errPtr)
- Retrieves the object whose proc is named by the given name
- int set_object(Tcl_Interp* interp, char* name, void* value, char* type, Tcl_ObjCmdProc* proc, Tcl_CmdDeleteProc* deleteProc, reg_error* errPtr)
- Sets the object whose proc is named by the given name
- int set_entry(Tcl_Interp* interp, char* name, reg_entry* entry, reg_error* errPtr)
- Sets a given name to be an entry object
- void set_sqlite_result(Tcl_Interp* interp, sqlite3* db, const char* query)
- Reports a sqlite3 error to Tcl
- int all_objects(Tcl_Interp* interp, sqlite3* db, char* query, char* prefix, set_object_function* setter)
- Sets the result of the Tcl interpreter to all objects returned by a query
- const char* string_or_null(Tcl_Obj* obj)
- Return the
char *
for a Tcl object, or if it is a string with only NULL, return NULL
- Return the
- int recast(void* userdata, cast_function* fn, free_function* del, void* outv, void inv, int inc, reg_error* errPtr)
- int entry_to_obj(Tcl_Interp* interp, Tcl_Obj obj, reg_entry* entry, reg_error* errPtr)
- Return Tcl string for a given entry object
- int list_entry_to_obj(Tcl_Interp* interp, Tcl_Obj* objs, reg_entry entries, int entry_count, reg_error* errPtr)
- Call entry_to_obj() for an array of entries
- void free_strings(void* userdata UNUSED, char strings, int count)
- Defined in util.h but doesn't actually exist
- int list_obj_to_string(char* strings, Tcl_Obj objv, int objc, reg_error* errPtr)
- Convert an array of Tcl objects to
char *
array
- Convert an array of Tcl objects to
- int list_string_to_obj(Tcl_Obj* objv, char strings, int objc, reg_error* errPtr)
- Convert an array of
char *
to Tcl object array
- Convert an array of
cregistry code
Code: trunk/base/src/cregistry