Ignore:
Timestamp:
Apr 28, 2018, 3:54:43 PM (16 months ago)
Author:
nmedfort
Message:

Added temporary buffer functionality to the pipeline for single stream source buffers. Fixed memory leak from UCD::UnicodeBreakRE()

Location:
icGREP/icgrep-devel/icgrep/grep
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/grep/grep_engine.cpp

    r5992 r5998  
    4040#include <re/re_multiplex.h>
    4141#include <re/grapheme_clusters.h>
     42#include <re/re_utility.h>
    4243#include <re/printer_re.h>
    4344#include <toolchain/toolchain.h>
     
    159160    mEngineThread(pthread_self()) {}
    160161
    161 GrepEngine::~GrepEngine() {
    162     //delete mGrepDriver;
    163 }
    164 
    165162QuietModeEngine::QuietModeEngine() : GrepEngine() {
    166163    mEngineKind = EngineKind::QuietMode;
     
    214211    if (mGrepRecordBreak == GrepRecordBreakKind::Unicode) {
    215212        re::Name * anchorName = re::makeName("UTF8_LB", re::Name::Type::Unicode);
    216         anchorName->setDefinition(UCD::UnicodeBreakRE());
     213        anchorName->setDefinition(re::makeUnicodeBreak());
    217214        anchorRE = anchorName;
    218215    }
     
    778775    mGrepDriver(make_unique<ParabixDriver>("InternalEngine")) {}
    779776   
    780 InternalSearchEngine::~InternalSearchEngine() {
    781 }
    782 
    783777void InternalSearchEngine::grepCodeGen(re::RE * matchingRE, re::RE * excludedRE, MatchAccumulator * accum) {
    784778    auto & idb = mGrepDriver->getBuilder();
     
    894888}
    895889
    896 }
     890GrepEngine::~GrepEngine() { }
     891
     892InternalSearchEngine::~InternalSearchEngine() { }
     893
     894}
  • icGREP/icgrep-devel/icgrep/grep/grep_engine.h

    r5994 r5998  
    5555public:
    5656
     57    enum class EngineKind {QuietMode, MatchOnly, CountOnly, EmitMatches};
     58
    5759    GrepEngine();
    58     virtual ~GrepEngine();
     60
     61    virtual ~GrepEngine() = 0;
    5962   
    6063    void setPreferMMap() {mPreferMMap = true;}
     
    8689    int32_t openFile(const std::string & fileName, std::ostringstream & msgstrm);
    8790
    88     enum class EngineKind {QuietMode, MatchOnly, CountOnly, EmitMatches};
     91    std::string linePrefix(std::string fileName);
     92
     93protected:
     94
    8995    EngineKind mEngineKind;
    90    
    91     std::string linePrefix(std::string fileName);
    92 
    9396    bool mSuppressFileMessages;
    9497    argv::BinaryFilesMode mBinaryFilesMode;
Note: See TracChangeset for help on using the changeset viewer.