Commit 7759a99d authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[master] Merge branch 'master' of ssh://git.bind10.isc.org/var/bind10/git/bind10

parents f8bbd7fa e33d1484
......@@ -20,7 +20,7 @@ CLEANFILES = *.gcno *.gcda auth.spec spec_config.h
CLEANFILES += auth_messages.h auth_messages.cc
CLEANFILES += gen-statisticsitems.py
# auto-generated by gen-statisticsitems.py
CLEANFILES += statistics.cc statistics_items.h b10-auth.xml tests/statistics_unittest.cc
CLEANFILES += statistics.cc statistics_items.h b10-auth.xml tests/statistics_unittest.cc s-genstats s-messages
man_MANS = b10-auth.8
DISTCLEANFILES = $(man_MANS)
......@@ -45,18 +45,24 @@ statistics_items.h: statistics_items.h.pre statistics_msg_items.def
statistics.cc: statistics.cc.pre statistics_msg_items.def
tests/statistics_unittest.cc: tests/statistics_unittest.cc.pre statistics_msg_items.def
gen-statisticsitems.py: gen-statisticsitems.py.pre
gen-statisticsitems.py: gen-statisticsitems.py.pre Makefile
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" gen-statisticsitems.py.pre >$@
chmod +x $@
auth.spec b10-auth.xml statistics_items.h statistics.cc tests/statistics_unittest.cc: Makefile gen-statisticsitems.py
auth.spec b10-auth.xml statistics_items.h statistics.cc tests/statistics_unittest.cc: s-genstats
s-genstats: gen-statisticsitems.py
./gen-statisticsitems.py
touch $@
spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
auth_messages.h auth_messages.cc: auth_messages.mes
auth_messages.h auth_messages.cc: s-messages
s-messages: auth_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/auth/auth_messages.mes
touch $@
BUILT_SOURCES = spec_config.h auth_messages.h auth_messages.cc
# auto-generated by gen-statisticsitems.py
......
......@@ -16,7 +16,7 @@ endif
pkglibexecdir = $(libexecdir)/@PACKAGE@
CLEANFILES = *.gcno *.gcda spec_config.h d2_messages.h d2_messages.cc
CLEANFILES = *.gcno *.gcda spec_config.h d2_messages.h d2_messages.cc s-messages
man_MANS = b10-dhcp-ddns.8
DISTCLEANFILES = $(man_MANS)
......@@ -39,8 +39,11 @@ endif
spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
d2_messages.h d2_messages.cc: d2_messages.mes
d2_messages.h d2_messages.cc: s-messages
s-messages: d2_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/d2/d2_messages.mes
touch $@
BUILT_SOURCES = spec_config.h d2_messages.h d2_messages.cc
......
......@@ -16,7 +16,7 @@ endif
pkglibexecdir = $(libexecdir)/@PACKAGE@
CLEANFILES = *.gcno *.gcda spec_config.h dhcp4_messages.h dhcp4_messages.cc
CLEANFILES = *.gcno *.gcda spec_config.h dhcp4_messages.h dhcp4_messages.cc s-messages
man_MANS = b10-dhcp4.8
DISTCLEANFILES = $(man_MANS)
......@@ -39,8 +39,11 @@ endif
spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
dhcp4_messages.h dhcp4_messages.cc: dhcp4_messages.mes
dhcp4_messages.h dhcp4_messages.cc: s-messages
s-messages: dhcp4_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes
touch $@
BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc
......
......@@ -17,7 +17,7 @@ endif
pkglibexecdir = $(libexecdir)/@PACKAGE@
CLEANFILES = spec_config.h dhcp6_messages.h dhcp6_messages.cc
CLEANFILES = spec_config.h dhcp6_messages.h dhcp6_messages.cc s-messages
man_MANS = b10-dhcp6.8
DISTCLEANFILES = $(man_MANS)
......@@ -41,8 +41,11 @@ endif
spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
dhcp6_messages.h dhcp6_messages.cc: dhcp6_messages.mes
dhcp6_messages.h dhcp6_messages.cc: s-messages
s-messages: dhcp6_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes
touch $@
BUILT_SOURCES = spec_config.h dhcp6_messages.h dhcp6_messages.cc
......
......@@ -20,7 +20,7 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
CLEANFILES = *.gcno *.gcda
CLEANFILES += resolver.spec spec_config.h
CLEANFILES += resolver_messages.cc resolver_messages.h
CLEANFILES += resolver_messages.cc resolver_messages.h s-messages
man_MANS = b10-resolver.8
DISTCLEANFILES = $(man_MANS)
......@@ -46,9 +46,11 @@ spec_config.h: spec_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" spec_config.h.pre >$@
# Define rule to build logging source files from message file
resolver_messages.h resolver_messages.cc: resolver_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/resolver/resolver_messages.mes
resolver_messages.h resolver_messages.cc: s-messages
s-messages: resolver_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/bin/resolver/resolver_messages.mes
touch $@
BUILT_SOURCES = spec_config.h resolver_messages.cc resolver_messages.h
......
......@@ -8,11 +8,14 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/lib/util -I$(top_builddir)/src/lib/util
AM_CXXFLAGS = $(B10_CXXFLAGS)
CLEANFILES = *.gcno *.gcda asiodns_messages.h asiodns_messages.cc
CLEANFILES = *.gcno *.gcda asiodns_messages.h asiodns_messages.cc s-messages
# Define rule to build logging source files from message file
asiodns_messages.h asiodns_messages.cc: asiodns_messages.mes
asiodns_messages.h asiodns_messages.cc: s-messages
s-messages: asiodns_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/asiodns/asiodns_messages.mes
touch $@
BUILT_SOURCES = asiodns_messages.h asiodns_messages.cc
......
......@@ -36,9 +36,12 @@ nodist_libb10_cache_la_SOURCES = cache_messages.cc cache_messages.h
BUILT_SOURCES = cache_messages.cc cache_messages.h
cache_messages.cc cache_messages.h: cache_messages.mes
cache_messages.cc cache_messages.h: s-messages
s-messages: cache_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/cache/cache_messages.mes
touch $@
CLEANFILES = *.gcno *.gcda cache_messages.cc cache_messages.h
CLEANFILES = *.gcno *.gcda cache_messages.cc cache_messages.h s-messages
EXTRA_DIST = cache_messages.mes
......@@ -29,13 +29,16 @@ nodist_libb10_cc_la_SOURCES += proto_defs.h
libb10_cc_la_LIBADD = $(top_builddir)/src/lib/log/libb10-log.la
CLEANFILES = *.gcno *.gcda session_config.h cc_messages.cc cc_messages.h \
proto_defs.h
proto_defs.h s-messages
session_config.h: session_config.h.pre
$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" session_config.h.pre >$@
cc_messages.cc cc_messages.h: cc_messages.mes
cc_messages.cc cc_messages.h: s-messages
s-messages: cc_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/cc/cc_messages.mes
touch $@
BUILT_SOURCES = session_config.h cc_messages.cc cc_messages.h proto_defs.h
......
......@@ -6,8 +6,11 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/lib/log -I$(top_builddir)/src/lib/log
AM_CPPFLAGS += $(BOOST_INCLUDES)
# Define rule to build logging source files from message file
config_messages.h config_messages.cc: config_messages.mes
config_messages.h config_messages.cc: s-messages
s-messages: config_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/config/config_messages.mes
touch $@
BUILT_SOURCES = config_messages.h config_messages.cc
......@@ -27,4 +30,4 @@ nodist_libb10_cfgclient_la_SOURCES = config_messages.h config_messages.cc
# The message file should be in the distribution.
EXTRA_DIST = config_messages.mes
CLEANFILES = *.gcno *.gcda config_messages.h config_messages.cc
CLEANFILES = *.gcno *.gcda config_messages.h config_messages.cc s-messages
......@@ -22,6 +22,7 @@ CLEANFILES = *.gcno *.gcda datasrc_messages.h datasrc_messages.cc
CLEANFILES += sqlite3_datasrc_messages.h sqlite3_datasrc_messages.cc
CLEANFILES += datasrc_config.h
CLEANFILES += static.zone
CLEANFILES += s-messages1 s-messages2
lib_LTLIBRARIES = libb10-datasrc.la
libb10_datasrc_la_SOURCES = exceptions.h
......@@ -65,10 +66,17 @@ libb10_datasrc_la_LIBADD += $(SQLITE_LIBS)
BUILT_SOURCES = datasrc_config.h datasrc_messages.h datasrc_messages.cc
BUILT_SOURCES += sqlite3_datasrc_messages.h sqlite3_datasrc_messages.cc
datasrc_messages.h datasrc_messages.cc: Makefile datasrc_messages.mes
datasrc_messages.h datasrc_messages.cc: s-messages1
s-messages1: Makefile datasrc_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/datasrc/datasrc_messages.mes
sqlite3_datasrc_messages.h sqlite3_datasrc_messages.cc: Makefile sqlite3_datasrc_messages.mes
touch $@
sqlite3_datasrc_messages.h sqlite3_datasrc_messages.cc: s-messages2
s-messages2: Makefile sqlite3_datasrc_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/datasrc/sqlite3_datasrc_messages.mes
touch $@
EXTRA_DIST = datasrc_messages.mes sqlite3_datasrc_messages.mes static.zone.pre
......
......@@ -40,8 +40,11 @@ nodist_libdatasrc_memory_la_SOURCES = memory_messages.h memory_messages.cc
EXTRA_DIST = rdata_serialization_priv.cc
BUILT_SOURCES = memory_messages.h memory_messages.cc
memory_messages.h memory_messages.cc: Makefile memory_messages.mes
memory_messages.h memory_messages.cc: s-messages
s-messages: Makefile memory_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/datasrc/memory/memory_messages.mes
touch $@
EXTRA_DIST += memory_messages.mes
CLEANFILES += memory_messages.h memory_messages.cc
CLEANFILES += memory_messages.h memory_messages.cc s-messages
......@@ -12,8 +12,11 @@ AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Define rule to build logging source files from message file
dhcp_ddns_messages.h dhcp_ddns_messages.cc: dhcp_ddns_messages.mes
dhcp_ddns_messages.h dhcp_ddns_messages.cc: s-messages
s-messages: dhcp_ddns_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/dhcp_ddns/dhcp_ddns_messages.mes
touch $@
# Tell automake that the message files are built as part of the build process
# (so that they are built before the main library is built).
......@@ -23,7 +26,7 @@ BUILT_SOURCES = dhcp_ddns_messages.h dhcp_ddns_messages.cc
EXTRA_DIST = dhcp_ddns_messages.mes libdhcp_ddns.dox
# Get rid of generated message files on a clean
CLEANFILES = *.gcno *.gcda dhcp_ddns_messages.h dhcp_ddns_messages.cc
CLEANFILES = *.gcno *.gcda dhcp_ddns_messages.h dhcp_ddns_messages.cc s-messages
lib_LTLIBRARIES = libb10-dhcp_ddns.la
libb10_dhcp_ddns_la_SOURCES =
......
......@@ -11,8 +11,11 @@ endif
AM_CXXFLAGS = $(B10_CXXFLAGS)
# Define rule to build logging source files from message file
dhcpsrv_messages.h dhcpsrv_messages.cc: dhcpsrv_messages.mes
dhcpsrv_messages.h dhcpsrv_messages.cc: s-messages
s-messages: dhcpsrv_messages.mes
$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
touch $@
# Tell Automake that the dhcpsrv_messages.{cc,h} source files are created in the
# build process, so it must create these before doing anything else. Although
......@@ -29,7 +32,7 @@ BUILT_SOURCES = dhcpsrv_messages.h dhcpsrv_messages.cc
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Make sure the generated files are deleted in a "clean" operation
CLEANFILES = *.gcno *.gcda dhcpsrv_messages.h dhcpsrv_messages.cc
CLEANFILES = *.gcno *.gcda dhcpsrv_messages.h dhcpsrv_messages.cc s-messages
lib_LTLIBRARIES = libb10-dhcpsrv.la
libb10_dhcpsrv_la_SOURCES =
......
......@@ -714,9 +714,8 @@ public:
template<typename ContainerType, typename ValueType>
void checkValueEq(const boost::shared_ptr<ContainerType>& ref_values,
const boost::shared_ptr<ContainerType>& values) {
ValueType param;
ASSERT_NO_THROW(param = values->getParam("foo"));
EXPECT_EQ(ref_values->getParam("foo"), param);
ASSERT_NO_THROW(values->getParam("foo"));
EXPECT_EQ(ref_values->getParam("foo"), values->getParam("foo"));
}
/// @brief Check that the storages of the specific type hold different
......@@ -734,9 +733,8 @@ public:
template<typename ContainerType, typename ValueType>
void checkValueNeq(const boost::shared_ptr<ContainerType>& ref_values,
const boost::shared_ptr<ContainerType>& values) {
ValueType param;
ASSERT_NO_THROW(param = values->getParam("foo"));
EXPECT_NE(ref_values->getParam("foo"), param);
ASSERT_NO_THROW(values->getParam("foo"));
EXPECT_NE(ref_values->getParam("foo"), values->getParam("foo"));
}
/// @brief Check that option definition storage in the context holds
......
......@@ -7,7 +7,7 @@ AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
CLEANFILES = *.gcno *.gcda
CLEANFILES += rrclass.h rrtype.h rrparamregistry.cc rdataclass.h rdataclass.cc
CLEANFILES += rrclass.h rrtype.h rrparamregistry.cc rdataclass.h rdataclass.cc s-rdatacode
# These two are created with rrtype/class.h, so not explicitly listed in
# BUILT_SOURCES.
CLEANFILES += python/rrtype_constants_inc.cc
......@@ -157,8 +157,12 @@ nodist_libb10_dns___la_SOURCES = rdataclass.cc rrparamregistry.cc
rrclass.h: rrclass-placeholder.h
rrtype.h: rrtype-placeholder.h
rrparamregistry.cc: rrparamregistry-placeholder.cc
rrclass.h rrtype.h rrparamregistry.cc rdataclass.h rdataclass.cc: Makefile
s-rdatacode: Makefile
$(PYTHON) ./gen-rdatacode.py
touch $@
rrclass.h rrtype.h rrparamregistry.cc rdataclass.h rdataclass.cc: s-rdatacode
libdns___includedir = $(includedir)/$(PACKAGE_NAME)/dns
libdns___include_HEADERS = \
......
......@@ -224,15 +224,10 @@ private:
// after the RR class below.
}
const MaybeRRClass rrclass =
RRClass::createFromText(rrparam_token.getString());
boost::scoped_ptr<RRClass> rrclass
(RRClass::createFromText(rrparam_token.getString()));
if (rrclass) {
// FIXME: The following code re-parses the rrparam_token to
// make an RRClass instead of using the MaybeRRClass above,
// because some old versions of boost::optional (that we
// still want to support) have a bug (see trac #2593). This
// workaround should be removed at some point in the future.
if (RRClass(rrparam_token.getString()) != zone_class_) {
if (*rrclass != zone_class_) {
isc_throw(InternalException, "Class mismatch: " << *rrclass <<
" vs. " << zone_class_);
}
......@@ -280,11 +275,7 @@ private:
// care about where it comes from). see LimitTTL() for parameter
// post_parsing.
void setDefaultTTL(const RRTTL& ttl, bool post_parsing) {
if (!default_ttl_) {
default_ttl_.reset(new RRTTL(ttl));
} else {
*default_ttl_ = ttl;
}
assignTTL(default_ttl_, ttl);
limitTTL(*default_ttl_, post_parsing);
}
......@@ -296,9 +287,9 @@ private:
// We use the factory version instead of RRTTL constructor as we
// need to expect cases where ttl_txt does not actually represent a TTL
// but an RR class or type.
const MaybeRRTTL maybe_ttl = RRTTL::createFromText(ttl_txt);
if (maybe_ttl) {
current_ttl_ = maybe_ttl;
RRTTL* rrttl = RRTTL::createFromText(ttl_txt);
if (rrttl) {
current_ttl_.reset(rrttl);
limitTTL(*current_ttl_, false);
return (true);
}
......@@ -329,7 +320,7 @@ private:
dynamic_cast<const rdata::generic::SOA&>(*rdata).
getMinimum();
setDefaultTTL(RRTTL(ttl_val), true);
current_ttl_ = *default_ttl_;
assignTTL(current_ttl_, *default_ttl_);
} else {
// On catching the exception we'll try to reach EOL again,
// so we need to unget it now.
......@@ -338,7 +329,7 @@ private:
"no TTL specified; load rejected");
}
} else if (!explicit_ttl && default_ttl_) {
current_ttl_ = *default_ttl_;
assignTTL(current_ttl_, *default_ttl_);
} else if (!explicit_ttl && warn_rfc1035_ttl_) {
// Omitted (class and) TTL values are default to the last
// explicitly stated values (RFC 1035, Sec. 5.1).
......@@ -395,6 +386,17 @@ private:
}
}
/// \brief Assign the right RRTTL's value to the left RRTTL. If one
/// doesn't exist in the scoped_ptr, make a new RRTTL copy of the
/// right argument.
static void assignTTL(boost::scoped_ptr<RRTTL>& left, const RRTTL& right) {
if (!left) {
left.reset(new RRTTL(right));
} else {
*left = right;
}
}
private:
MasterLexer lexer_;
const Name zone_origin_;
......@@ -407,8 +409,10 @@ private:
boost::scoped_ptr<RRTTL> default_ttl_; // Default TTL of RRs used when
// unspecified. If NULL no default
// is known.
MaybeRRTTL current_ttl_; // The TTL used most recently. Initially unset.
// Once set always stores a valid RRTTL.
boost::scoped_ptr<RRTTL> current_ttl_; // The TTL used most recently.
// Initially unset. Once set
// always stores a valid
// RRTTL.
const MasterLoader::Options options_;
const std::string master_file_;
std::string string_token_;
......
......@@ -35,16 +35,6 @@ namespace dns {
// forward declarations
class AbstractMessageRenderer;
class RRClass; // forward declaration to define MaybeRRClass.
/// \brief A shortcut for a compound type to represent RRClass-or-not.
///
/// A value of this type can be interpreted in a boolean context, whose
/// value is \c true if and only if it contains a valid RRClass object.
/// And, if it contains a valid RRClass object, its value is accessible
/// using \c operator*, just like a bare pointer to \c RRClass.
typedef boost::optional<RRClass> MaybeRRClass;
///
/// \brief A standard DNS module exception that is thrown if an RRClass object
/// is being constructed from an unrecognized string.
......@@ -163,12 +153,8 @@ public:
/// <code>RRClass(const std::string&)</code> constructor.
///
/// If the given text represents a valid RRClass, it returns a
/// \c MaybeRRClass object that stores a corresponding \c RRClass
/// object, which is accessible via \c operator*(). In this case
/// the returned object will be interpreted as \c true in a boolean
/// context. If the given text does not represent a valid RRClass,
/// it returns a \c MaybeRRClass object which is interpreted as
/// \c false in a boolean context.
/// pointer to a new \c RRClass object. If the given text does not
/// represent a valid RRClass, it returns \c NULL.
///
/// One main purpose of this function is to minimize the overhead
/// when the given text does not represent a valid RR class. For
......@@ -183,9 +169,9 @@ public:
/// This function never throws the \c InvalidRRClass exception.
///
/// \param class_str A string representation of the \c RRClass.
/// \return A MaybeRRClass object either storing an RRClass object
/// for the given text or a \c false value.
static MaybeRRClass createFromText(const std::string& class_str);
/// \return A new RRClass object for the given text or a \c NULL
/// value.
static RRClass* createFromText(const std::string& class_str);
///
/// We use the default copy constructor intentionally.
......
......@@ -59,14 +59,14 @@ RRClass::toWire(AbstractMessageRenderer& renderer) const {
renderer.writeUint16(classcode_);
}
MaybeRRClass
RRClass*
RRClass::createFromText(const string& class_str) {
uint16_t class_code;
if (RRParamRegistry::getRegistry().textToClassCode(class_str,
class_code)) {
return (MaybeRRClass(class_code));
return (new RRClass(class_code));
}
return (MaybeRRClass());
return (NULL);
}
ostream&
......
......@@ -166,13 +166,13 @@ RRTTL::RRTTL(const std::string& ttlstr) {
}
}
MaybeRRTTL
RRTTL*
RRTTL::createFromText(const string& ttlstr) {
uint32_t ttlval;
if (parseTTLString(ttlstr, ttlval, NULL)) {
return (MaybeRRTTL(ttlval));
return (new RRTTL(ttlval));
}
return (MaybeRRTTL());
return (NULL);
}
RRTTL::RRTTL(InputBuffer& buffer) {
......
......@@ -32,16 +32,6 @@ namespace dns {
// forward declarations
class AbstractMessageRenderer;
class RRTTL; // forward declaration to define MaybeRRTTL
/// \brief A shortcut for a compound type to represent RRTTL-or-not.
///
/// A value of this type can be interpreted in a boolean context, whose
/// value is \c true if and only if it contains a valid RRTTL object.
/// And, if it contains a valid RRTTL object, its value is accessible
/// using \c operator*, just like a bare pointer to \c RRTTL.
typedef boost::optional<RRTTL> MaybeRRTTL;
///
/// \brief A standard DNS module exception that is thrown if an RRTTL object
/// is being constructed from an unrecognized string.
......@@ -123,12 +113,9 @@ public:
/// possible exception handling. This version is provided for such
/// purpose.
///
/// If the given text represents a valid RRTTL, it returns a \c MaybeRRTTL
/// object that stores a corresponding \c RRTTL object, which is
/// accessible via \c operator*(). In this case the returned object will
/// be interpreted as \c true in a boolean context. If the given text
/// does not represent a valid RRTTL, it returns a \c MaybeRRTTL object
/// which is interpreted as \c false in a boolean context.
/// If the given text represents a valid RRTTL, it returns a pointer
/// to a new RRTTL object. If the given text does not represent a
/// valid RRTTL, it returns \c NULL..
///
/// One main purpose of this function is to minimize the overhead
/// when the given text does not represent a valid RR TTL. For this
......@@ -142,9 +129,8 @@ public:
/// This function never throws the \c InvalidRRTTL exception.
///
/// \param ttlstr A string representation of the \c RRTTL.
/// \return An MaybeRRTTL object either storing an RRTTL object for
/// the given text or a \c false value.
static MaybeRRTTL createFromText(const std::string& ttlstr);
/// \return A new RRTTL object for the given text or a \c NULL value.
static RRTTL* createFromText(const std::string& ttlstr);
///
//@}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment