Last change
on this file since 2921 was
2841,
checked in by ldelgass, 13 years ago
|
Misc. cleanups. Make libs look in nanovis src dir for includes, so that libs
can use Trace.h. Trace.h now includes config.h, so the WANT_TRACE define can
be placed there. The Makefile now has the flag for enabling the pointset
code, since it also switches which objects are compiled.
|
-
Property svn:eol-style set to
native
|
File size:
543 bytes
|
Line | |
---|
1 | /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
---|
2 | #include <vrutil/vrStringParser.h> |
---|
3 | |
---|
4 | vrStringParser::vrStringParser(std::istream& stream) : |
---|
5 | _stream(stream) |
---|
6 | { |
---|
7 | } |
---|
8 | |
---|
9 | int vrStringParser::getToken() |
---|
10 | { |
---|
11 | int index = 0; |
---|
12 | char ch = 0; |
---|
13 | if (_stream.eof()) return 0; |
---|
14 | |
---|
15 | while (!_stream.eof() && isWhiteChar(ch = _stream.get())); |
---|
16 | if (ch == 0 || isWhiteChar(ch)) return 0; |
---|
17 | |
---|
18 | do { |
---|
19 | _buff[index++] = ch; |
---|
20 | } while (!_stream.eof() && !isWhiteChar(ch = _stream.get())); |
---|
21 | |
---|
22 | _buff[index] = 0; |
---|
23 | |
---|
24 | return index; |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.