Function: srecode-semantic-handle-:using-namespaces

srecode-semantic-handle-:using-namespaces is a byte-compiled function defined in cpp.el.gz.

Signature

(srecode-semantic-handle-:using-namespaces DICT)

Documentation

Add macros into the dictionary DICT based on used namespaces.

Adds the following: PREFIX_NAMESPACE - for each NAMESPACE in srecode-cpp-namespaces.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/srecode/cpp.el.gz
(defun srecode-semantic-handle-:using-namespaces (dict)
  "Add macros into the dictionary DICT based on used namespaces.
Adds the following:
PREFIX_NAMESPACE - for each NAMESPACE in `srecode-cpp-namespaces'."
  (let ((tags (semantic-find-tags-by-class
	       'using (semantic-fetch-tags))))
    (dolist (name srecode-cpp-namespaces)
      (let ((variable (format "PREFIX_%s" (upcase name)))
	    (prefix   (format "%s::"      name)))
	(srecode-dictionary-set-value dict variable prefix)
	(dolist (tag tags)
	  (when (and (eq (semantic-tag-get-attribute tag :kind)
			 'namespace)
		     (string= (semantic-tag-name tag) name))
	    (srecode-dictionary-set-value dict variable ""))))))
  )