3 * Copyright 2002 the LyX Team
4 * Read 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
16 // this probably could be improved by using <cstddef>...
21 /// a type for positions used in paragraphs
22 // needs to be signed for a while to hold the special value -1 that is
24 typedef std::vector<char>::difference_type pos_type;
27 // set this to '0' if you want to have really safe types
31 typedef std::vector<char>::size_type size_type;
33 /// a type used for numbering text classes
34 // used to be LyXTextClassList::size_type
35 typedef std::vector<char>::size_type textclass_type;
39 // These structs wrap simple things to make them distinguishible
41 // It's a shame that different typedefs are not "really" different
45 typedef std::vector<char>::size_type base_type;
47 size_type(base_type t) { data_ = t; }
49 operator base_type() const { return data_; }
55 struct textclass_type {
57 typedef std::vector<char>::size_type base_type;
59 textclass_type(base_type t) { data_ = t; }
61 operator base_type() const { return data_; }