GNU Octave
6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
filepos.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2019-2021 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if ! defined (octave_filepos_h)
27
#define octave_filepos_h 1
28
29
#include "octave-config.h"
30
31
namespace
octave
32
{
33
class
filepos
34
{
35
public
:
36
37
filepos
(
int
l = 1,
int
c = 1) :
m_line
(l),
m_column
(c) { }
38
39
filepos
(
const
filepos
&) =
default
;
40
41
filepos
&
operator =
(
const
filepos
&) =
default
;
42
43
~filepos
(
void
) =
default
;
44
45
void
set
(
int
l,
int
c)
46
{
47
m_line
= l;
48
m_column
= c;
49
}
50
51
void
line
(
int
l) {
m_line
= l; }
52
void
column
(
int
c) {
m_column
= c; }
53
54
int
line
(
void
)
const
{
return
m_line
; }
55
int
column
(
void
)
const
{
return
m_column
; }
56
57
void
increment_line
(
int
val = 1) {
m_line
+= val; }
58
void
increment_column
(
int
val = 1) {
m_column
+= val; }
59
60
void
decrement_line
(
int
val = 1) {
m_line
-= val; }
61
void
decrement_column
(
int
val = 1) {
m_column
-= val; }
62
63
void
next_line
(
void
)
64
{
65
m_line
++;
66
m_column
= 1;
67
}
68
69
private
:
70
71
int
m_line
;
72
int
m_column
;
73
};
74
}
75
76
#endif
octave::filepos
Definition:
filepos.h:34
octave::filepos::increment_column
void increment_column(int val=1)
Definition:
filepos.h:58
octave::filepos::decrement_column
void decrement_column(int val=1)
Definition:
filepos.h:61
octave::filepos::filepos
filepos(int l=1, int c=1)
Definition:
filepos.h:37
octave::filepos::line
void line(int l)
Definition:
filepos.h:51
octave::filepos::decrement_line
void decrement_line(int val=1)
Definition:
filepos.h:60
octave::filepos::next_line
void next_line(void)
Definition:
filepos.h:63
octave::filepos::column
void column(int c)
Definition:
filepos.h:52
octave::filepos::m_column
int m_column
Definition:
filepos.h:72
octave::filepos::column
int column(void) const
Definition:
filepos.h:55
octave::filepos::m_line
int m_line
Definition:
filepos.h:71
octave::filepos::operator=
filepos & operator=(const filepos &)=default
octave::filepos::filepos
filepos(const filepos &)=default
octave::filepos::~filepos
~filepos(void)=default
octave::filepos::set
void set(int l, int c)
Definition:
filepos.h:45
octave::filepos::line
int line(void) const
Definition:
filepos.h:54
octave::filepos::increment_line
void increment_line(int val=1)
Definition:
filepos.h:57
octave
Definition:
aepbalance.cc:41
libinterp
parse-tree
filepos.h
Generated on Tue Apr 13 2021 15:27:48 for GNU Octave by
1.9.1