3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * Provide a set of typedefs for commonly used things like sizes and
7 * indices wile trying to stay compatible with types used
8 * by the standard containers.
10 * \author André Pönitz
12 * Full author contact details are available in file CREDITS
18 // this probably could be improved by using <cstddef>...
23 /// a type for positions used in paragraphs
24 // needs to be signed for a while to hold the special value -1 that is
26 typedef std::vector<char>::difference_type pos_type;
29 // set this to '0' if you want to have really safe types
33 typedef std::vector<char>::size_type size_type;
35 /// a type used for numbering text classes
36 // used to be LyXTextClassList::size_type
37 typedef std::vector<char>::size_type textclass_type;
41 // These structs wrap simple things to make them distinguishible
43 // It's a shame that different typedefs are not "really" different
47 typedef std::vector<char>::size_type base_type;
49 size_type(base_type t) { data_ = t; }
51 operator base_type() const { return data_; }
57 struct textclass_type {
59 typedef std::vector<char>::size_type base_type;
61 textclass_type(base_type t) { data_ = t; }
63 operator base_type() const { return data_; }