api_add_to_proc_doc (public)
api_add_to_proc_doc -proc_name proc_name -property property \
-value valueDefined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl
Add a certain value to a property in the proc doc of the specified proc.
- Switches:
- -proc_name (required)
- name is fully qualified name without leading colons proc procs, XOTcl methods are a triple with the fully qualified class name, then proc|instproc and then the method name.
- -property (required)
- name of property such as "main" "testcase" "calledby" "deprecated_p" "script" "protection"
- -value (required)
- value of the property
- Author:
- Gustaf Neumann
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_api_browser_api_add_to_proc_doc
Source code: # A Tcllib or tDOM package may have been loaded after acs-tcl's documentation # file. Register its existing command before adding testcase/caller data. if {[namespace which ::acs::tcllib::register_documentation] ne ""} { ::acs::tcllib::register_documentation $proc_name } if {[nsv_exists api_proc_doc $proc_name]} { set d [nsv_get api_proc_doc $proc_name] # # Make sure, not adding value multiple times (e.g. on # reloads). Probably clearing on redefinition would be an # option, but then we have to make sure that the test cases # are reloaded as well. # if {[dict exists $d $property]} { set must_update [expr {$value ni [dict get $d $property]}] } else { set must_update 1 } if {$must_update} { dict lappend d $property $value nsv_set api_proc_doc $proc_name $d #ns_log notice "adding property $property with value $value to proc_doc of $proc_name" } } else { nsv_set api_proc_doc $proc_name [list $property [list $value]] # NaviServer, NSF and NX maintain their documentation externally. Keep # testcase and caller metadata even without an OpenACS proc_doc, # but do not report these commands as undocumented. Accept either # unqualified names or exactly one leading namespace qualifier. if {![regexp {^(::)?(ns_|nsv_|nscp$|nsf::|nx::)} $proc_name] && !([regexp {^(::)?thread::(send|transfer|exists|release)$} $proc_name] && [package provide Thread] ne "" && [namespace which -command ::[string trimleft $proc_name :]] ne "")} { nsv_set api_pending_proc_doc_warnings $proc_name 1 if {[nsv_exists api_proc_doc_state startup_complete]} { api_warn_pending_proc_doc $proc_name } } }XQL Not present: Generic, PostgreSQL, Oracle