EDOBE XDOM PMML Manuel d'utilisateur Page 88

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 98
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 87
88
1. Request input and output data rows.
The
execute() method must call CNKBufReader::setRequestRows to
request access to its input data, and call
CNKBufWriter::setRequestRows to allocate space for its output data.
It is important to note that a
CNKProc cannot assume that any other
parts of the pipeline are being processed in parallel. Therefore, if
CNKBufReader::setRequestRows has been called to request access to
a certain number of rows, and these rows are not yet ready (according
to
CNKBufReader::isReady()), then the execute() method must
simply return, waiting until it is called again later to see if the data is
ready. An execute method should never enter a wait loop, waiting for
some event to occur in some other part of the pipeline.
When a
CNKBuf is initialized via CNKBUF::init(), the row requests for
all its readers or writers are initialized to zero, so initially
CNKBufReader::isReady() and CNKBufWriter::isReady() will always
return true (non-zero) for all of the inputs and outputs of a
CNKProc.
When
execute() is called the first time, with zero rows available on
its inputs and outputs, it will need to call
setRequestRows to request
the appropriate number of input and output rows.
In many situations, this processing can be done by calling
CNKProc::executeRequestRows(). This utility method calls
setRequestRows on all of the inputs (requesting getNumRows() rows)
and outputs (requesting
getOutputNumRows() rows). Then, it calls
isReady() on all of the inputs and outputs, to check whether the
requests are satisfied. If all of the inputs and outputs are ready,
executeRequestRows returns the minimum number of rows available
on any of the inputs or outputs. This may be less than
getNumRows()
if one of the inputs has encountered an
EOF. If any of the inputs or
outputs is not ready, then this method returns
-1. If
executeRequestRows() returns less than zero, the execute method
should simply return, to wait for the input and output row requests to
be satisfied.
2. Process data.
The
execute() method must actually perform the data processing,
reading data from its inputs with methods such as
CNKBufReader::getDouble, and writing the resulting data to its
outputs with methods such as
CNKBufWriter::setDouble.
Vue de la page 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 97 98

Commentaires sur ces manuels

Pas de commentaire