Gestionnaire de types de données. More...
#include "cogitant/datatype.h"
Public Member Functions | |
| DatatypeManager () | |
| Constructeur. | |
| DatatypeManager (DatatypeManager const &dm) | |
| Constructeur par recopie. | |
| ~DatatypeManager () | |
| Destructeur. | |
| iSet | add (UserDatatype *ndt) |
| Ajout d'un type de données. | |
| iSet | find (std::string const &name, bool autocreate=false) const |
| Recherche d'un type dans le gestionnaire. | |
| UserDatatype const * | userDatatype (iSet id) const |
| Accès à un dataype non standard par son identificateur. | |
| std::string | typeToString (iSet t) const |
| Retourne le nom du type. | |
| std::string | valueToString (Concept const *c) const |
| Conversion de la valeur portée par le concept en chaîne. | |
| bool | stringToValue (iSet dt, std::string const &v, Concept *c) const |
| Conversion d'une chaîne en valeur de ce type. | |
| bool | compatibility (Concept const *c1, Concept const *c2) const |
| Compatibilité entre étiquettes valeurs de concepts. | |
| bool | isGreaterOrEqualThan (iSet dt1, iSet dt2) const |
| Compatibilité de Datatypes. | |
| bool | addSimplifyConceptType (Concept *c, iSet dt) const |
| Change le type d'un sommet concept valeur. | |
Static Public Member Functions | |
| static bool | isConceptType (iSet i) |
| L'identifiant de type passé repère-t'il un type de concept du support (par opposition à un Datatype). | |
| static bool | isDatatype (iSet i) |
| L'identifiant passé repere-t'il un type de données (par opposition aux type de concepts du support). | |
| static bool | isPredefinedDatatype (iSet i) |
| L'identifiant passé repere-t'il un type de données prédéfini. | |
| static bool | isUserDatatype (iSet i) |
| L'identifiant passé repere-t'il un type de données non standard (et représenté par un DatatypeValue). | |
| static bool | isInteger (iSet i) |
| L'identifiant passé est représenté par un entier. | |
| static bool | isFloat (iSet i) |
| L'identifiant passé est représenté par un réel. | |
| static bool | isString (iSet i) |
| L'identifiant passé est représenté par une chaîne. | |
| static char const * | predefinedTypeToString (iSet t) |
| Retourne le nom du type, dans le cas d'un Datatype prédéfini. | |
Static Public Attributes | |
| static const iSet | FIRST |
| Premier identifiant utilisé pour un type de données (par opposition aux identifiants utilisés pour les types de concepts "classiques"). | |
| static const iSet | LITERAL |
| Litéral non typé. | |
| static const iSet | INTEGER |
| Type de données entier. | |
| static const iSet | FLOAT |
| Type de données réel. | |
| static const iSet | STRING |
| Type de données chaîne. | |
| static const iSet | FIRSTINTEGER |
| Premier identifiant utilisé pour un type de données entier. | |
| static const iSet | BOOLEAN |
| Type de XSD : boolean. | |
| static const iSet | BYTE |
| Type de XSD : byte. | |
| static const iSet | INT |
| Type de XSD : int. | |
| static const iSet | LONG |
| Type de XSD : long. | |
| static const iSet | NEGATIVEINTEGER |
| Type de XSD : negativeInteger. | |
| static const iSet | NONNEGATIVEINTEGER |
| Type de XSD : nonNegativeInteger. | |
| static const iSet | NONPOSITIVEINTEGER |
| Type de XSD : nonPositiveInteger. | |
| static const iSet | POSITIVEINTEGER |
| Type de XSD : positiveInteger. | |
| static const iSet | SHORT |
| Type de XSD : short. | |
| static const iSet | UNSIGNEDBYTE |
| Type de XSD : unsignedByte. | |
| static const iSet | UNSIGNEDINT |
| Type de XSD : unsignedInt. | |
| static const iSet | UNSIGNEDLONG |
| Type de XSD : unsignedLong. | |
| static const iSet | UNSIGNEDSHORT |
| Type de XSD : unsignedShort. | |
| static const iSet | GDAY |
| Type de XSD : gDay. | |
| static const iSet | GMONTH |
| Type de XSD : gMonth. | |
| static const iSet | GYEAR |
| Type de XSD : gYear. | |
| static const iSet | FIRSTFLOAT |
| Premier identifiant utilisé pour un type de données réel. | |
| static const iSet | DECIMAL |
| Type de XSD : decimal. | |
| static const iSet | DOUBLE |
| Type de XSD : double. | |
| static const iSet | FIRSTSTRING |
| Premier identifiant utilisé pour un type de données chaîne. | |
| static const iSet | BASE64BINARY |
| Type de XSD : base64Binary. | |
| static const iSet | HEXBINARY |
| Type de XSD : hexBinary. | |
| static const iSet | ANYURI |
| Type de XSD : anyURI. | |
| static const iSet | LANGUAGE |
| Type de XSD : language. | |
| static const iSet | NORMALIZEDSTRING |
| Type de XSD : normalizedString. | |
| static const iSet | TOKEN |
| Type de XSD : token. | |
| static const iSet | DATE |
| Type de XSD : date. | |
| static const iSet | DATETIME |
| Type de XSD : dateTime. | |
| static const iSet | DURATION |
| Type de XSD : duration. | |
| static const iSet | GMONTHDAY |
| Type de XSD : gMonthDay. | |
| static const iSet | GYEARMONTH |
| Type de XSD : gYearMonth. | |
| static const iSet | TIME |
| Type de XSD : time. | |
| static const iSet | NAME |
| Type de XSD : Name. | |
| static const iSet | NCNAME |
| Type de XSD : NCName. | |
| static const iSet | NOTATION |
| Type de XSD : NOTATION. | |
| static const iSet | QNAME |
| Type de XSD : QName. | |
| static const iSet | ENTITY |
| Type de XSD : ENTITY. | |
| static const iSet | ENTITIES |
| Type de XSD : ENTITIES. | |
| static const iSet | ID |
| Type de XSD : ID. | |
| static const iSet | IDREF |
| Type de XSD : IDREF. | |
| static const iSet | IDREFS |
| Type de XSD : IDREFS. | |
| static const iSet | NMTOKEN |
| Type de XSD : NMTOKEN. | |
| static const iSet | NMTOKENS |
| Type de XSD : NMTOKENS. | |
| static const iSet | FIRSTUSERDATATYPE |
| Premier identifiant utilisé pour un type de doonées utilisateur. | |
Gestionnaire de types de données.
| cogitant::DatatypeManager::DatatypeManager | ( | ) |
Constructeur.
| cogitant::DatatypeManager::DatatypeManager | ( | DatatypeManager const & | dm | ) |
Constructeur par recopie.
| cogitant::DatatypeManager::~DatatypeManager | ( | ) |
Destructeur.
| iSet cogitant::DatatypeManager::add | ( | UserDatatype * | ndt | ) |
Ajout d'un type de données.
| ndt | Nouveau type. |
| ExceptionAlreadyPresent | Si le type existe déjà (recherche par le nom). |
Change le type d'un sommet concept valeur.
Essaie de changer le type d'un sommet concept valeur en conservant la valeur portée. Pour cela, il faut que le sommet concept contienne déjà un Datatype, et que ce Datatype soit une généralisation (au sens de isGreaterOrEqualThan) de dt. La valeur portée est éventuellement convertie.
| c | Sommet concept valeur. |
| dt | Identifiant de datatype. |
Compatibilité entre étiquettes valeurs de concepts.
| c1 | Sommet concept valeur. |
| c2 | Sommet concept valeur. |
| iSet cogitant::DatatypeManager::find | ( | std::string const & | name, |
| bool | autocreate = false |
||
| ) | const |
Recherche d'un type dans le gestionnaire.
| name | Nom du type à chercher. |
| autocreate | si true et intitulé introuvable, crée un datatype de cet initulé (instance de UserDatatypeSimple) et retourne l'identificateur du type créé. |
|
inlinestatic |
L'identifiant de type passé repère-t'il un type de concept du support (par opposition à un Datatype).
|
inlinestatic |
L'identifiant passé repere-t'il un type de données (par opposition aux type de concepts du support).
References cogitant::ISET_NULL.
Referenced by cogitant::Concept::hasDatatype(), cogitant::Concept::hasSupportType(), and cogitant::Concept::referentType().
|
inlinestatic |
L'identifiant passé est représenté par un réel.
Compatibilité de Datatypes.
| dt1 | Identifiant d'un premier Datatype. |
| dt2 | Identifiant d'un second Datatype. |
|
inlinestatic |
L'identifiant passé est représenté par un entier.
|
inlinestatic |
L'identifiant passé repere-t'il un type de données prédéfini.
|
inlinestatic |
L'identifiant passé est représenté par une chaîne.
|
inlinestatic |
L'identifiant passé repere-t'il un type de données non standard (et représenté par un DatatypeValue).
References cogitant::ISET_NULL.
|
static |
Retourne le nom du type, dans le cas d'un Datatype prédéfini.
Conversion d'une chaîne en valeur de ce type.
| dt | Identifiant du Datatype. |
| v | Valeur représentée sous la forme d'une chaîne. |
| c | Concept, modifié par appel à la méthode portant la valeur stockée dans la chaîne. |
| std::string cogitant::DatatypeManager::typeToString | ( | iSet | t | ) | const |
Retourne le nom du type.
|
inline |
Accès à un dataype non standard par son identificateur.
| std::string cogitant::DatatypeManager::valueToString | ( | Concept const * | c | ) | const |
Conversion de la valeur portée par le concept en chaîne.
| c | Sommet concept. |
|
static |
Type de XSD : anyURI.
|
static |
Type de XSD : base64Binary.
|
static |
Type de XSD : boolean.
|
static |
Type de XSD : byte.
|
static |
Type de XSD : date.
|
static |
Type de XSD : dateTime.
|
static |
Type de XSD : decimal.
|
static |
Type de XSD : double.
|
static |
Type de XSD : duration.
|
static |
Type de XSD : ENTITIES.
|
static |
Type de XSD : ENTITY.
|
static |
Premier identifiant utilisé pour un type de données (par opposition aux identifiants utilisés pour les types de concepts "classiques").
|
static |
Premier identifiant utilisé pour un type de données réel.
|
static |
Premier identifiant utilisé pour un type de données entier.
|
static |
Premier identifiant utilisé pour un type de données chaîne.
|
static |
Premier identifiant utilisé pour un type de doonées utilisateur.
|
static |
Type de données réel.
|
static |
Type de XSD : gDay.
|
static |
Type de XSD : gMonth.
|
static |
Type de XSD : gMonthDay.
|
static |
Type de XSD : gYear.
|
static |
Type de XSD : gYearMonth.
|
static |
Type de XSD : hexBinary.
|
static |
Type de XSD : ID.
|
static |
Type de XSD : IDREF.
|
static |
Type de XSD : IDREFS.
|
static |
Type de XSD : int.
|
static |
Type de données entier.
|
static |
Type de XSD : language.
|
static |
Litéral non typé.
|
static |
Type de XSD : long.
|
static |
Type de XSD : Name.
|
static |
Type de XSD : NCName.
|
static |
Type de XSD : negativeInteger.
|
static |
Type de XSD : NMTOKEN.
|
static |
Type de XSD : NMTOKENS.
|
static |
Type de XSD : nonNegativeInteger.
|
static |
Type de XSD : nonPositiveInteger.
|
static |
Type de XSD : normalizedString.
|
static |
Type de XSD : NOTATION.
|
static |
Type de XSD : positiveInteger.
|
static |
Type de XSD : QName.
|
static |
Type de XSD : short.
|
static |
Type de données chaîne.
|
static |
Type de XSD : time.
|
static |
Type de XSD : token.
|
static |
Type de XSD : unsignedByte.
|
static |
Type de XSD : unsignedInt.
|
static |
Type de XSD : unsignedLong.
|
static |
Type de XSD : unsignedShort.