#include <SimpleType.h>
Public Types | |
enum | { NONE = 0, LENGTH = 0x1, MINLEN = 0x2, MAXLEN = 0x4, ENUM = 0x8, WSP = 0x10, MAXINC = 0x20, MININC = 0x40, MAXEX = 0x80, MINEX = 0x100, TOTALDIGITS = 0x200, FRAC = 0x400, PATTERN = 0x800 } |
enum | { PRESERVE = 1, REPLACE, COLLAPSE } |
Public Member Functions | |
Constructors and Destructors | |
SimpleType (const std::string &ns) | |
~SimpleType () | |
Various Getter methods | |
bool | isList () const |
bool | isUnion () const |
bool | isSimple () const |
bool | isvalidFacet (std::string facet) |
bool | isValidInt (int val) const |
bool | isValidFloat (float val) const |
bool | isValidString (std::string val) const |
bool | getFacetValue (int facet, void *&val) |
const std::list< int > * | unionTypes () const |
void | setUnionType (int id) |
void | setListType (int id) |
void | setFacetValue (std::string facet, std::string val) |
Definition at line 53 of file SimpleType.h.
anonymous enum |
Definition at line 100 of file SimpleType.h.
anonymous enum |
Schema::SimpleType::SimpleType | ( | const std::string & | ns | ) |
the | namespace uri of the simple type |
Definition at line 27 of file SimpleType.cpp.
References ENUM, FRAC, LENGTH, MAXEX, MAXINC, MAXLEN, MINEX, MININC, MINLEN, NONE, Schema::facetValueType::numEnums, PATTERN, Schema::XSDType::setContentModel(), Schema::Simple, TOTALDIGITS, WSP, Schema::XSD_ANY, Schema::XSD_ANYTYPE, Schema::XSD_ANYURI, Schema::XSD_BASE64BIN, Schema::XSD_BOOLEAN, Schema::XSD_BYTE, Schema::XSD_DATE, Schema::XSD_DATETIME, Schema::XSD_DECIMAL, Schema::XSD_DOUBLE, Schema::XSD_FLOAT, Schema::XSD_INT, Schema::XSD_INTEGER, Schema::XSD_LONG, Schema::XSD_NCNAME, Schema::XSD_NMTOKEN, Schema::XSD_NMTOKENS, Schema::XSD_POSINT, Schema::XSD_QNAME, Schema::XSD_SHORT, Schema::XSD_STRING, Schema::XSD_TIME, Schema::XSD_TOKEN, Schema::XSD_UINT, Schema::XSD_ULONG, and Schema::XSD_USHORT.
Schema::SimpleType::~SimpleType | ( | ) |
Definition at line 76 of file SimpleType.cpp.
bool Schema::SimpleType::isList | ( | ) | const [inline] |
isList
Definition at line 141 of file SimpleType.h.
Referenced by Schema::SchemaValidator::validate().
bool Schema::SimpleType::isUnion | ( | ) | const [inline] |
isUnion
Definition at line 148 of file SimpleType.h.
Referenced by Schema::SchemaValidator::validate().
bool Schema::SimpleType::isSimple | ( | ) | const [inline, virtual] |
bool Schema::SimpleType::isvalidFacet | ( | std::string | facet | ) |
bool Schema::SimpleType::isValidInt | ( | int | val | ) | const |
Definition at line 172 of file SimpleType.cpp.
References Schema::XSDType::getBaseTypeId(), Schema::facetValueType::length, LENGTH, Schema::facetValueType::lenRange, Schema::facetValueType::maxex, MAXEX, Schema::facetValueType::maxinc, MAXINC, Schema::facetValueType::maxlen, MAXLEN, Schema::facetValueType::minex, MINEX, Schema::facetValueType::mininc, MININC, Schema::facetValueType::minlen, MINLEN, Schema::facetValueType::valRange, Schema::XSD_INT, and Schema::XSD_INTEGER.
Referenced by Schema::SchemaValidator::validate().
bool Schema::SimpleType::isValidFloat | ( | float | val | ) | const |
bool Schema::SimpleType::isValidString | ( | std::string | val | ) | const |
Definition at line 251 of file SimpleType.cpp.
References ENUM, Schema::facetValueType::length, LENGTH, Schema::facetValueType::lenRange, Schema::facetValueType::maxlen, MAXLEN, Schema::facetValueType::minlen, MINLEN, and PATTERN.
Referenced by Schema::SchemaValidator::validate().
bool Schema::SimpleType::getFacetValue | ( | int | facet, | |
void *& | val | |||
) |
Definition at line 316 of file SimpleType.cpp.
References ENUM, FRAC, Schema::facetValueType::length, LENGTH, Schema::facetValueType::lenRange, Schema::facetValueType::maxex, MAXEX, Schema::facetValueType::maxinc, MAXINC, MAXLEN, Schema::facetValueType::minex, MINEX, Schema::facetValueType::mininc, MININC, Schema::facetValueType::minlen, MINLEN, Schema::facetValueType::pattern, PATTERN, Schema::facetValueType::tot, TOTALDIGITS, and Schema::facetValueType::valRange.
const std::list< int > * Schema::SimpleType::unionTypes | ( | ) | const [inline] |
Definition at line 180 of file SimpleType.h.
void Schema::SimpleType::setUnionType | ( | int | id | ) | [inline] |
Definition at line 163 of file SimpleType.h.
void Schema::SimpleType::setListType | ( | int | id | ) | [inline] |
void Schema::SimpleType::setFacetValue | ( | std::string | facet, | |
std::string | val | |||
) |
Definition at line 98 of file SimpleType.cpp.
References COLLAPSE, ENUM, Schema::facetValueType::frac, FRAC, Schema::facetValueType::length, LENGTH, Schema::facetValueType::lenRange, Schema::facetValueType::maxex, MAXEX, Schema::facetValueType::maxinc, MAXINC, Schema::facetValueType::maxlen, MAXLEN, Schema::facetValueType::minex, MINEX, Schema::facetValueType::mininc, MININC, Schema::facetValueType::minlen, MINLEN, Schema::facetValueType::numEnums, XmlUtils::parseInt(), Schema::facetValueType::pattern, PATTERN, PRESERVE, REPLACE, Schema::facetValueType::tot, TOTALDIGITS, Schema::facetValueType::valRange, Schema::facetValueType::wsp, and WSP.