forked from exclipy/clang_indexer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clic_parser.hpp
38 lines (28 loc) · 922 Bytes
/
clic_parser.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "types.hpp"
#include <boost/make_shared.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/spirit/include/support_istream_iterator.hpp>
#include <istream>
class IndexItemIterator : public boost::iterator_facade<
IndexItemIterator,
const ClicIndexItem,
boost::single_pass_traversal_tag,
const ClicIndexItem&,
std::ptrdiff_t
> {
public:
IndexItemIterator();
IndexItemIterator(std::istream& in);
private:
friend class boost::iterator_core_access;
const ClicIndexItem& dereference() const;
bool equal(const IndexItemIterator& other) const;
void increment();
boost::shared_ptr<ClicIndexItem> value;
std::ptrdiff_t i;
std::istream* in;
boost::spirit::istream_iterator inputBegin;
boost::spirit::istream_iterator inputEnd;
};
boost::iterator_range<IndexItemIterator> parseIndex(std::istream& in);