ExternView(3U)
π ExternView(3U) π
okay bestie, welcome to the InterViews Reference Manual corner of the internet, this is the page for ExternView and its lil friend group PreorderView, InorderView, and PostorderView πΈ
β¨ NAME β¨
ExternView, PreorderView, InorderView, PostorderView β the base class for external representation objects, plus subclasses for the common traversals π¦
β¨ SYNOPSIS β¨
#include <Unidraw/Components/externview.h>
β¨ DESCRIPTION β¨
So ExternView is the abstract base class for external representation objects. Basically, external representation objects are the ones whose whole job is to carry domain-specific info outside the editor. No cap.
They're literally just component views that pull information out of their subject and externalize it as a stream of bytes π
and that's why the ExternView base class is derived from ComponentView. Periodt.
There are three predefined ExternView subclasses: PreorderView, InorderView, and PostorderView. These girlies manage subviews and support three common traversals of the external view hierarchy. Iconic honestly π
β¨ EXTERNVIEW PUBLIC OPERATIONS β¨
virtual boolean Emit(ostream&)virtual boolean Definition(ostream&)
Emit and Definition make up the basic ExternView protocol. Emit kicks off 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 contains subviews, Emit invokes the children's Definition operations in the proper order to make sure the external representation is syntactically correct β¨ Both of these operations do nothing by default, and both return a boolean that tells you whether the stream of bytes was generated successfully π«Ά
ExternView* GetView(Iterator)void SetView(ExternView*, Iterator&)
These two also do nothing by default, bestie. Subclasses that contain children should redefine them like this:
GetViewshould return theExternViewthat an iterator points to.SetViewshould initialize the iterator to point to a particularExternViewin the list of children; and if the givenExternViewis not a child, it should initialize the iterator to point to anilinstance π
β¨ EXTERNVIEW PROTECTED OPERATIONS β¨
ExternView(Component* = nil)
The abstract base class constructor is protected to guard against instantiation β like, do not try to make one of these directly, she is abstract for a reason π 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 gets called during the traversal.
β οΈ Note that every child must be an instance of the same ExternView subclass to ensure a consistent traversal order. Fr fr, don't mix them.
β¨ SEE ALSO β¨
Component(3U), ComponentView(3U), Iterator(3U), ostream(3C++) π
and that's the whole page, bestie, you ate it π this one came out of Unidraw, dated 19 January 1991 β a whole vintage queen, we stan a classic πβ¨π¦
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms