The Gaudi Framework
master (37c0b60a)
Position.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#ifndef JOBOPTIONSVC_POSITION_H_
12
#define JOBOPTIONSVC_POSITION_H_
13
// ============================================================================
14
// Includes:
15
// ============================================================================
16
// STD & STL:
17
// ============================================================================
18
#include <string>
19
// ============================================================================
20
namespace
Gaudi
{
21
namespace
Parsers {
22
// ============================================================================
23
class
Position
final {
24
public
:
25
Position
() =
default
;
26
Position
(
std::string
filename
,
unsigned
line
,
unsigned
column
)
27
:
filename_
(
std
::move(
filename
) ),
line_
(
line
),
column_
(
column
) {}
28
const
std::string
&
filename
()
const
{
return
filename_
; }
29
unsigned
line
()
const
{
return
line_
; }
30
unsigned
column
()
const
{
return
column_
; }
31
void
set_filename
(
std::string
filename
) {
filename_
=
std::move
(
filename
); }
32
std::string
ToString
()
const
;
33
bool
Exists
()
const
{
return
line_
!= 0; }
34
35
private
:
36
std::string
filename_
;
37
unsigned
line_
= 0;
38
unsigned
column_
= 0;
39
};
40
// ============================================================================
41
}
// namespace Parsers
42
}
// namespace Gaudi
43
// ============================================================================
44
#endif // JOBOPTIONSVC_POSITION_H_
std::string
STL class.
std::move
T move(T... args)
Gaudi::Parsers::Position::filename
const std::string & filename() const
Definition:
Position.h:28
Gaudi::Parsers::Position::Exists
bool Exists() const
Definition:
Position.h:33
Gaudi::Parsers::Position::set_filename
void set_filename(std::string filename)
Definition:
Position.h:31
Gaudi::Parsers::Position::column
unsigned column() const
Definition:
Position.h:30
Gaudi::Parsers::Position::line
unsigned line() const
Definition:
Position.h:29
Gaudi::Parsers::Position::column_
unsigned column_
Definition:
Position.h:38
Gaudi::Parsers::Position
Definition:
Position.h:23
Gaudi::Parsers::Position::ToString
std::string ToString() const
Definition:
Position.cpp:14
Gaudi::Parsers::Position::Position
Position(std::string filename, unsigned line, unsigned column)
Definition:
Position.h:26
Gaudi::Parsers::Position::line_
unsigned line_
Definition:
Position.h:37
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition:
__init__.py:1
std
STL namespace.
Gaudi::Parsers::Position::filename_
std::string filename_
Definition:
Position.h:36
Gaudi::Parsers::Position::Position
Position()=default
GaudiCoreSvc
src
JobOptionsSvc
Position.h
Generated on Thu Dec 19 2024 15:34:58 for The Gaudi Framework by
1.8.18