]> git.lyx.org Git - lyx.git/blob - src/support/StrPool.h
noncopyable + read ChangeLog
[lyx.git] / src / support / StrPool.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 2000 Jean-Marc Lasgouttes
8  *
9  * ======================================================*/
10
11
12 #ifndef STRPOOL_H
13 #define STRPOOL_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "LString.h"
20 #include <vector>
21
22 class StrPool {
23 public:
24         // delete all the strings that have been allocated by add()
25         ~StrPool();
26         // Make a copy of the string, and remember it in the pool
27         char const * add(string const & str);
28         
29 private:
30         typedef std::vector<char const *> Pool;
31         Pool pool_;
32 };
33
34 #endif