Skip to content

Commit

Permalink
Merge pull request #10 from fer-rum/quantor
Browse files Browse the repository at this point in the history
It's alive!
  • Loading branch information
Fredo Erxleben committed Mar 6, 2015
2 parents eecc5e7 + 676e42b commit 320d8e0
Show file tree
Hide file tree
Showing 5 changed files with 355 additions and 318 deletions.
2 changes: 0 additions & 2 deletions interfaces/Quantor.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class QuantorInterface :

QMap<QString, QIContext> m_contexts;

// the solver will return a zero-terminated array of int
Result (*m_solverMain)(QICircuit const &, std::vector<int> &) = nullptr;
QList<int> m_solution;

// helper functions
Expand Down
14 changes: 8 additions & 6 deletions interfaces/quantor/ParseException.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

namespace q2d {
namespace quantor {
class QIContext;
/**
* This class captures information about and the location of
* a parsing problem encountered by the Quantorizer and may
Expand All @@ -15,19 +14,22 @@ class QIContext;
*/
class ParseException {
std::string const m_msg;
QIContext const &m_ctx;
unsigned m_pos;

public:
ParseException(std::string msg, QIContext const &ctx)
: m_msg(msg), m_ctx(ctx) {}
ParseException(std::string msg, unsigned pos)
: m_msg(msg), m_pos(pos) {}
~ParseException() {}

public:
std::string const &message() const {
return m_msg;
}
QIContext const &context() const {
return m_ctx;
unsigned position() const {
return m_pos;
}
void position(unsigned pos) {
m_pos = pos;
}
};
}
Expand Down
Loading

0 comments on commit 320d8e0

Please sign in to comment.