EDOBE XDOM PMML Bedienungsanleitung Seite 87

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 98
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 86
87
of a class, this creates and exports a regular C function (with a long,
ugly name including the class name) that creates an instance of that
class. For example,
CNKProcRandomReader.cpp contains the line:
CNK_DEFINE_ACCESSIBLE_CLASS(CNKProcRandomReader)
The init() Method
If a subclass of
CNKProc redefines the init() method, the redefined
init() method should start by calling its superclass method:
CNKProc::init().
Most
init() methods should check that the CNKProc has the right
number of input and output
CNKBufs. This is most easily done by
calling
CNKProc::checkBufs.
The
init() method performs any initialization that the object
requires, based on the values of any properties that have been set.
Some of these properties may be common to all
CNKProc objects, such
as the input and output bufs (accessed with
getNumInputs, etc), and
the number of rows (accessed with
getNumRows, etc). Some properties
may be specific to this particular class. For example, a file reader
object would have methods for setting properties such as the file
name, file type, etc. Within the
init() method, these properties are
used to initialize any internal data structures required to execute the
object.
Although the main data storage mechanism for the TIBCO Spotfire
Pipeline is the
CNKBuf data structure, it is also possible to allocate and
use storage within a given
CNKProc object. For example, a model-
building
CNKProc may allocate internal storage for accumulating and
processing the data being modeled. If these internal data structures
are of a fixed size, they can be specified as part of the
CNKProc
subclass instance variables. If the internal data structures can have
different sizes depending on the number of columns and rows of the
inputs, then they could be allocated dynamically, within the
init()
method. In this case, the dynamically-allocated data should be
released if the
init() method is called a second time, and it should be
released in the class destructor.
The execute() Method
The
execute() method needs to manage its inputs and outputs, as
well as actually performing the data manipulation operation. More
explicitly, the
execute() method should perform the following steps:
Seitenansicht 86
1 2 ... 82 83 84 85 86 87 88 89 90 91 92 ... 97 98

Kommentare zu diesen Handbüchern

Keine Kommentare