Polymorphism in the IccResource class
Three virtual methods are defined in the base class IccResource, as shown in Figure 1.
// clear function
virtual void clear();
// get function
virtual const IccBuf& get();
// put function
virtual void put(const IccBuf& buffer);
These methods are implemented differently in the classes
that are derived from the IccResource class. Table 1 shows
where the get, clear, and put methods have been
implemented in the subclasses of IccResource. Each implemented method is marked with an × in the table.
| Class name | clear method | get method | put method |
|---|---|---|---|
| IccConsole | × | ||
| IccDataQueue | × | × | × |
| IccJournal | × | ||
| IccSession | × | × | |
| IccTempStore | × | × | × |
| IccTerminal | × | × | × |
These virtual methods are not supported by any subclasses of IccResource except those that are shown in Table 1.
Note: The default implementations of the clear, get,
and put methods in the base class IccResource throw an exception to prevent the user from calling an unsupported
method.