def adopt_declaration(self, decl, access):
if access == ACCESS_TYPES.PUBLIC:<EOL><INDENT>self.public_members.append(decl)<EOL><DEDENT>elif access == ACCESS_TYPES.PROTECTED:<EOL><INDENT>self.protected_members.append(decl)<EOL><DEDENT>elif access == ACCESS_TYPES.PRIVATE:<EOL><INDENT>self.private_members.append(decl)<EOL><DEDENT>else:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % access)<EOL><DEDENT>decl.parent = self<EOL>decl.cache.reset()<EOL>decl.cache.access_type = access<EOL>
adds new declaration to the class

        :param decl: reference to a :class:`declaration_t`

        :param access: member access type
        :type access: :class:ACCESS_TYPES