Ignore:
Timestamp:
Aug 28, 2017, 4:00:17 PM (20 months ago)
Author:
nmedfort
Message:

Bug fixes for multigrep mode. Optional PabloKernel? branch hit counter added. Minor optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/alphabet.h

    r5281 r5620  
    2626        mAlphabetName(alphabetName), mCharSet(UCD::UnicodeSet(0, maxChar)) {}
    2727       
    28     std::string getName() { return mAlphabetName;}
     28    const std::string & getName() const { return mAlphabetName;}
    2929   
    30     UCD::UnicodeSet getSet() { return mCharSet;}
     30    const UCD::UnicodeSet & getSet() const { return mCharSet;}
    3131   
    3232    //  The Unicode codepoint of the nth character (the character whose alphabet code is n).
    33     virtual UCD::codepoint_t toUnicode(unsigned n);
     33    virtual UCD::codepoint_t toUnicode(const unsigned n) const;
    3434   
    3535    //  The ordinal position of the character whose Unicode codepoint value is ucp.
    36     virtual unsigned fromUnicode(UCD::codepoint_t ucp);
     36    virtual unsigned fromUnicode(const UCD::codepoint_t ucp) const;
    3737
    3838protected:
     
    5959public:
    6060    ExtendedASCII(std::string alphabetName, const uint_t (& extendedTable)[128]);
    61     UCD::codepoint_t  toUnicode(unsigned n) override;
    62     unsigned fromUnicode(UCD::codepoint_t ucp) override;
     61    UCD::codepoint_t toUnicode(const unsigned n) const final;
     62    unsigned fromUnicode(const UCD::codepoint_t ucp) const final;
    6363private:
    6464    const uint_t (& mExtendedCharacterTable)[128];
Note: See TracChangeset for help on using the changeset viewer.