docs: def adopt_declaration(self, decl, access):
          """adds new declaration to the class
  
          :param decl: reference to a :class:`declaration_t`
  
          :param access: member access type
          :type access: :class:ACCESS_TYPES
          """
          if access == ACCESS_TYPES.PUBLIC:
              self.public_members.append(decl)
          elif access == ACCESS_TYPES.PROTECTED:
              self.protected_members.append(decl)
          elif access == ACCESS_TYPES.PRIVATE:
              self.private_members.append(decl)
          else:
              raise RuntimeError("Invalid access type: %s." % access)
          decl.parent = self
          decl.cache.reset()
          decl.cache.access_type = access