Forked from
Eclipse Projects / aidge / aidge_core
2541 commits behind the upstream repository.
-
Cyril Moineau authoredCyril Moineau authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
StmFactory.hpp 1.34 KiB
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#ifndef __AIDGE_STMFACTORY_H__
#define __AIDGE_STMFACTORY_H__
#include <map>
#include <utility>
#include <set>
#include <string>
#include <vector>
#include <iostream>
#include <stdexcept> // for exception, runtime_error, out_of_range
#include <regex>
#include "graphmatching/NodeRegex.hpp"
#include "graphmatching/SeqStm.hpp"
#include "graphmatching/Utile.hpp"
namespace Aidge{
class StmFactory {
const std::map<std::string,NodeRegex*>& mNodesRegex;
std::size_t mCmptStm = 0;
public:
StmFactory(const std::map<std::string,NodeRegex*>& nodesRegex);
//StmFactory(){};
SeqStm* makeNewStm(const std::string& sequRegex);
SeqStm* duplicateStm(SeqStm* stm);
std::size_t getNumberOfStm(){
return mCmptStm;
}
private:
ParsingReturn initParsingSequRegex(const std::string& sequRegex);
std::vector<std::vector<int>> initTransitionMatrix(ParsingReturn& parsing);
};
}
#endif //__AIDGE_STMFACTORY_H__