This source file includes following definitions.
- description_id
#include <libaddressinput/address_problem.h>
#include <ostream>
#include <string>
namespace i18n {
namespace addressinput {
AddressProblem::AddressProblem(AddressField field,
Type type,
int description_id)
: field(field), type(type), description_id(description_id) {}
AddressProblem::~AddressProblem() {}
std::ostream& operator<<(std::ostream& o, AddressProblem::Type problem_type) {
switch (problem_type) {
case AddressProblem::MISSING_REQUIRED_FIELD:
o << "MISSING_REQUIRED_FIELD";
break;
case AddressProblem::UNKNOWN_VALUE:
o << "UNKNOWN_VALUE";
break;
case AddressProblem::UNRECOGNIZED_FORMAT:
o << "UNRECOGNIZED_FORMAT";
break;
case AddressProblem::MISMATCHING_VALUE:
o << "MISMATCHING_VALUE";
break;
default :
o << "[INVALID]";
break;
}
return o;
}
std::ostream& operator<<(std::ostream& o, const AddressProblem& problem) {
o << "[" << problem.field << ", "
<< problem.type << ", \""
<< problem.description_id << "\"]";
return o;
}
}
}