LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
positionLengthList.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
6
/************************************************************************
7
* @file positionLengthList.cpp
8
* @author Mesnard Olivier
9
* @date
10
* @version
11
* copyright Copyright (C) 2003 by CEA LIST
12
*
13
***********************************************************************/
14
15
16
#include <ostream>
17
18
#include "
positionLengthList.h
"
19
20
using namespace
std
;
21
22
QTextStream&
operator <<
(QTextStream& os,
23
const
Lima::Common::Misc::PositionLengthList
& p)
24
{
25
if
(! p.empty())
26
{
27
Lima::Common::Misc::PositionLengthList::const_iterator pos=p.begin();
28
os <<
"("
<< (*pos).first <<
","
<< (*pos).second <<
")"
;
29
pos++;
30
while
(pos != p.end())
31
{
32
os <<
"; ("
<< (*pos).first <<
","
<< (*pos).second <<
")"
;
33
pos++;
34
}
35
}
36
return
os;
37
}
38
39
std::ostream&
operator <<
(std::ostream& os,
40
const
Lima::Common::Misc::PositionLengthList
& p)
41
{
42
if
(! p.empty())
43
{
44
Lima::Common::Misc::PositionLengthList::const_iterator pos=p.begin();
45
os <<
"("
<< (*pos).first <<
","
<< (*pos).second <<
")"
;
46
pos++;
47
while
(pos != p.end())
48
{
49
os <<
"; ("
<< (*pos).first <<
","
<< (*pos).second <<
")"
;
50
pos++;
51
}
52
}
53
return
os;
54
}
55
56
QDebug&
operator <<
(QDebug& os,
57
const
Lima::Common::Misc::PositionLengthList
& p)
58
{
59
if
(! p.empty())
60
{
61
Lima::Common::Misc::PositionLengthList::const_iterator pos=p.begin();
62
os <<
"("
<< (*pos).first <<
","
<< (*pos).second <<
")"
;
63
pos++;
64
while
(pos != p.end())
65
{
66
os <<
"; ("
<< (*pos).first <<
","
<< (*pos).second <<
")"
;
67
pos++;
68
}
69
}
70
return
os;
71
}
Lima::Common::Misc::PositionLengthList
std::vector< std::pair< Position, Length > > PositionLengthList
Definition
positionLengthList.h:31
std
STL namespace.
operator<<
QTextStream & operator<<(QTextStream &os, const Lima::Common::Misc::PositionLengthList &p)
Definition
positionLengthList.cpp:22
positionLengthList.h
lima_linguisticprocessing
src
linguisticProcessing
common
misc
positionLengthList.cpp
Generated by
1.9.8