// // wcskipit.h Definitions for the WATCOM Container Skip List Iterator // Classes // // ========================================================================= // // Open Watcom Project // // Copyright (c) 2002-2010 Open Watcom Contributors. All Rights Reserved. // Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. // // This file is automatically generated. Do not edit directly. // // ========================================================================= // #ifndef _WCSKIPIT_H_INCLUDED #define _WCSKIPIT_H_INCLUDED #ifndef _ENABLE_AUTODEPEND #pragma read_only_file; #endif #ifndef __cplusplus #error This header file requires C++ #endif #ifndef _WCDEFS_H_INCLUDED #include #endif #ifndef _WCEXCEPT_H_INCLUDED #include #endif #ifndef _WCSKIP_H_INCLUDED #include #endif #ifndef _WCSIBASE_H_INCLUDED #include #endif // // The WCValSkipListIter is the iterator for the WCValSkipList class // template class WCValSkipListIter : public WCSkipListIterBase { public: inline WCValSkipListIter() {}; inline WCValSkipListIter( const WCValSkipList& skip_list ) : WCSkipListIterBase( skip_list ) {}; inline ~WCValSkipListIter() {}; inline const WCValSkipList *container() const { return (const WCValSkipList *)WCSkipListIterBase::container(); }; inline void reset() { WCSkipListIterBase::reset(); }; inline void reset( const WCValSkipList &skip_list ) { WCSkipListIterBase::reset( skip_list ); }; }; // // The WCPtrSkipListIter is the iterator for the WCPtrSkipList class. // template class WCPtrSkipListIter : public WCSkipListIterBase { public: inline WCPtrSkipListIter() {}; inline WCPtrSkipListIter( const WCPtrSkipList& skip_list ) : WCSkipListIterBase( skip_list ) {}; inline ~WCPtrSkipListIter() {}; inline const WCPtrSkipList *container() const { return( (const WCPtrSkipList *)WCSkipListIterBase::container() ); }; inline Type *current() const { return( (Type *)WCSkipListIterBase::current() ); }; inline void reset() { WCSkipListIterBase::reset(); }; inline void reset( const WCPtrSkipList &skip_list ) { WCSkipListIterBase::reset( skip_list ); }; }; // // The WCValSkipListSetIter is the iterator for the WCValSkipListSet class // template class WCValSkipListSetIter : public WCSkipListIterBase { public: inline WCValSkipListSetIter() {}; inline WCValSkipListSetIter( const WCValSkipListSet& skip_list ) : WCSkipListIterBase( skip_list ) {}; inline ~WCValSkipListSetIter() {}; inline const WCValSkipListSet *container() const { return (const WCValSkipListSet *)WCSkipListIterBase::container(); }; inline void reset() { WCSkipListIterBase::reset(); }; inline void reset( const WCValSkipListSet &skip_list ) { WCSkipListIterBase::reset( skip_list ); }; }; // // The WCPtrSkipListSetIter is the iterator for the WCPtrSkipListSet class. // template class WCPtrSkipListSetIter : public WCSkipListIterBase { public: inline WCPtrSkipListSetIter() {}; inline WCPtrSkipListSetIter( const WCPtrSkipListSet& skip_list ) : WCSkipListIterBase( skip_list ) {}; inline ~WCPtrSkipListSetIter() {}; inline const WCPtrSkipListSet *container() const { return( (const WCPtrSkipListSet *)WCSkipListIterBase ::container() ); }; inline Type *current() const { return( (Type *)WCSkipListIterBase::current() ); }; inline void reset() { WCSkipListIterBase::reset(); }; inline void reset( const WCPtrSkipListSet &skip_list ) { WCSkipListIterBase::reset( skip_list ); }; }; // // The WCValSkipListDictIter is the iterator for the WCValSkipListDict class. // // private inheritance is used to hide the current member function. // template class WCValSkipListDictIter : private WCSkipListIterBase > { public: inline WCValSkipListDictIter() {}; inline WCValSkipListDictIter( const WCValSkipListDict& hash ) : WCSkipListIterBase( hash ) {}; inline ~WCValSkipListDictIter() {}; inline const WCValSkipListDict *container() const { return( (const WCValSkipListDict *)WCSkipListIterBase ::container() ); }; inline wciter_state exceptions() const { return( WCSkipListIterBase::exceptions() ); }; inline wciter_state exceptions( wciter_state const set_flags ) { return( WCSkipListIterBase::exceptions( set_flags ) ); }; Key key() const; inline void reset() { WCSkipListIterBase::reset(); }; inline void reset( const WCValSkipListDict &hash ) { WCSkipListIterBase::reset( hash ); }; Value value() const; inline WCbool operator++() { return( WCSkipListIterBase::operator++() ); }; inline WCbool operator()() { return( WCSkipListIterBase::operator()() ); }; }; template Key WCValSkipListDictIter::key() const { if( curr == 0 ) { base_throw_undef_item(); Key temp; return( temp ); } return( base_curr_node()->data.key ); }; template Value WCValSkipListDictIter::value() const { if( curr == 0 ) { base_throw_undef_item(); Value temp; return( temp ); } return( base_curr_node()->data.value ); }; // // The WCPtrSkipListDictIter is the iterator for the WCPtrSkipListDict class. // template class WCPtrSkipListDictIter : public WCValSkipListDictIter { public: inline WCPtrSkipListDictIter() {}; inline WCPtrSkipListDictIter( const WCPtrSkipListDict& hash ) : WCValSkipListDictIter( hash ) {}; inline ~WCPtrSkipListDictIter() {}; inline const WCPtrSkipListDict *container() const { return( (const WCPtrSkipListDict *)WCValSkipListDictIter ::container() ); }; inline Key * key() const { return( (Key *)WCValSkipListDictIter::key() ); }; inline void reset() { WCValSkipListDictIter::reset(); }; inline void reset( const WCPtrSkipListDict &hash ) { WCValSkipListDictIter::reset( hash ); }; Value *value() const { return( (Value *)WCValSkipListDictIter::value() ); }; }; #endif