/**************************************************************************** ** ** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtXmlPatterns module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qabstractfloatcasters_p.h" #include "qatomiccasterlocators_p.h" QT_BEGIN_NAMESPACE using namespace QPatternist; #define impl(owner, mather, type) \ AtomicTypeVisitorResult::Ptr owner::visit(const type *, \ const SourceLocationReflection *const) const \ { \ return AtomicTypeVisitorResult::Ptr(new mather()); \ } #define implSelf(owner) impl(To##owner##CasterLocator, SelfToSelfCaster, owner##Type) /* xs:string */ implSelf(String) impl(ToStringCasterLocator, ToStringCaster, AnyURIType) impl(ToStringCasterLocator, ToStringCaster, Base64BinaryType) impl(ToStringCasterLocator, ToStringCaster, BooleanType) impl(ToStringCasterLocator, ToStringCaster, DateTimeType) impl(ToStringCasterLocator, ToStringCaster, DateType) impl(ToStringCasterLocator, ToStringCaster, DayTimeDurationType) impl(ToStringCasterLocator, ToStringCaster, DecimalType) impl(ToStringCasterLocator, ToStringCaster, DoubleType) impl(ToStringCasterLocator, ToStringCaster, DurationType) impl(ToStringCasterLocator, ToStringCaster, FloatType) impl(ToStringCasterLocator, ToStringCaster, GDayType) impl(ToStringCasterLocator, ToStringCaster, GMonthDayType) impl(ToStringCasterLocator, ToStringCaster, GMonthType) impl(ToStringCasterLocator, ToStringCaster, GYearMonthType) impl(ToStringCasterLocator, ToStringCaster, GYearType) impl(ToStringCasterLocator, ToStringCaster, HexBinaryType) impl(ToStringCasterLocator, ToStringCaster, IntegerType) impl(ToStringCasterLocator, ToStringCaster, NOTATIONType) impl(ToStringCasterLocator, ToStringCaster, QNameType) impl(ToStringCasterLocator, ToStringCaster, SchemaTimeType) impl(ToStringCasterLocator, ToStringCaster, UntypedAtomicType) impl(ToStringCasterLocator, ToStringCaster, YearMonthDurationType) /* xs:untypedAtomic */ implSelf(UntypedAtomic) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, AnyURIType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, Base64BinaryType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, BooleanType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, DateTimeType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, DateType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, DayTimeDurationType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, DecimalType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, DoubleType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, DurationType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, FloatType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, GDayType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, GMonthDayType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, GMonthType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, GYearMonthType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, GYearType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, HexBinaryType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, IntegerType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, NOTATIONType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, QNameType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, StringType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, SchemaTimeType) impl(ToUntypedAtomicCasterLocator, ToUntypedAtomicCaster, YearMonthDurationType) /* xs:anyURI */ implSelf(AnyURI) impl(ToAnyURICasterLocator, ToAnyURICaster, StringType) impl(ToAnyURICasterLocator, ToAnyURICaster, UntypedAtomicType) /* xs:boolean */ implSelf(Boolean) impl(ToBooleanCasterLocator, NumericToBooleanCaster, DoubleType) impl(ToBooleanCasterLocator, NumericToBooleanCaster, FloatType) impl(ToBooleanCasterLocator, NumericToBooleanCaster, DecimalType) impl(ToBooleanCasterLocator, NumericToBooleanCaster, IntegerType) impl(ToBooleanCasterLocator, StringToBooleanCaster, StringType) impl(ToBooleanCasterLocator, StringToBooleanCaster, UntypedAtomicType) /* xs:double */ implSelf(Double) impl(ToDoubleCasterLocator, BooleanToDoubleCaster, BooleanType) impl(ToDoubleCasterLocator, NumericToDoubleCaster, FloatType) impl(ToDoubleCasterLocator, NumericToDoubleCaster, DecimalType) impl(ToDoubleCasterLocator, NumericToDoubleCaster, IntegerType) impl(ToDoubleCasterLocator, StringToDoubleCaster, StringType) impl(ToDoubleCasterLocator, StringToDoubleCaster, UntypedAtomicType) /* xs:float */ implSelf(Float) impl(ToFloatCasterLocator, BooleanToFloatCaster, BooleanType) impl(ToFloatCasterLocator, NumericToFloatCaster, DoubleType) impl(ToFloatCasterLocator, NumericToFloatCaster, DecimalType) impl(ToFloatCasterLocator, NumericToFloatCaster, IntegerType) impl(ToFloatCasterLocator, StringToFloatCaster, StringType) impl(ToFloatCasterLocator, StringToFloatCaster, UntypedAtomicType) /* xs:decimal */ implSelf(Decimal) impl(ToDecimalCasterLocator, BooleanToDecimalCaster, BooleanType) impl(ToDecimalCasterLocator, NumericToDecimalCaster, DoubleType) impl(ToDecimalCasterLocator, NumericToDecimalCaster, FloatType) impl(ToDecimalCasterLocator, NumericToDecimalCaster, IntegerType) impl(ToDecimalCasterLocator, StringToDecimalCaster, StringType) impl(ToDecimalCasterLocator, StringToDecimalCaster, UntypedAtomicType) /* xs:integer */ implSelf(Integer) impl(ToIntegerCasterLocator, BooleanToIntegerCaster, BooleanType) impl(ToIntegerCasterLocator, NumericToDecimalCaster, DoubleType) impl(ToIntegerCasterLocator, NumericToDecimalCaster, FloatType) impl(ToIntegerCasterLocator, NumericToDecimalCaster, DecimalType) impl(ToIntegerCasterLocator, StringToIntegerCaster, StringType) impl(ToIntegerCasterLocator, StringToIntegerCaster, UntypedAtomicType) /* xs:base64binary */ implSelf(Base64Binary) impl(ToBase64BinaryCasterLocator, HexBinaryToBase64BinaryCaster, HexBinaryType) impl(ToBase64BinaryCasterLocator, StringToBase64BinaryCaster, StringType) impl(ToBase64BinaryCasterLocator, StringToBase64BinaryCaster, UntypedAtomicType) /* xs:hexBinary */ implSelf(HexBinary) impl(ToHexBinaryCasterLocator, Base64BinaryToHexBinaryCaster, Base64BinaryType) impl(ToHexBinaryCasterLocator, StringToHexBinaryCaster, StringType) impl(ToHexBinaryCasterLocator, StringToHexBinaryCaster, UntypedAtomicType) /* xs:QName */ implSelf(QName) impl(ToQNameCasterLocator, ToStringCaster, StringType) /* xs:gYear */ implSelf(GYear) impl(ToGYearCasterLocator, StringToGYearCaster, StringType) impl(ToGYearCasterLocator, StringToGYearCaster, UntypedAtomicType) impl(ToGYearCasterLocator, AbstractDateTimeToGYearCaster, DateType) impl(ToGYearCasterLocator, AbstractDateTimeToGYearCaster, DateTimeType) /* xs:gDay */ implSelf(GDay) impl(ToGDayCasterLocator, StringToGDayCaster, StringType) impl(ToGDayCasterLocator, StringToGDayCaster, UntypedAtomicType) impl(ToGDayCasterLocator, AbstractDateTimeToGDayCaster, DateType) impl(ToGDayCasterLocator, AbstractDateTimeToGDayCaster, DateTimeType) /* xs:gMonth */ implSelf(GMonth) impl(ToGMonthCasterLocator, StringToGMonthCaster, StringType) impl(ToGMonthCasterLocator, StringToGMonthCaster, UntypedAtomicType) impl(ToGMonthCasterLocator, AbstractDateTimeToGMonthCaster, DateType) impl(ToGMonthCasterLocator, AbstractDateTimeToGMonthCaster, DateTimeType) /* xs:gYearMonth */ implSelf(GYearMonth) impl(ToGYearMonthCasterLocator, StringToGYearMonthCaster, StringType) impl(ToGYearMonthCasterLocator, StringToGYearMonthCaster, UntypedAtomicType) impl(ToGYearMonthCasterLocator, AbstractDateTimeToGYearMonthCaster, DateType) impl(ToGYearMonthCasterLocator, AbstractDateTimeToGYearMonthCaster, DateTimeType) /* xs:gMonthDay */ implSelf(GMonthDay) impl(ToGMonthDayCasterLocator, StringToGMonthDayCaster, StringType) impl(ToGMonthDayCasterLocator, StringToGMonthDayCaster, UntypedAtomicType) impl(ToGMonthDayCasterLocator, AbstractDateTimeToGMonthDayCaster, DateType) impl(ToGMonthDayCasterLocator, AbstractDateTimeToGMonthDayCaster, DateTimeType) /* xs:dateTime */ implSelf(DateTime) impl(ToDateTimeCasterLocator, StringToDateTimeCaster, StringType) impl(ToDateTimeCasterLocator, AbstractDateTimeToDateTimeCaster, DateType) impl(ToDateTimeCasterLocator, StringToDateTimeCaster, UntypedAtomicType) /* xs:time */ implSelf(SchemaTime) impl(ToSchemaTimeCasterLocator, StringToTimeCaster, StringType) impl(ToSchemaTimeCasterLocator, AbstractDateTimeToTimeCaster, DateTimeType) impl(ToSchemaTimeCasterLocator, StringToTimeCaster, UntypedAtomicType) /* xs:date */ implSelf(Date) impl(ToDateCasterLocator, StringToDateCaster, StringType) impl(ToDateCasterLocator, AbstractDateTimeToDateCaster, DateTimeType) impl(ToDateCasterLocator, StringToDateCaster, UntypedAtomicType) /* xs:duration */ implSelf(Duration) impl(ToDurationCasterLocator, AbstractDurationToDurationCaster, DayTimeDurationType) impl(ToDurationCasterLocator, AbstractDurationToDurationCaster, YearMonthDurationType) impl(ToDurationCasterLocator, StringToDurationCaster, StringType) impl(ToDurationCasterLocator, StringToDurationCaster, UntypedAtomicType) /* xs:dayTimeDuration */ implSelf(DayTimeDuration) impl(ToDayTimeDurationCasterLocator, AbstractDurationToDayTimeDurationCaster, DurationType) impl(ToDayTimeDurationCasterLocator, AbstractDurationToDayTimeDurationCaster, YearMonthDurationType) impl(ToDayTimeDurationCasterLocator, StringToDayTimeDurationCaster, StringType) impl(ToDayTimeDurationCasterLocator, StringToDayTimeDurationCaster, UntypedAtomicType) /* xs:yearMonthDuration */ implSelf(YearMonthDuration) impl(ToYearMonthDurationCasterLocator, AbstractDurationToYearMonthDurationCaster, DayTimeDurationType) impl(ToYearMonthDurationCasterLocator, AbstractDurationToYearMonthDurationCaster, DurationType) impl(ToYearMonthDurationCasterLocator, StringToYearMonthDurationCaster, StringType) impl(ToYearMonthDurationCasterLocator, StringToYearMonthDurationCaster, UntypedAtomicType) #undef implSelf #undef impl QT_END_NAMESPACE