The ACE library contains ~240,000 lines of C++ code and ~500 classes
The ACE OS adaptation layer constitutes approximately 10 percent of ACE (about 27,000 lines of code). It consists of a class called ACE_OS that contains over 500 C++ static methods.
ACE provides an extensive set of wrapper facades, constituting nearly 50 percent of its total source base.
The remaining ~40 percent of ACE consists of object-oriented frameworks, which are integrated sets of classes that collaborate to provide a reusable software architecture for a family of related applications.
从内容上看ACE包括三个层次:
1、操作系统基础功能函数封装。不同的操作系统提供了相同功能的不同实现函数。对于ACE这个框架来说,要支持跨平台就得从根本上首先提供跨平台的函数。通过宏定义、编译选项等一系列手段来实现跨平台的函数封装。
2、功能包装层,将相关联的功能封装成类的形式。方便面各对象地调用,为框架提供基础。
3、框架层,为实现可拓展的功能提供框架实现。
24万行代码,500个类,难怪说ACE是C++最好的标准范例。