BIND 10 #2369: InputSource helper class for MasterLexer
BIND 10 Development
do-not-reply at isc.org
Thu Nov 1 05:19:11 UTC 2012
#2369: InputSource helper class for MasterLexer
-------------------------------------+-------------------------------------
Reporter: | Owner: muks
jinmei | Status: reviewing
Type: task | Milestone:
Priority: | Sprint-20121106
medium | Resolution:
Component: | Sensitive: 0
libdns++ | Sub-Project: DNS
Keywords: | Estimated Difficulty: 4
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
loadzone-ng |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by muks):
Hi Jinmei
Replying to [comment:8 jinmei]:
> A couple of additional comments:
>
> - As you may have noticed I ended up using (shared) pointers of
> `InputSource` to hold them in a vector in `MasterLexer`.
> So, if name_ can be initialized in the member initialization list,
> it can (and should) be const.
`name_` is now const.
> - I suggest renaming "inputsource.{h,cc}" something more specific.
> Just saying "input source" sounds too generic.
Renamed to `master_lexer_inputsource.{cc,h}`.
Replying to [comment:9 jinmei]:
> Another suggestion:
> {{{#!cpp
> /// \brief Returns a single character from the input source. If end
> /// of file is reached, -1 is returned.
> int getChar();
> }}}
>
> -1 is probably better than the "EOF" macro, but I'd also like to avoid
> using a magic number. I suggest defining some static class constant
> to indicate this condition.
`END_OF_STREAM` has been added. However, I've not changed the `atEOF()` to
`atEnd()` as I suppose EOF makes more sense to us.
--
Ticket URL: <http://bind10.isc.org/ticket/2369#comment:11>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list