def __find_out_is_read_only(self): type_ = declarations.remove_alias( self.type ) if isinstance( type_, declarations.const_t ): return True if declarations.is_pointer( type_ ): type_ = declarations.remove_pointer( type_ ) if declarations.is_reference( type_ ): type_ = declarations.remove_reference( type_ ) if isinstance( type_, declarations.const_t ): return True if self.apply_smart_ptr_wa: return False #all smart pointers has assign operator if isinstance( type_, declarations.declarated_t ) \ and isinstance( type_.declaration, declarations.class_t ) \ and not declarations.has_public_assign( type_.declaration ): return True return False
def __find_out_is_read_only(self): type_ = declarations.remove_alias( self.decl_type ) if isinstance( type_, declarations.const_t ): return True if declarations.is_pointer( type_ ): type_ = declarations.remove_pointer( type_ ) if declarations.is_reference( type_ ): type_ = declarations.remove_reference( type_ ) if isinstance( type_, declarations.const_t ): return True if self.apply_smart_ptr_wa: return False #all smart pointers has assign operator if isinstance( type_, declarations.declarated_t ) \ and isinstance( type_.declaration, declarations.class_t ) \ and not declarations.has_public_assign( type_.declaration ): return True return False