cfgfile 0.2.11
Loading...
Searching...
No Matches
parser_info.hpp
Go to the documentation of this file.
1
31#ifndef CFGFILE__PARSER_INFO_HPP__INCLUDED
32#define CFGFILE__PARSER_INFO_HPP__INCLUDED
33
34// cfgfile include.
35#include "types.hpp"
36
37
38namespace cfgfile {
39
40//
41// parser_info_t
42//
43
45template< typename Trait = string_trait_t >
47public:
48 parser_info_t( const typename Trait::string_t & file_name,
49 typename Trait::pos_t line_number,
50 typename Trait::pos_t column_number )
51 : m_file_name( file_name )
52 , m_line_number( line_number )
53 , m_column_number( column_number )
54 {
55 }
56
58 const typename Trait::string_t & file_name() const
59 {
60 return m_file_name;
61 }
62
64 typename Trait::pos_t line_number() const
65 {
66 return m_line_number;
67 }
68
70 typename Trait::pos_t column_number() const
71 {
72 return m_column_number;
73 }
74
75private:
77 typename Trait::string_t m_file_name;
79 typename Trait::pos_t m_line_number;
81 typename Trait::pos_t m_column_number;
82}; // class parser_info_t
83
84} /* namespace cfgfile */
85
86#endif // CFGFILE__PARSER_INFO_HPP__INCLUDED
Information about parsed file and current state of parsing.
Definition parser_info.hpp:46
const Trait::string_t & file_name() const
Definition parser_info.hpp:58
Trait::pos_t column_number() const
Definition parser_info.hpp:70
Trait::pos_t line_number() const
Definition parser_info.hpp:64
parser_info_t(const typename Trait::string_t &file_name, typename Trait::pos_t line_number, typename Trait::pos_t column_number)
Definition parser_info.hpp:48
Definition const.hpp:38