source: icGREP/icgrep-devel/icgrep/re/to_utf8.h @ 6170

Last change on this file since 6170 was 6170, checked in by cameron, 9 months ago

RE Transformation names and printing

File size: 733 bytes
Line 
1/*
2 *  Copyright (c) 2018 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 TO_UTF8_H
8#define TO_UTF8_H
9
10#include <re/re_re.h>
11#include <re/re_toolchain.h>
12
13namespace re {
14class CC;
15
16class UTF8_Transformer : public RE_Transformer {
17public:
18    UTF8_Transformer(NameTransformationMode m = NameTransformationMode::None) : RE_Transformer("ToUTF8", m) {}
19    RE * transformCC(CC * cc) override;
20};
21
22inline RE * toUTF8(RE * r, bool convertName = false) {
23    return UTF8_Transformer(convertName ? NameTransformationMode::TransformDefinition : NameTransformationMode::None ).transformRE(r);}
24}
25#endif // TO_UTF8_H
Note: See TracBrowser for help on using the repository browser.