![]() |
Kea 2.2.0
|
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. More... | |
| size_t | getPosition () const |
| Return the line number being parsed in the pushed input sources. More... | |
| size_t | getSize () const |
| Return the total size of the input sources pushed so far. More... | |
| bool | loadIncremental (size_t count_limit) |
Implementation of MasterLoader::loadIncremental() More... | |
| void | pushSource (const std::string &filename, const Name ¤t_origin) |
Wrapper around MasterLexer::pushSource() (file version) More... | |
| void | pushStreamSource (std::istream &stream) |
Wrapper around MasterLexer::pushSource() (stream version) More... | |
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 59 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 81 of file master_loader.cc.
|
inline |
Return the line number being parsed in the pushed input sources.
See MasterLexer::getPosition().
Definition at line 154 of file master_loader.cc.
References isc::dns::MasterLexer::getPosition().
Referenced by isc::dns::MasterLoader::getPosition().
Here is the call graph for this function:
|
inline |
Return the total size of the input sources pushed so far.
See MasterLexer::getTotalSourceSize().
Definition at line 150 of file master_loader.cc.
References isc::dns::MasterLexer::getTotalSourceSize().
Referenced by isc::dns::MasterLoader::getSize().
Here is the call graph for this function:| bool isc::dns::MasterLoader::MasterLoaderImpl::loadIncremental | ( | size_t | count_limit | ) |
Implementation of MasterLoader::loadIncremental()
See MasterLoader::loadIncremental() for details.
Definition at line 940 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::dns::MasterToken::STRING, and isc::Exception::what().
Referenced by isc::dns::MasterLoader::loadIncremental().
Here is the call graph for this function:
|
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 115 of file master_loader.cc.
References isc::db::error, isc_throw, and isc::dns::MasterLexer::pushSource().
Here is the call graph for this function:
|
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 138 of file master_loader.cc.
References isc::dns::MasterLexer::pushSource().
Here is the call graph for this function:| bool isc::dns::MasterLoader::MasterLoaderImpl::complete_ |
Definition at line 542 of file master_loader.cc.
Referenced by isc::dns::MasterLoader::loadedSuccessfully(), and isc::dns::MasterLoader::loadIncremental().
| size_t isc::dns::MasterLoader::MasterLoaderImpl::rr_count_ |
Definition at line 547 of file master_loader.cc.
| bool isc::dns::MasterLoader::MasterLoaderImpl::seen_error_ |
Definition at line 543 of file master_loader.cc.
Referenced by isc::dns::MasterLoader::loadedSuccessfully().
| bool isc::dns::MasterLoader::MasterLoaderImpl::warn_rfc1035_ttl_ |
Definition at line 545 of file master_loader.cc.