bool Foam::OutputFilterFunctionObject<OutputFilter>::execute ( const bool forceWrite ) { if (enabled_) { if (!storeFilter_) { allocateFilter(); } ptr_->execute(); if (forceWrite || outputControl_.output()) { ptr_->write(); } if (!storeFilter_) { destroyFilter(); } } return true; }
bool Foam::OutputFilterFunctionObject<OutputFilter>::execute ( const bool forceWrite ) { if (active()) { if (!storeFilter_ && !allocateFilter()) { return false; } if (evaluateControl_.output()) { ptr_->execute(); } if (forceWrite || outputControl_.output()) { ptr_->write(); } if (!storeFilter_) { destroyFilter(); } } return true; }
bool Foam::OutputFilterFunctionObject<OutputFilter>::end() { Dbug << this->name() << " OutputFilterFunctionObject::end()" << endl; if (enabled_) { if (!storeFilter_) { allocateFilter(); } ptr_->end(); if (outputControl_.output()) { ptr_->write(); } if (!storeFilter_) { destroyFilter(); } } return true; }
bool Foam::OutputFilterFunctionObject<OutputFilter>::execute ( const bool forceWrite ) { Dbug << this->name() << " OutputFilterFunctionObject::execute() forceWrite: " << forceWrite << endl; if (active()) { if (!storeFilter_) { allocateFilter(); } if (evaluateControl_.output()) { ptr_->execute(); } if (forceWrite || outputControl_.output()) { ptr_->write(); } if (!storeFilter_) { destroyFilter(); } } return true; }
void FilterBuilder::emit_add() { QString txt; txt = edit->text(); if (txt.length() < 1) return; destroyFilter(); fltr = new CardFilter(txt, static_cast<CardFilter::Type>(comboCurrentIntData(typeCombo)), static_cast<CardFilter::Attr>(comboCurrentIntData(filterCombo))); emit add(fltr); edit->clear(); }
/* * Wrapper functions for filtering and for ksv f0 analysis * * all other analyses come with a 'computeXYZ' functions with identical * signatures but for various reasons these two do not. These function provide * wrappers. */ DOBJ * computeFilter(DOBJ * inpDOp, AOPTS * anaOpts, DOBJ * outDOp) { int FILE_IN, FILE_OUT, CREATED; DOBJ *filtDOp = NULL; if (inpDOp == NULL || anaOpts == NULL || outDOp != NULL) { setAsspMsg(AEB_BAD_ARGS, "computeFilter"); return (NULL); } FILE_IN = FILE_OUT = CREATED = FALSE; /* * check input object */ if (inpDOp->fp != NULL) { if (inpDOp->numRecords <= 0) { setAsspMsg(AEF_EMPTY, inpDOp->filePath); return (NULL); } FILE_IN = TRUE; } else if (anaOpts == NULL || (anaOpts != NULL && !(anaOpts->options & AOPT_INIT_ONLY))) { if (inpDOp->dataBuffer == NULL || inpDOp->bufNumRecs <= 0) { setAsspMsg(AED_NO_DATA, "(computeFilter)"); return (NULL); } } filtDOp = createFilter(inpDOp, anaOpts); if (filtDOp == NULL) { return (NULL); } if ((outDOp = filterSignal(inpDOp, filtDOp, outDOp)) == NULL) { return (NULL); } filtDOp = destroyFilter(filtDOp); return (outDOp); }
bool Foam::OutputFilterFunctionObject<OutputFilter>::end() { if (active()) { if (!storeFilter_) { allocateFilter(); } ptr_->end(); if (outputControl_.output()) { ptr_->write(); } if (!storeFilter_) { destroyFilter(); } } return true; }
FilterBuilder::~FilterBuilder() { destroyFilter(); }