doc::parse_proc_header (private, deprecated)

 doc::parse_proc_header doc_block code_block param_ref tags_ref \
    code_ref [ level ]

Defined in packages/acs-content-repository/tcl/doc-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Parse the header block and prepare the datasources: Prepare a multirow datasource for the param tags Prepare a onerow datasource for all the other tags

Parameters:
doc_block (required)
code_block (required)
param_ref (required)
tags_ref (required)
code_ref (required)
level (optional, defaults to "2")

Partial Call Graph (max 5 caller/called nodes):
%3 doc::get_proc_doc doc::get_proc_doc (private, deprecated) doc::parse_proc_header doc::parse_proc_header doc::get_proc_doc->doc::parse_proc_header ad_log_deprecated ad_log_deprecated (public) doc::parse_proc_header->ad_log_deprecated

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc doc::parse_proc_header
  
    upvar $level "${param_ref}:rowcount" param_rowcount   
    upvar $level $tags_ref tags
    set param_rowcount 0

    set tags(code) $code_block
        
    # Go through all the tags and stick them in the appropriate datasources
    set remaining_doc $doc_block 
    while { [regexp {[^@]*@([a-zA-Z0-9_-]+) +([^@]*)(.*?)} $remaining_doc match tag data remaining_doc] } {
      if { [string equal -nocase $tag "param"] } {
        if { [regexp {([^ ]+) +(.*)} $data match name value] } {
          incr param_rowcount
          upvar $level "${param_ref}:$param_rowcount" row
          set row(name) $name
          set row(value) $value
          set row(rownum) $param_rowcount
    }
      } else {
        set tags($tag) [string trim $data]
      }
    }

    # Get all the stuff that is not a tag (at the top)
    if { ![info exists tags(header)] } {
      set doc_head ""
      regexp {[^@]*} $doc_block doc_head
      set tags(header) $doc_head
    }

    # Determine whether we have a procedure or a function
    if { ![info exists tags(type)] } {
      if { [regexp -nocase -line {(procedure|function) .*$} $code_block match type] } {
        set tags(type) [string totitle $type]
      } else {
        set tags(type) "Subprogram"
      }
    }

    upvar $level $code_ref code
    set code $code_block
XQL Not present:
Generic
PostgreSQL XQL file:
packages/acs-content-repository/tcl/doc-procs-postgresql.xql

Oracle XQL file:
packages/acs-content-repository/tcl/doc-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: