4 // provide a set of typedefs for commonly used things like sizes and
5 // indices while trying to stay compatible with types used by the standard
9 // this probably could be improved by using <cstddef>...
14 /// a type for positions used in paragraphs
15 // needs to be signed for a while to hold the special value -1 that is
17 typedef std::vector<char>::difference_type pos_type;
20 // set this to '0' if you want to have really safe types
24 typedef std::vector<char>::size_type size_type;
26 /// a type used for numbering layouts within a text class
27 // used to be LyXTextClass::size_type
28 typedef std::vector<char>::size_type layout_type;
30 /// a type used for numbering text classes
31 // used to be LyXTextClassList::size_type
32 typedef std::vector<char>::size_type textclass_type;
36 // These structs wrap simple things to make them distinguishible
38 // It's a shame that different typedefs are not "really" different
42 typedef std::vector<char>::size_type base_type;
44 size_type(base_type t) { data_ = t; }
46 operator base_type() const { return data_; }
55 typedef std::vector<char>::size_type base_type;
57 layout_type(base_type t) { data_ = t; }
59 operator base_type() const { return data_; }
61 void operator++() { ++data_; }
68 struct textclass_type {
70 typedef std::vector<char>::size_type base_type;
72 textclass_type(base_type t) { data_ = t; }
74 operator base_type() const { return data_; }