DOKK / manpages / debian 12 / ivtools-dev / Subject.3i.en
Subject(3I) InterViews Reference Manual Subject(3I)

Subject - object with views

#include <InterViews/subject.h>

A subject is an object that has one or more views that it wishes to notify when it changes. The SubjectIteractor class can be used if it is necessary to iterate through the views of a subject explicitly.

Because subjects are shared, Subject is a subclass of Resource. To allow for the possibility of multiple inheritance, in which case only a single copy of resource information should be maintained, Resource is a virtual base class.

}

This type enumerates possible hints when a subject is notifying a view that it has changed. The attaching hint indicates that a view has attached to the subject. The detaching hint means that the subject is being deleted and the view should consider itself detached. The setting hint means that the subject's value has been set, though possibly to the same value as it already has. The changing hint means that the value is set to something different than it was previously.
Add a view to the subject's list.
Remove a view from the subject's list.
Notify all the views of a subject that it has been updated.
Return whether a given view is on the subject's list of views.
This function is equivalent to attach and is provided solely for backward compatibility. It will be removed in a future version.
This function is equivalent to detach and is provided solely for backward compatibility. It will be removed in a future version.
This function is equivalent to notify(changing) and is provided solely for backward compatibility. It will be removed in a future version.
This function is equivalent to viewed_by and is provided solely for backward compatibility. It will be removed in a future version.

A subject iterator can be used to iterate through the views in a subject.

Create a subject iterator for the given subject. The iterator is only valid as long as the subject exists.
Reset the iteration to start at the beginning of the list. This operation is called by the constructor.
Return whether there are more views in the list.
Return the current view.
Remove the current view from the list.
Move the iteration to the next view in the list.

View(3I)

29 June 1989 InterViews