// For cstd0x compatibility we will use stdint.h types instead of std:: ones on cstdint:
//#include <cstdint> when C++11 available
+// For xml representations (xml::Compiler and json::functions::json2xml)
+#define ANNA_XML_INDENTATION_SPACES 3
+
// Decoding helpers
#define DECODE2BYTES_INDX_VALUETYPE(buffer,indx,value_type) ((((value_type)buffer[indx] << 8) & 0xFF00) + ((value_type)buffer[indx+1] & 0x00FF))
* @param v Version type
* @return Version description
*/
- static const char* asText(const _v v) throw() { // anna_declare_enum is not safe, because labels don't have to match a sequence
+ static const char* asText(const _v v) { // anna_declare_enum is not safe, because labels don't have to match a sequence
if(v == IPv4) return "IPv4";
if(v == IPv6) return "IPv6";
/** Gets the address version */
- const U16 & getVersion() const throw() { return Version; }
+ const U16 & getVersion() const { return Version; }
/** Gets the address printable value */
- const char * getValue() const throw() { return Value.c_str(); }
+ const char * getValue() const { return Value.c_str(); }
// Helpers
/** Return true when is an IPv4 address */
- bool isIPv4() const throw() { return ((iana_address_version_t::_v)Version == iana_address_version_t::IPv4); }
+ bool isIPv4() const { return ((iana_address_version_t::_v)Version == iana_address_version_t::IPv4); }
/** Return true when is an IPv6 address */
- bool isIPv6() const throw() { return ((iana_address_version_t::_v)Version == iana_address_version_t::IPv6); }
+ bool isIPv6() const { return ((iana_address_version_t::_v)Version == iana_address_version_t::IPv6); }
/** Return true when is an E164 (SMDS, Frame Relay, ATM) address */
- bool isE164() const throw() { return ((iana_address_version_t::_v)Version == iana_address_version_t::E164); }
+ bool isE164() const { return ((iana_address_version_t::_v)Version == iana_address_version_t::E164); }
/** Sets version for IPv4 address and address itself. Checking is not performed (could assign IPv6 instead ...) */
- void setIPv4(const char *value) throw() { Version = iana_address_version_t::IPv4; Value = value ? value : ""; }
+ void setIPv4(const char *value) { Version = iana_address_version_t::IPv4; Value = value ? value : ""; }
/** Sets version for IPv6 address and address itself. Checking is not performed (could assign IPv4 instead ...) */
- void setIPv6(const char *value) throw() { Version = iana_address_version_t::IPv6; Value = value ? value : ""; }
+ void setIPv6(const char *value) { Version = iana_address_version_t::IPv6; Value = value ? value : ""; }
/** Sets version for E164 address and address itself. Checking is not performed ... */
- void setE164(const char *value) throw() { Version = iana_address_version_t::E164; Value = value ? value : ""; }
+ void setE164(const char *value) { Version = iana_address_version_t::E164; Value = value ? value : ""; }
/**
*
* @return String with class content
*/
- std::string asString() const throw() {
+ std::string asString() const {
std::string result;
result += Value.c_str(); // assume that all IANA addresses have a printable representation
result += " (";