| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 {
12 namespace Parsers
13 {
14 // ============================================================================
15 class Position final
16 {
17 public:
18 Position() = default;
19 Position( std::string filename, unsigned line, unsigned column )
20 : filename_( std::move( filename ) ), line_( line ), column_( column )
21 {
22 }
23 const std::string& filename() const { return filename_; }
24 unsigned line() const { return line_; }
25 unsigned column() const { return column_; }
26 void set_filename( std::string filename ) { filename_ = std::move( filename ); }
27 std::string ToString() const;
28 bool Exists() const { return line_ != 0; }
29
30 private:
31 std::string filename_;
32 unsigned line_ = 0;
33 unsigned column_ = 0;
34 };
35 // ============================================================================
36 } /* Gaudi */
37 } /* Parsers */
38 // ============================================================================
39 #endif // JOBOPTIONSVC_POSITION_H_
Gaudi::Parsers::Position::column_
unsigned column_
Definition: Position.h:33
Gaudi::Parsers::Position::column
unsigned column() const
Definition: Position.h:25
std
STL namespace.
Gaudi::Parsers::Position::set_filename
void set_filename(std::string filename)
Definition: Position.h:26
std::string
STL class.
Gaudi::Parsers::Position::line
unsigned line() const
Definition: Position.h:24
Gaudi::Parsers::Position::Position
Position(std::string filename, unsigned line, unsigned column)
Definition: Position.h:19
Gaudi::Parsers::Position
Definition: Position.h:15
Gaudi::Parsers::Position::line_
unsigned line_
Definition: Position.h:32
std::move
T move(T...args)
Gaudi::Parsers::Position::Position
Position()=default
Gaudi::Parsers::Position::Exists
bool Exists() const
Definition: Position.h:28
Gaudi::Parsers::Position::ToString
std::string ToString() const
Definition: Position.cpp:13
Gaudi::Parsers::Position::filename_
std::string filename_
Definition: Position.h:31
Gaudi::Parsers::Position::filename
const std::string & filename() const
Definition: Position.h:23
Gaudi
Helper functions to set/get the application return code.
Definition: __init__.py:1