source: icGREP/icgrep-devel/icgrep/cc/multiplex_CCs.h @ 5800

Last change on this file since 5800 was 5800, checked in by cameron, 15 months ago

isa and dyn_cast for Alphabets

File size: 1.0 KB
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 */
5#ifndef MULTIPLEX_CCS_H
6#define MULTIPLEX_CCS_H
7
8#include <vector>
9#include <cc/alphabet.h>
10
11namespace re { class CC; }
12
13namespace cc {
14
15class MultiplexedAlphabet : public Alphabet {
16public:
17    MultiplexedAlphabet(std::string alphabetName, const std::vector<const re::CC *> CCs);
18    static inline bool classof(const Alphabet * a) {
19        return a->getClassTypeId() == ClassTypeId::MultiplexedAlphabet;
20    }
21    static inline bool classof(const void *) {return false;}
22
23    const Alphabet * getSourceAlphabet() const;
24   
25    std::vector<std::vector<unsigned>> getExclusiveSetIDs();
26   
27    std::vector<re::CC *> getMultiplexedCCs();
28   
29    re::CC * transformCC(re::CC * sourceCC);
30private:
31    const Alphabet * mSourceAlphabet;
32    const std::vector<const re::CC *> mUnicodeSets;
33    std::vector<std::vector<unsigned>> mExclusiveSetIDs;
34    std::vector<re::CC *> mMultiplexedCCs;
35};
36}
37
38
39#endif
Note: See TracBrowser for help on using the repository browser.