在 Rational® Rhapsody® 中,omu* 容器是不使用模板实施的容器。使用无模板的容器可大量减少生成的代码的大小。OMUList 是一种无类型的链接列表。
这个类是在头文件 omulist.h 中定义的。
first
指定列表中的第一个元素。其定义如下所示:
OMUListItem* first;
last
指定列表中的最后一个元素。其定义如下所示:
OMUListItem*
last;
示例
考虑以下示例:
OMUIterator
iter(itsObserver);
while(*iter)
{
(static_cast<Observer*>(*iter))->notify();
iter++;
}