static void regist(uint16_t cl, uint16_t ty, makerfunc_t* f, zmakerfunc_t* z, const char* name)
{
- assert(!d_locked);
+ assert(!d_locked); // NOLINT: it's the API
if(f)
getTypemap()[pair(cl,ty)]=f;
if(z)
getN2Typemap().emplace(name, pair(cl, ty));
}
- static void unregist(uint16_t cl, uint16_t ty)
- {
- assert(!d_locked);
- auto key = pair(cl, ty);
- getTypemap().erase(key);
- getZmakermap().erase(key);
- }
-
static bool isUnknownType(const string& name)
{
return boost::starts_with(name, "TYPE") || boost::starts_with(name, "type");
#define includeboilerplate(RNAME) RNAME##RecordContent(const DNSRecord& dr, PacketReader& pr); \
RNAME##RecordContent(const string& zoneData); \
static void report(void); \
- static void unreport(void); \
static std::shared_ptr<DNSRecordContent> make(const DNSRecord &dr, PacketReader& pr); \
static std::shared_ptr<DNSRecordContent> make(const string& zonedata); \
string getZoneRepresentation(bool noDot=false) const override; \
{ \
regist(1, QType::RNAME, &RNAME##RecordContent::make, &RNAME##RecordContent::make, #RNAME); \
regist(254, QType::RNAME, &RNAME##RecordContent::make, &RNAME##RecordContent::make, #RNAME); \
-} \
-void RNAME##RecordContent::unreport(void) \
-{ \
- unregist(1, QType::RNAME); \
- unregist(254, QType::RNAME); \
} \
\
RNAME##RecordContent::RNAME##RecordContent(const string& zoneData) \