BIND 10 #2497: introduce wrapper version of "from lexer" rdata factory
BIND 10 Development
do-not-reply at isc.org
Thu Nov 29 02:36:43 UTC 2012
#2497: introduce wrapper version of "from lexer" rdata factory
-------------------------------------+-------------------------------------
Reporter: | Owner: muks
jinmei | Status: reviewing
Type: task | Milestone:
Priority: | Sprint-20121204
medium | Resolution:
Component: | Sensitive: 0
libdns++ | Sub-Project: DNS
Keywords: | Estimated Difficulty: 0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
loadzone-ng |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:9 muks]:
> `OldRdataFactory` is not exported outside `rrparamregistry.cc`, so
it's not possible to call the `create()` method on any templated
classes in that file, except on mock objects derived from
`AbstractRdataFactory` such as `TestRdataFactory`.
Ah, okay, but can't you use
`RRParamRegistry::getRegistry().createRdata()`?
...hmm, the ticket description doesn't include that part. The intent was
to extend `RRParamRegistry::createRdata()`, too.
I also suggest defining a trivial wrapper version of
rdata::createRdata() in rdata.{h,cc}:
{{{#!cpp
RdataPtr
createRdata(const RRType& rrtype, const RRClass& rrclass,
MasterLexer& lexer, const Name* origin,
MasterLoader::Options options,
MasterLoaderCallbacks& callbacks)
{
return (RRParamRegistry::getRegistry().createRdata(rrtype, rrclass,
lexer, origin,
options,
callbacks));
}
}}}
(we need to do a lot more for the complete version of this function,
which is the subject of a different ticket).
Then when we complete this ticket we can start `MasterLoader` at least
for normal cases.
And I suggest moving the implementation of create() in .cc. That's a
matter of preference in some sense, but I don't like to define too
many non trivial things in .h unless it has clear advantage for that
(a typical reason is to make it inline for very trivial methods like a
simple setter/getter, which isn't the case here).
--
Ticket URL: <http://bind10.isc.org/ticket/2497#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list