Ignore:
Timestamp:
Sep 30, 2014, 2:44:40 PM (5 years ago)
Author:
nmedfort
Message:

Replaced dynamic_cast with llvm::dyn_cast in pablo code; implemented make functions for pablo constructors. Disabled RTTI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pe_charclass.h

    r4199 r4200  
    1313namespace pablo {
    1414
    15 class CharClass : public PabloE
    16 {
     15class CharClass : public PabloE {
     16    friend CharClass * make_charclass(const std::string cc);
    1717public:
    18     CharClass(std::string charClass)
     18    static inline bool classof(const PabloE * e) {
     19        return e->getClassTypeId() == ClassTypeId::CharClass;
     20    }
     21    static inline bool classof(const void *) {
     22        return false;
     23    }
     24    virtual ~CharClass(){
     25
     26    }
     27    inline const std::string & getCharClass() const {
     28        return mCharClass;
     29    }
     30protected:
     31    CharClass(const std::string charClass)
    1932    : PabloE(ClassTypeId::CharClass)
    2033    , mCharClass(charClass)
     
    2235
    2336    }
    24 
    25     virtual ~CharClass(){
    26 
    27     }
    28 
    29     inline const std::string & getCharClass() const {
    30         return mCharClass;
    31     }
    32 
    3337private:
    3438    const std::string mCharClass;
    3539};
     40
     41inline CharClass * make_charclass(const std::string cc) {
     42    return new CharClass(cc);
     43}
    3644
    3745}
Note: See TracChangeset for help on using the changeset viewer.