LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
forme.cpp
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
20#include "forme.h"
21
22namespace Lima {
23namespace LinguisticProcessing {
24namespace AnalysisDumpers {
25namespace EasyXmlDumper {
26
28 id(0),
29 poslong(),
30 forme(),
31 inflForme(),
32 macro(),
33 micro(),
34 m_outRelations(),
35 m_inRelations()
36{
37}
38
40 id(f->id),
41 poslong(f->poslong),
42 forme(f->forme),
43 inflForme(f->inflForme),
44 macro(f->macro),
45 micro(f->micro),
46 m_outRelations(f->m_outRelations),
47 m_inRelations(f->m_inRelations)
48{
49}
50
51bool Forme::hasInRelation(const std::string& type) const
52{
53 std::vector<Relation*>::const_iterator it, it_end;
54 it = m_inRelations.begin();
55 it_end = m_inRelations.end();
56 for (; it != it_end; it++)
57 {
58 if ( (*it)->type == type )
59 return true;
60 }
61 return false;
62}
63
64bool Forme::hasOutRelation(const std::string& type) const
65{
66 std::vector< Relation* >::const_iterator it, it_end;
67 it = m_outRelations.begin();
68 it_end = m_outRelations.end();
69 for (; it != it_end; it++)
70 {
71 if ( (*it)->type == type )
72 return true;
73 }
74 return false;
75}
76
77} // end namespace EasyXmlDumper
78} // end namespace AnalysisDumpers
79} // end namespace LinguisticProcessings
80} // end namespace Lima
represents an Easy form
NAUTITIA.