The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
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
15namespace 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
bool Exists() const
Definition Position.h:27
void set_filename(std::string filename)
Definition Position.h:25
Position(std::string filename, unsigned line, unsigned column)
Definition Position.h:20
std::string ToString() const
Definition Position.cpp:14
std::string filename_
Definition Position.h:30
const std::string & filename() const
Definition Position.h:22
unsigned line() const
Definition Position.h:23
unsigned column() const
Definition Position.h:24
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1
STL namespace.