def get_container_or_none( self, type ): """returns reference to the class declaration or None""" type = type_traits.remove_alias( type ) type = type_traits.remove_cv( type ) cls = None if isinstance( type, cpptypes.declarated_t ): cls = type_traits.remove_alias( type.declaration ) elif isinstance( type, class_declaration.class_t ): cls = type elif isinstance( type, class_declaration.class_declaration_t ): cls = type else: return if not cls.name.startswith( self.name() + '<' ): return for ns in std_namespaces: if type_traits.impl_details.is_defined_in_xxx( ns, cls ): return cls
def get_container_or_none(self, type): """returns reference to the class declaration or None""" type = type_traits.remove_alias(type) type = type_traits.remove_cv(type) cls = None if isinstance(type, cpptypes.declarated_t): cls = type_traits.remove_alias(type.declaration) elif isinstance(type, class_declaration.class_t): cls = type elif isinstance(type, class_declaration.class_declaration_t): cls = type else: return if not cls.name.startswith(self.name + '<'): return for ns in std_namespaces: if type_traits.impl_details.is_defined_in_xxx(ns, cls): return cls