究竟什么是所谓的“类集群"?在Objective-C中? [英] What exactly is a so called "Class Cluster" in Objective-C?

查看:41
本文介绍了究竟什么是所谓的“类集群"?在Objective-C中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在读到 NSArray 就是这样一个东西.听起来很沉重.我的办公桌上有 7 本关于 Objective-C、Cocoa 和 C 的非常厚的书.它们都没有提到 Class Cluster,至少我在书后的索引中找不到.那是什么?

I was reading that NSArray is just such a thing. Sounds heavy. I have 7 really fat books here on my desk about Objective-C, Cocoa and C. None of them mention Class Cluster at all, at least I can't find it in the Index at the back of the books. So what's that?

推荐答案

来自 Apple 的文档....简而言之,它是 Foundation 框架中使用的一种设计模式,这可能是 ObjC 书籍中没有提到它的原因.

From Apple's docs.... In short it's a design pattern used in the Foundation framework, which is probably why it's not mentioned in ObjC books.

类集群是一种架构,它将许多私有的具体子类组合在一个公共的抽象超类下.以这种方式对类进行分组为用户提供了一个简化的界面,用户只能看到公开可见的架构.

A class cluster is an architecture that groups a number of private, concrete subclasses under a public, abstract superclass. The grouping of classes in this way provides a simplified interface to the user, who sees only the publicly visible architecture.

这篇关于究竟什么是所谓的“类集群"?在Objective-C中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆