]> git.lyx.org Git - lyx.git/blob - src/support/LSubstring.h
change call to shared_ptr::reset, move some using declarations around
[lyx.git] / src / support / LSubstring.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *          Copyright 1995 Matthias Ettrich
8  *          Copyright 1995-2001 The LyX Team.
9  *
10  * ====================================================== */
11
12 // This one is heavily based on the substring class in The C++
13 // Programming Language by Bjarne Stroustrup
14
15 #ifndef LSUBSTRING_H
16 #define LSUBSTRING_H
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22
23 #include "LString.h"
24 #include "LRegex.h"
25
26 ///
27 class LSubstring {
28 public:
29         ///
30         typedef string::size_type size_type;
31         ///
32         LSubstring(string & s, size_type i, size_type n);
33         ///
34         LSubstring(string & s, string const & s2);
35         ///
36         LSubstring(string & s, string::value_type const * p);
37         ///
38         LSubstring(string & s, LRegex const & r);
39         ///
40         LSubstring & operator=(string const &);
41         ///
42         LSubstring & operator=(LSubstring const &);
43         ///
44         LSubstring & operator=(string::value_type const *);
45         ///
46         LSubstring & operator=(string::value_type);
47         ///
48         operator string() const;
49 private:
50         ///
51         string * ps;
52         ///
53         size_type pos;
54         ///
55         size_type n;
56 };
57
58 #endif