Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

externview(3u) [debian man page]

ExternView(3U)						    InterViews Reference Manual 					    ExternView(3U)

NAME
ExternView, PreorderView, InorderView, PostorderView - base class for external representation objects and subclasses for common traversals SYNOPSIS
#include <Unidraw/Components/externview.h> DESCRIPTION
ExternView is the abstract base class for external representation objects. Generally speaking, external representation objects convey domain-specific information outside the editor. They are simply component views that extract information from their subject and external- ize it as a stream of bytes; thus the ExternView base class is derived from ComponentView. There are three predefined ExternView subclasses: PreorderView, InorderView, and PostorderView. These subclasses manage subviews and sup- port three common traversals of the external view hierarchy. EXTERNVIEW PUBLIC OPERATIONS
virtual boolean Emit(ostream&) virtual boolean Definition(ostream&) Emit and Definition make up the basic ExternView protocol. Emit initiates external representation generation and calls Definition on each of its children. Emit normally calls the external view's own Definition operation first. Then if the external view con- tains subviews, Emit invokes the children's Definition operations in the proper order to ensure a syntactically correct external representation. Both of these operation do nothing by default, and both return a boolean that indicates whether the stream of bytes was generated successfully. ExternView* GetView(Iterator) void SetView(ExternView*, Iterator&) These operations do nothing by default. Subclasses that contain children should redefine them as follows: GetView should return the ExternView to which an iterator points. SetView should initialize the iterator to point to a particular ExternView in the list of children; it should initialize the iterator to point to a nil instance if the given ExternView is not a child. EXTERNVIEW PROTECTED OPERATIONS
ExternView(Component* = nil) The abstract base class constructor is protected to guard against instantiation. It takes the subject as an optional argument. DERIVED CLASSES
PreorderView, InorderView, and PostorderView redefine their Definition operations to perform preorder, inorder, and postorder traversals of their children, respectively. Each child's Definition operation is called during the traversal. Note that every child must be an instance of the same ExternView subclass to ensure a consistent traversal order. SEE ALSO
Component(3U), ComponentView(3U), Iterator(3U), ostream(3C++) Unidraw 19 January 1991 ExternView(3U)

Check Out this Related Man Page

ComponentView(3U)					    InterViews Reference Manual 					 ComponentView(3U)

NAME
ComponentView - base class for views of objects that model domain-specific elements SYNOPSIS
#include <Unidraw/Components/compview.h> DESCRIPTION
ComponentView is an abstract base class for views of component subjects. Component views provide a specialized presentation of the infor- mation in the component subject to which they are attached. Usually there is at least one view subclass defined for each subclass of com- ponent subject. PUBLIC OPERATIONS
virtual void Interpret(Command*) virtual void Uninterpret(Command*) These operations call the corresponding subject operations by default. They are included in the component view protocol for conve- nience, since other objects often deal with component views rather than their subjects. virtual void Update() Notify the view of a change in some state that it depends on, normally state in the subject. This operation does nothing by default. virtual Component* GetParent() Return the view's parent, if any. Like component subjects, component views may be structured hierarchically, and their structure may or may not reflect that of their subject. Component* GetSubject() Return the component view's subject. virtual void First(Iterator&) virtual void Last(Iterator&) virtual void Next(Iterator&) virtual void Prev(Iterator&) virtual boolean Done(Iterator) Operations for iterating over the component view's children, if any. First and Last initialize an iterator to point to the begin- ning and end of the list of children, respectively. Next increments the iterator to point to the following child, while Prev decre- ments the iterator to point to the preceding child. Done returns whether or not the iterator points beyond the first or last child in the list. virtual ClassId GetClassId() virtual boolean IsA(ClassId) GetClassId returns the unique class identifier for the ComponentView subclass, while IsA returns whether the instance is of a class or subclass corresponding to the given identifier. IsA typically checks the given identifier against the instance's own (as defined by its GetClassId operation) and, failing that, calls its parent classes' IsA operation. All subclasses must redefine GetClassId and IsA to ensure that their identifiers are unique and that view category information is defined properly. See classes(3U) for more information on class identifiers and view categories. PROTECTED OPERATIONS
ComponentView(Component* subject = nil) The constructor initializes the component view's subject pointer to the given value. The view will also attach itself to the sub- ject if the argument is non-nil. virtual void SetSubject(Component*) Set the component's subject pointer to the given value. By default, this operation does not call Attach or Detach on the sub- ject(s). virtual void SetParent(Component* child, Component* parent) Notify a child component that it has a new or different parent. This operation does nothing by default. Composite components should call this function in their structure-modifying operations, and components that keep information about their parents should redefine it to update this information. SEE ALSO
Command(3U), Component(3U), Iterator(3U), classes(3U) Unidraw 20 August 1990 ComponentView(3U)
Man Page