Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Position.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 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 #pragma once
12 
13 #include <string>
14 
15 namespace Gaudi {
16  namespace Parsers {
17  class Position final {
18  public:
19  Position() = default;
20  Position( std::string filename, unsigned line, unsigned column )
21  : filename_( std::move( filename ) ), line_( line ), column_( column ) {}
22  const std::string& filename() const { return filename_; }
23  unsigned line() const { return line_; }
24  unsigned column() const { return column_; }
25  void set_filename( std::string filename ) { filename_ = std::move( filename ); }
26  std::string ToString() const;
27  bool Exists() const { return line_ != 0; }
28 
29  private:
30  std::string filename_;
31  unsigned line_ = 0;
32  unsigned column_ = 0;
33  };
34  } // namespace Parsers
35 } // namespace Gaudi
GaudiPartProp.decorators.std
std
Definition: decorators.py:32
Gaudi::Parsers::Position::filename
const std::string & filename() const
Definition: Position.h:22
Gaudi::Parsers::Position::Exists
bool Exists() const
Definition: Position.h:27
Gaudi::Parsers::Position::set_filename
void set_filename(std::string filename)
Definition: Position.h:25
Gaudi::Parsers::Position::column
unsigned column() const
Definition: Position.h:24
Gaudi::Parsers::Position::line
unsigned line() const
Definition: Position.h:23
Gaudi::Parsers::Position::column_
unsigned column_
Definition: Position.h:32
Gaudi::Parsers::Position
Definition: Position.h:17
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:20
Gaudi::Parsers::Position::line_
unsigned line_
Definition: Position.h:31
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Gaudi::Parsers::Position::filename_
std::string filename_
Definition: Position.h:30
Gaudi::Parsers::Position::Position
Position()=default