OOF2: The Manual

Name

EmptyFieldIterator — Iterate over a Field with no components

C++ Synopsis

#include "engine/fieldindex.h"
class EmptyFieldIterator: , public ComponentIterator {
  EmptyFieldIterator();
}

Source Files

  • SRC/engine/fieldindex.h: C++ header
  • SRC/engine/fieldindex.C: C++ source code

Description

EmptyFieldIterator is the ComponentIterator for EmptyFieldComponents. It is used when iterating over the nonexistent components of nonexistent Fields, such as the out-of-plane part of an in-plane Field. A loop using an EmptyFieldIterator does nothing. Dereferencing the iterator produces a null pointer.

This isn't as silly as it seems. It's used in generic code where the type of Field isn't known.

EmptyFieldIterators are created by the begin() and end() methods of EmptyFieldComponents, and are not directly accessible in Python.