LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
constraintCheckList.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/************************************************************************
7 *
8 * @file constraintCheckList.h
9 * @author besancon (besanconr@zoe.cea.fr)
10 * @date Thu Sep 4 2003
11 * copyright Copyright (C) 2003 by CEA LIST
12 * Project Automaton
13 *
14 * @brief this class contains the structure that allow
15 * constraint checks
16 *
17 *
18 ***********************************************************************/
19
20#ifndef CONSTRAINTCHECKLIST_H
21#define CONSTRAINTCHECKLIST_H
22
23#include "AutomatonExport.h"
25#include <iostream>
26#include <string>
27#include <stack>
28
29namespace Lima {
30namespace LinguisticProcessing {
31namespace Automaton {
32
48
49
51{
52 public:
58
59 // comparison operators
60 bool operator == (const ConstraintCheckListElement&) const;
61 bool operator<(const ConstraintCheckListElement&) const;
62
63 friend std::ostream& operator << (std::ostream&, const ConstraintCheckListElement&);
64
65 LinguisticGraphVertex getValueStored() const;
66 LinguisticGraphVertex getValueStack() const;
67
68 void store(const LinguisticGraphVertex& v);
69 void push(const LinguisticGraphVertex& v);
70 void pop();
71 bool empty() const;
72
73 static const uint64_t novalue;
74
75 private:
76 LinguisticGraphVertex m_stored;
77 std::stack<LinguisticGraphVertex,std::vector<LinguisticGraphVertex> > m_stack;
78};
79//**********************************************************************
80// inline functions
81//**********************************************************************
86 return m_stack.top();
87}
89 return m_stack.pop();
90}
92 return m_stack.empty();
93}
94
96 m_stored=v;
97}
99 m_stack.push(v);
100}
101
102//**********************************************************************
103// ConstraintCheckList
104//**********************************************************************
105typedef std::vector<ConstraintCheckListElement> ConstraintCheckList;
106
107LIMA_AUTOMATON_EXPORT std::ostream& operator << (std::ostream&, const ConstraintCheckList&);
108
109} // end namespace
110} // end namespace
111} // end namespace
112
113#endif
#define LIMA_AUTOMATON_EXPORT
QDebug & operator<<(QDebug &qd, const std::string &str)
Definition QsLog.cpp:39
LinguisticGraph::vertex_descriptor LinguisticGraphVertex
An AnalysisData containing a LinguisticGraph with a language and an id.
std::ostream & operator<<(std::ostream &os, const DFFSPos &x)
std::vector< ConstraintCheckListElement > ConstraintCheckList
NAUTITIA.
static bool operator<(const QStringView &entityStr, const TextHtmlEntity &entity)