parameters: (cls)
docstring: Adds implementation of private helper methods to cls.
docstring_summary: Adds implementation of private helper methods to cls.
docstring_tokens: Adds implementation of private helper methods to cls .
function: def _AddPrivateHelperMethods(cls):
    """Adds implementation of private helper methods to cls."""
  
    def Modified(self):
      """Sets the _cached_byte_size_dirty bit to true,
      and propagates this to our listener iff this was a state change.
      """
  
      # Note:  Some callers check _cached_byte_size_dirty before calling
      #   _Modified() as an extra optimization.  So, if this method is ever
      #   changed such that it does stuff even when _cached_byte_size_dirty is
      #   already true, the callers need to be updated.
      if not self._cached_byte_size_dirty:
        self._cached_byte_size_dirty = True
        self._listener_for_children.dirty = True
        self._is_present_in_parent = True
        self._listener.Modified()
  
    cls._Modified = Modified
    cls.SetInParent = Modified
function_tokens: def _AddPrivateHelperMethods ( cls ) : def Modified ( self ) : """Sets the _cached_byte_size_dirty bit to true,
      and propagates this to our listener iff this was a state change.
      """ # Note:  Some callers check _cached_byte_size_dirty before calling #   _Modified() as an extra optimization.  So, if this method is ever #   changed such that it does stuff even when _cached_byte_size_dirty is #   already true, the callers need to be updated. if not self . _cached_byte_size_dirty : self . _cached_byte_size_dirty = True self . _listener_for_children . dirty = True self . _is_present_in_parent = True self . _listener . Modified ( ) cls . _Modified = Modified cls . SetInParent = Modified