(self, msg, anchor=None)
Add a validity entry, optionally with a VUID anchor.

        If any trailing arguments are supplied,
        an anchor is generated by concatenating them with dashes
        at the end of the VUID anchor name.
Add a validity entry, optionally with a VUID anchor.
Add a validity entry optionally with a VUID anchor .
def addValidityEntry(self, msg, anchor=None):
        """Add a validity entry, optionally with a VUID anchor.

        If any trailing arguments are supplied,
        an anchor is generated by concatenating them with dashes
        at the end of the VUID anchor name.
        """
        if not msg:
            raise RuntimeError("Tried to add a blank validity line!")
        parts = ['*']
        _checkAnchorComponents(anchor)
        if anchor:
            if not self.entity_name:
                raise RuntimeError('Cannot add a validity entry with an anchor to a collection that does not know its entity name.')
            parts.append('[[{}]]'.format(
                '-'.join(['VUID', self.entity_name] + list(anchor))))
        parts.append(msg)
        combined = _fix_a_vs_an(' '.join(parts))
        if combined in self.lines:
            raise RuntimeError("Duplicate validity added!")
        self.lines.append(combined)
def addValidityEntry ( self , msg , anchor = None ) : if not msg : raise RuntimeError ( "Tried to add a blank validity line!" ) parts = [ '*' ] _checkAnchorComponents ( anchor ) if anchor : if not self . entity_name : raise RuntimeError ( 'Cannot add a validity entry with an anchor to a collection that does not know its entity name.' ) parts . append ( '[[{}]]' . format ( '-' . join ( [ 'VUID' , self . entity_name ] + list ( anchor ) ) ) ) parts . append ( msg ) combined = _fix_a_vs_an ( ' ' . join ( parts ) ) if combined in self . lines : raise RuntimeError ( "Duplicate validity added!" ) self . lines . append ( combined )