| The Gaudi Framework v32r1 (f65d50dc)

Position.h
Go to the documentation of this file.
1 #ifndef JOBOPTIONSVC_POSITION_H_
2 #define JOBOPTIONSVC_POSITION_H_
3 // ============================================================================
4 // Includes:
5 // ============================================================================
6 // STD & STL:
7 // ============================================================================
8 #include <string>
9 // ============================================================================
10 namespace Gaudi {
11 namespace Parsers {
12 // ============================================================================
13 class Position final {
14 public:
15 Position() = default;
16 Position( std::string filename, unsigned line, unsigned column )
17 : filename_( std::move( filename ) ), line_( line ), column_( column ) {}
18 const std::string& filename() const { return filename_; }
19 unsigned line() const { return line_; }
20 unsigned column() const { return column_; }
21 void set_filename( std::string filename ) { filename_ = std::move( filename ); }
22 std::string ToString() const;
23 bool Exists() const { return line_ != 0; }
24
25 private:
26 std::string filename_;
27 unsigned line_ = 0;
28 unsigned column_ = 0;
29 };
30 // ============================================================================
31 } // namespace Parsers
32 } // namespace Gaudi
33 // ============================================================================
34 #endif // JOBOPTIONSVC_POSITION_H_
Gaudi::Parsers::Position::column_
unsigned column_
Definition: Position.h:28
std
STL namespace.
Gaudi::Parsers::Position::set_filename
void set_filename(std::string filename)
Definition: Position.h:21
Gaudi::Parsers::Position::filename
const std::string & filename() const
Definition: Position.h:18
Gaudi::Parsers::Position::column
unsigned column() const
Definition: Position.h:20
std::string
STL class.
Gaudi::Parsers::Position::Exists
bool Exists() const
Definition: Position.h:23
Gaudi::Parsers::Position::Position
Position(std::string filename, unsigned line, unsigned column)
Definition: Position.h:16
Gaudi::Parsers::Position
Definition: Position.h:13
Gaudi::Parsers::Position::line_
unsigned line_
Definition: Position.h:27
std::move
T move(T... args)
Gaudi::Parsers::Position::Position
Position()=default
Gaudi::Parsers::Position::ToString
std::string ToString() const
Definition: Position.cpp:13
Gaudi::Parsers::Position::line
unsigned line() const
Definition: Position.h:19
Gaudi::Parsers::Position::filename_
std::string filename_
Definition: Position.h:26
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1