Panda3D
Loading...
Searching...
No Matches
rangeIterator.h
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 rangeIterator.h
10 * @author drose
11 * @date 2003-09-07
12 */
13
14#ifndef RANGEITERATOR_H
15#define RANGEITERATOR_H
16
17#include "pandatoolbase.h"
18#include "rangeDescription.h"
19
20#include "pset.h"
21
22/**
23 * Walks through all the Unicode characters described by a RangeDescription
24 * class.
25 */
27public:
29
30 INLINE int get_code() const;
31 bool next();
32 INLINE bool eof() const;
33
34private:
35 const RangeDescription &_desc;
36 RangeDescription::RangeList::const_iterator _it;
37 int _code;
38
39 typedef pset<int> Codes;
40 Codes _codes_generated;
41};
42
43#include "rangeIterator.I"
44
45#endif
This describes a sparse range of Unicode character codes for conversion that may be specified on the ...
Walks through all the Unicode characters described by a RangeDescription class.
bool next()
Advances the iterator to the next code.
int get_code() const
Returns the current Unicode value represented by the iterator, or -1 if the iterator has reached the ...
RangeIterator(const RangeDescription &desc)
Constructs an iterator to walk through the codes on the descriptor.
bool eof() const
Returns true if all the code have been retrieved, false otherwise.
This is our own Panda specialization on the default STL set.
Definition pset.h:49
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.