Source-highlight Qt Library
ParagraphMap.h
1 /*
2  * Copyright (C) 2008-2010 Lorenzo Bettini, http://www.lorenzobettini.it
3  * License: See COPYING file that comes with this distribution
4  */
5 
6 #ifndef PARAGRAPHMAP_H_
7 #define PARAGRAPHMAP_H_
8 
9 #include <vector>
10 #include "HighlightStateData.h"
11 
12 #define STARTING_SIZE 100
13 
14 namespace srchiliteqt {
15 
20 class ParagraphMap {
21  typedef std::vector<HighlightStateData *> vectorType;
22  vectorType dataVector;
23 public:
24  ParagraphMap();
25  ~ParagraphMap();
26 
34  void insert(int pos, HighlightStateData *data);
35 
41  HighlightStateData *getData(int pos);
42 };
43 
44 
45 } // namespace srchiliteqt
46 
47 #endif /* PARAGRAPHMAP_H_ */
Definition: ColorDialog.cpp:12
Internal class for mapping paragraph numbers to HighlightStateData.
Definition: ParagraphMap.h:20
HighlightStateData * getData(int pos)
Returns a reference to the data stored at the given position.
Definition: ParagraphMap.cpp:44
void insert(int pos, HighlightStateData *data)
Inserts data in the given position; if it is the first time we use that position, space is allocated ...
Definition: ParagraphMap.cpp:31
Utility class to deal with current highlighting state (and stack of states)
Definition: HighlightStateData.h:16