Panda3D
Loading...
Searching...
No Matches
rangeDescription.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file rangeDescription.I
10 * @author drose
11 * @date 2003-09-07
12 */
13
14/**
15 *
16 */
17INLINE void RangeDescription::
18add_singleton(int code) {
19 _range_list.push_back(Range(code));
20}
21
22/**
23 *
24 */
25INLINE void RangeDescription::
26add_range(int from_code, int to_code) {
27 _range_list.push_back(Range(from_code, to_code));
28}
29
30/**
31 * Returns true if there are no codes described in the range.
32 */
34is_empty() const {
35 return _range_list.empty();
36}
37
38/**
39 *
40 */
41INLINE RangeDescription::Range::
42Range(int code) :
43 _from_code(code),
44 _to_code(code)
45{
46}
47
48/**
49 *
50 */
51INLINE RangeDescription::Range::
52Range(int from_code, int to_code) :
53 _from_code(from_code),
54 _to_code(to_code)
55{
56}
57
58INLINE std::ostream &operator << (std::ostream &out, const RangeDescription &range) {
59 range.output(out);
60 return out;
61}
This describes a sparse range of Unicode character codes for conversion that may be specified on the ...
bool is_empty() const
Returns true if there are no codes described in the range.