IlsSetContextList
Category
Modeling class template
Inheritance Path
IlsSetContextList
Related Pattern
Bridge
Description
This class template is used to maintain the integrity of set-relations in which an object whose key is to be modified is involved. It is declared as a data member of each class that may be put in a set. It contains the list of the sets—in the form of pointers to instances of type
IlsSetContext—to which an instance of the class in which it is declared belongs.
Library
Synopsis
template <class KeyType>
class IlsSetContextList
{
public:
IlsSetContextList(IlsRefCounted& holder);
Myself& operator<<(Context* context);
Myself& operator>>(Context* context);
void rehash(CKeyTypeR oldt, CKeyTypeR newt);
};
Constructor
IlsSetContextList(IlsRefCounted& holder);
This constructor takes a reference of type IlsRefCounted to the object holding the IlsSetContextList instance, generally *this.
Member Functions
void rehash(CKeyTypeR oldt, CKeyTypeR newt);
You must call this function each time you modify the key associated with an object.
Operators
Myself& operator<<(Context* context);
This operator is used by the callback
setSetContext to add a set to the list of sets maintained by
IlsSetContextList.
Myself& operator>>(Context* context);
This operator is used by the callback
unsetSetContext to remove a set from the list of sets maintained by an instance of
IlsSetContextList.
See Also
Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.