| The Gaudi Framework v27r1

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