source: icGREP/icgrep-devel/icgrep/re/re_end.h

Last change on this file was 4516, checked in by nmedfort, 3 years ago

More memory leak fixes. All known leaks accounted for.

File size: 646 bytes
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef END_H
8#define END_H
9
10#include "re_re.h"
11
12namespace re {
13
14class End : public RE {
15public:
16    static inline bool classof(const RE * re) {
17        return re->getClassTypeId() == ClassTypeId::End;
18    }
19    static inline bool classof(const void *) {
20        return false;
21    }
22    virtual ~End() {}
23protected:
24    friend End * makeEnd();
25    End() : RE(ClassTypeId::End) {}
26};
27
28inline End * makeEnd() {
29    return new End();
30}
31
32}
33
34#endif // END_H
Note: See TracBrowser for help on using the repository browser.