void Sub20::show_contents(HumanReadable & hr) const { for(char const & f : flags) { hr << "Flag - " + get_mapped(Notation::NAME, (uint8_t) f) + " (not " + std::to_string(f) + ")"; } hr << "Name: " + m; hr << "Value: " + n; }
static object get_item( pair_type& p, size_t index ){ switch( index ){ case 0:{ return get_key( p ); } case 1:{ return get_mapped( p ); } case 2:{ objects::stop_iteration_error(); return object(); //will not reach this line } default:{ PyErr_SetString( PyExc_IndexError, "the only valid index numbers are: 0 and 1"); throw_error_already_set(); return object(); //will not reach this line } } }
void Sub29::show_contents(HumanReadable & hr) const { hr << std::string("Reason ") + std::to_string(code) + " - " + get_mapped(Revoke::NAME, code); if (code) { hr << std::string("Comment - ") + reason; } }
void Sub12::show_contents(HumanReadable & hr) const { hr << std::string("Class: ") + std::to_string(_class) << std::string("Public Key Algorithm: ") + get_mapped(PKA::NAME, (uint8_t) pka) + " (pka " + std::to_string(pka) + ")" << std::string("Fingerprint: ") + fingerprint; }
char *mapped_read(int wid) { return strdup(get_mapped(wid) ? "true\n" : "false\n"); }