LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
transition.h
Go to the documentation of this file.
1// Copyright 2002-2018 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/************************************************************************
7 *
8 * @file transition.h
9 * @author besancon (besanconr@zoe.cea.fr)
10 * @date Fri Oct 04 2002
11 * copyright Copyright (C) 2002 by CEA LIST
12 * Project Automaton
13 *
14 * @brief transition composed of a transition Unit and the next state
15 * in the automaton
16 *
17 ***********************************************************************/
18
19#ifndef TRANSITION_H
20#define TRANSITION_H
21
22#include "AutomatonExport.h"
23#include <string>
24#include "automatonCommon.h"
25#include "transitionUnit.h"
26
27namespace Lima {
28namespace LinguisticProcessing {
29namespace Automaton {
30
32{
33 public:
34 Transition();
36 Transition(const Transition& transition);
37 virtual ~Transition();
38 Transition& operator = (const Transition& transition);
39
40 TransitionUnit* transitionUnit() const;
41 void setTransitionUnit(TransitionUnit*);
42 Tstate nextState() const;
43 void setNextState(Tstate);
44
45 friend LIMA_AUTOMATON_EXPORT std::ostream& operator << (std::ostream& os, const Transition& t);
46 friend LIMA_AUTOMATON_EXPORT QDebug& operator << (QDebug& os, const Transition& t);
47
48 private:
49 TransitionUnit* m_unit;
50 Tstate m_nextState;
51
52 /***********************************************************************/
53 // helper functions for constructors and destructors
54 void freeMem();
55 void copy(const Transition& t);
56
57};
58
59/***********************************************************************/
60// inline access functions
61/***********************************************************************/
62inline TransitionUnit* Transition::transitionUnit() const { return m_unit; }
63inline void Transition::setTransitionUnit(TransitionUnit *t) { m_unit = t; }
64
65inline Tstate Transition::nextState() const { return m_nextState; }
66inline void Transition::setNextState(Tstate state) { m_nextState = state; }
67
68} // namespace end
69} // namespace end
70} // namespace end
71
72#endif
#define LIMA_AUTOMATON_EXPORT
QDebug & operator<<(QDebug &qd, const std::string &str)
Definition QsLog.cpp:39
NAUTITIA.