バナーをクリックすれば目次に戻ります
Copyright 1999 Rogue Wave Software
Copyright 1999 Sun Microsystems, Inc.
RWGStack(type)
#include <rw/gstack.h> declare(RWGStack,type) RWGStack(type) a ;
RWBoolean yourTesterFunction(const type* c, const void* d);引数 c は、一致するかどうかを調べるコレクション内の要素です。引数 d を yourTesterFunction() に渡して c と d が一致すれば、関数は TRUE を返します。
記述を簡単にするため、テスト関数に対して次のような仮想の typedef が使用されています。
typedef RWBoolean (*yourTester)(const type*, const void*);
RWGStack(type)();
RWGStack(type)(type* a);
RWGStack(type)(const RWGStack(type)& a);
void operator=(const RWGStack(type)& a);
void clear();
RWBoolean contains(yourTester t, const void* d) const;
RWBoolean containsReference(const type* e) const;
size_t entries() const;
RWBoolean isEmpty() const;
size_t occurrencesOf(yourTester t, const void* d) const;
size_t occurrencesOfReference(const type* e) const;
type* pop();
void push(type* a);
type* top() const;