All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Position.h
Go to the documentation of this file.
1 // $Id:$
2 #ifndef JOBOPTIONSVC_POSITION_H_
3 #define JOBOPTIONSVC_POSITION_H_
4 // ============================================================================
5 // Includes:
6 // ============================================================================
7 // STD & STL:
8 // ============================================================================
9 #include <string>
10 // ============================================================================
11 namespace Gaudi { namespace Parsers {
12 // ============================================================================
13 class Position {
14  public:
15  Position():filename_(""), line_(0), column_(0) {}
16  Position(const std::string& filename, unsigned line, unsigned column)
17  :filename_(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(const std::string& filename) { filename_ = filename;}
22  std::string ToString() const;
23  bool Exists() const { return line_ !=0;}
24  private:
25  std::string filename_;
26  unsigned line_;
27  unsigned column_;
28 };
29 // ============================================================================
30 } /* Gaudi */ } /* Parsers */
31 // ============================================================================
32 #endif // JOBOPTIONSVC_POSITION_H_
unsigned column() const
Definition: Position.h:20
unsigned line() const
Definition: Position.h:19
bool Exists() const
Definition: Position.h:23
std::string ToString() const
Definition: Position.cpp:14
This is a number of static methods for bootstrapping the Gaudi framework.
Definition: Bootstrap.h:14
std::string filename_
Definition: Position.h:25
void set_filename(const std::string &filename)
Definition: Position.h:21
Position(const std::string &filename, unsigned line, unsigned column)
Definition: Position.h:16
const std::string & filename() const
Definition: Position.h:18