Function: semantic-tag-protected-p

semantic-tag-protected-p is a byte-compiled function defined in tag-ls.el.gz.

Signature

(semantic-tag-protected-p TAG PROTECTION &optional PARENT)

Documentation

Non-nil if TAG is protected.

PROTECTION is a symbol which can be returned by the method semantic-tag-protection. PARENT is the parent data type which contains TAG.

For these PROTECTIONs, true is returned if TAG is:
@table @asis
@item nil
  Always true.
@item private
  True if nil.
@item protected
  True if private or nil.
@item public
  True if private, protected, or nil.
@end table

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/tag-ls.el.gz
(defun semantic-tag-protected-p (tag protection &optional parent)
  "Non-nil if TAG is protected.
PROTECTION is a symbol which can be returned by the method
`semantic-tag-protection'.
PARENT is the parent data type which contains TAG.

For these PROTECTIONs, true is returned if TAG is:
@table @asis
@item nil
  Always true.
@item  private
  True if nil.
@item protected
  True if private or nil.
@item public
  True if private, protected, or nil.
@end table"
  (if (null protection)
      t
    (let ((tagpro (semantic-tag-protection tag parent)))
      (or (and (eq protection 'private)
	       (null tagpro))
	  (and (eq protection 'protected)
	       (or (null tagpro)
		   (eq tagpro 'private)))
	  (and (eq protection 'public)
	       (not (eq tagpro 'public)))))
    ))