Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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_; }
22  std::string ToString() const;
23  bool Exists() const { return line_ != 0; }
24 
25  private:
27  unsigned line_ = 0;
28  unsigned column_ = 0;
29  };
30  // ============================================================================
31  } // namespace Parsers
32 } // namespace Gaudi
33 // ============================================================================
34 #endif // JOBOPTIONSVC_POSITION_H_
unsigned column() const
Definition: Position.h:20
STL namespace.
void set_filename(std::string filename)
Definition: Position.h:21
STL class.
unsigned line() const
Definition: Position.h:19
Position(std::string filename, unsigned line, unsigned column)
Definition: Position.h:16
T move(T...args)
bool Exists() const
Definition: Position.h:23
std::string ToString() const
Definition: Position.cpp:13
std::string filename_
Definition: Position.h:26
const std::string & filename() const
Definition: Position.h:18
Helper functions to set/get the application return code.
Definition: __init__.py:1