Kea 2.7.6
|
Private implementation class for the MasterLoader
.
More...
Public Member Functions | |
MasterLoaderImpl (const char *master_file, const Name &zone_origin, const RRClass &zone_class, const MasterLoaderCallbacks &callbacks, const AddRRCallback &add_callback, MasterLoader::Options options) | |
Constructor. | |
size_t | getPosition () const |
Return the line number being parsed in the pushed input sources. | |
size_t | getSize () const |
Return the total size of the input sources pushed so far. | |
bool | loadIncremental (size_t count_limit) |
Implementation of MasterLoader::loadIncremental() | |
void | pushSource (const std::string &filename, const Name ¤t_origin) |
Wrapper around MasterLexer::pushSource() (file version) | |
void | pushStreamSource (std::istream &stream) |
Wrapper around MasterLexer::pushSource() (stream version) | |
Public Attributes | |
bool | complete_ |
size_t | rr_count_ |
bool | seen_error_ |
bool | warn_rfc1035_ttl_ |
Private implementation class for the MasterLoader
.
This class is used internally by the MasterLoader
and is not publicly visible. It is present to avoid polluting the public API with internal implementation details of the MasterLoader
.
Definition at line 60 of file master_loader.cc.
|
inline |
Constructor.
master_file | Path to the file to load. |
zone_origin | The origin of zone to be expected inside the master file. Currently unused, but it is expected to be used for some validation. |
zone_class | The class of zone to be expected inside the master file. |
callbacks | The callbacks by which it should report problems. Usually, the callback carries a filename and line number of the input where the problem happens. There's a special case of empty filename and zero line in case the opening of the top-level master file fails. |
add_callback | The callback which would be called with each loaded RR. |
options | Options for the parsing, which is bitwise-or of the Options values or DEFAULT. If the MANY_ERRORS option is included, the parser tries to continue past errors. If it is not included, it stops at first encountered error. |
std::bad_alloc | when there's not enough memory. |
Definition at line 82 of file master_loader.cc.
|
inline |
Return the line number being parsed in the pushed input sources.
See MasterLexer::getPosition()
.
Definition at line 157 of file master_loader.cc.
References isc::dns::MasterLexer::getPosition().
|
inline |
Return the total size of the input sources pushed so far.
See MasterLexer::getTotalSourceSize()
.
Definition at line 151 of file master_loader.cc.
References isc::dns::MasterLexer::getTotalSourceSize().
bool isc::dns::MasterLoader::MasterLoaderImpl::loadIncremental | ( | size_t | count_limit | ) |
Implementation of MasterLoader::loadIncremental()
See MasterLoader::loadIncremental()
for details.
Definition at line 614 of file master_loader.cc.
References isc::dns::rdata::createRdata(), isc::dns::MasterToken::END_OF_FILE, isc::dns::MasterToken::END_OF_LINE, isc::dns::MasterToken::getType(), isc_throw, isc_throw_assert, isc::dns::MasterToken::STRING, and isc::Exception::what().
|
inline |
Wrapper around MasterLexer::pushSource()
(file version)
This method is used as a wrapper around the lexer's pushSource()
to also save the current origin and the last seen name (to be restored upon popSource()
). It also calls pushSource()
. See doInclude()
implementation for more details.
filename | Path to the file to push as a new source. |
current_origin | The current origin name to save. |
Definition at line 116 of file master_loader.cc.
References isc_throw, and isc::dns::MasterLexer::pushSource().
|
inline |
Wrapper around MasterLexer::pushSource()
(stream version)
Similar to pushSource()
. This method need not save the current origin as it is not used with $INCLUDE processing.
stream | The input stream to use as a new source. |
Definition at line 139 of file master_loader.cc.
References isc::dns::MasterLexer::pushSource().
bool isc::dns::MasterLoader::MasterLoaderImpl::complete_ |
Definition at line 529 of file master_loader.cc.
size_t isc::dns::MasterLoader::MasterLoaderImpl::rr_count_ |
Definition at line 534 of file master_loader.cc.
bool isc::dns::MasterLoader::MasterLoaderImpl::seen_error_ |
Definition at line 530 of file master_loader.cc.
bool isc::dns::MasterLoader::MasterLoaderImpl::warn_rfc1035_ttl_ |
Definition at line 532 of file master_loader.cc.