Datatypes¶
Runtime integer tags for supported datatypes with conversion to/from URIs.
-
enum
ExessDatatype
¶ -
enumerator
EXESS_NOTHING
¶ Sentinel for unknown datatypes or errors.
-
enumerator
EXESS_NON_NEGATIVE_INTEGER
¶ xsd:nonNegativeInteger (see Unsigned Long)
-
enumerator
EXESS_ULONG
¶ xsd:unsignedLong (see Unsigned Long)
-
enumerator
EXESS_UINT
¶ xsd:unsignedInt (see Unsigned Int)
-
enumerator
EXESS_USHORT
¶ xsd:unsignedShort (see Unsigned Short)
-
enumerator
EXESS_UBYTE
¶ xsd:unsignedByte (see Unsigned Byte)
-
enumerator
EXESS_POSITIVE_INTEGER
¶ xsd:positiveInteger (see Unsigned Long)
-
enumerator
-
const char *
exess_datatype_uri
(ExessDatatype datatype)¶ Return the URI for a supported datatype.
This only returns URIs that start with
http://www.w3.org/2001/XMLSchema#
.- Parameters
datatype – Datatype tag.
- Returns
The URI of the datatype, or null for
ExessDatatype.EXESS_NOTHING
.
-
ExessDatatype
exess_datatype_from_uri
(const char *uri)¶ Return the datatype tag for a datatype URI.
- Returns
A datatype tag, or
ExessDatatype.EXESS_NOTHING
if the URI is not a supported datatype.
-
bool
exess_datatype_is_bounded
(ExessDatatype datatype)¶ Return whether a datatype has an upper bound on value sizes.
This returns true for all datatypes except
ExessDatatype.EXESS_DECIMAL
,ExessDatatype.EXESS_INTEGER
and its half-bounded subtypesExessDatatype.EXESS_NON_POSITIVE_INTEGER
,ExessDatatype.EXESS_NEGATIVE_INTEGER
,ExessDatatype.EXESS_NON_NEGATIVE_INTEGER
, andExessDatatype.EXESS_POSITIVE_INTEGER
, and the binary typesExessDatatype.EXESS_HEX
andExessDatatype.EXESS_BASE64
.For bounded datatypes, the maximum length of the string representation is available in
exess_max_lengths
array, or as static constants likeEXESS_MAX_INT_LENGTH
.- Returns
True if values of the given datatype have a maximum size.