A segment of a Wafer comprises an arbitrary number of attributes, an arbitrary number of stand-alone grids, and an arbitrary number of boundaries. Fig. A.13 depicts access methods of the segment class.
The method getBoundary returns a handle to a Boundary object.
The method nextBoundary is an iterator over all boundaries of the segment.
The methods getAttribute and nextAttribute work the same way as their boundary counterparts. They return a handle to a Quantity or Property object. Note that the abstract base class Attr must be cast to the correct type (Quantity or Property) by the usage of either castToQuantity or castToProperty. The difference between a property and a quantity is that a property is constant over the whole segment, thus only one value is stored for each property. On the other hand a quantity is defined by values stored on each point of a grid. Therefore a quantity has an associated grid, a property not. This is also reflected in the different member functions of properties and quantities.
nextGrid is an iterator over all stand-alone grids of a segment.
getTopology returns the base grid of a segment. The base grid is defined as the grid of a segment with the smallest number of points. For example the checks that verify the interface conformance of segments use the topology defined via the base grid of a segment. A base grid can either be a stand-alone grid or a grid of a quantity. Note, that a segment with no grid at all does not make sense and thus, is not valid. If a segment with only a constant attribute is to be stored, then a stand-alone grid must be used solely to define the geometry of the segmentA.2.
getName returns the name of the segment as string.
getSurface returns the surface of the segment (c. f. Wafer::getSurface).
Fig. A.14 depicts methods of the segment class that are used to modify data stored on a segment.
The method addQuantity adds the specified quantity to the internal attributes container of the segment. A check compares the grid of the new quantity to the base grid of the segment, before the quantity is actually added.
The method addProperty adds the specified property to the internal attributes container of the segment.
The method addBoundaries adds a vector of boundaries (boundary handles) to the internal boundary container of the segment. Two major checks are performed on each boundary of the vector before they are actually added.