00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _ITEMFACTORY_HPP
00025 #define _ITEMFACTORY_HPP
00026
00027 #include <xqilla/framework/XQillaExport.hpp>
00028 #include <xqilla/mapm/m_apm.h>
00029 #include <xqilla/items/ATAnyURIOrDerived.hpp>
00030 #include <xqilla/items/ATBooleanOrDerived.hpp>
00031 #include <xqilla/items/ATDateOrDerived.hpp>
00032 #include <xqilla/items/ATDateTimeOrDerived.hpp>
00033 #include <xqilla/items/ATDecimalOrDerived.hpp>
00034 #include <xqilla/items/ATDoubleOrDerived.hpp>
00035 #include <xqilla/items/ATDurationOrDerived.hpp>
00036 #include <xqilla/items/ATFloatOrDerived.hpp>
00037 #include <xqilla/items/ATGDayOrDerived.hpp>
00038 #include <xqilla/items/ATGMonthOrDerived.hpp>
00039 #include <xqilla/items/ATGMonthDayOrDerived.hpp>
00040 #include <xqilla/items/ATGYearMonthOrDerived.hpp>
00041 #include <xqilla/items/ATGYearOrDerived.hpp>
00042 #include <xqilla/items/ATQNameOrDerived.hpp>
00043 #include <xqilla/items/ATStringOrDerived.hpp>
00044 #include <xqilla/items/ATTimeOrDerived.hpp>
00045 #include <xqilla/items/ATUntypedAtomic.hpp>
00046 #include <xqilla/ast/ASTNode.hpp>
00047
00048 #include <xercesc/util/XMemory.hpp>
00049
00050 class XQILLA_API ItemFactory : public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
00051 {
00052 public:
00053 virtual ~ItemFactory() {};
00054
00055
00056
00057 virtual AnyAtomicType::AtomicObjectType getPrimitiveTypeIndex(const XMLCh* typeURI, const XMLCh* typeName, bool &isPrimitive) const = 0;
00058 virtual void getPrimitiveTypeName(AnyAtomicType::AtomicObjectType type, const XMLCh *&typeURI, const XMLCh *&typeName) const = 0;
00059
00060 virtual AnyAtomicType::Ptr createDerivedFromAtomicType(AnyAtomicType::AtomicObjectType typeIndex, const XMLCh* value,
00061 const DynamicContext* context) = 0;
00062 virtual AnyAtomicType::Ptr createDerivedFromAtomicType(AnyAtomicType::AtomicObjectType typeIndex, const XMLCh* typeURI,
00063 const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00064 virtual AnyAtomicType::Ptr createDerivedFromAtomicType(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00065
00066
00067
00068 virtual ATDoubleOrDerived::Ptr createDouble(const MAPM value, const DynamicContext* context) = 0;
00069 virtual ATDoubleOrDerived::Ptr createDouble(const XMLCh* value, const DynamicContext* context) = 0;
00070 virtual ATDoubleOrDerived::Ptr createDoubleOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const MAPM value, const DynamicContext* context) = 0;
00071 virtual ATDoubleOrDerived::Ptr createDoubleOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00072
00073 virtual ATFloatOrDerived::Ptr createFloat(const MAPM value, const DynamicContext* context) = 0;
00074 virtual ATFloatOrDerived::Ptr createFloat(const XMLCh* value, const DynamicContext* context) = 0;
00075 virtual ATFloatOrDerived::Ptr createFloatOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const MAPM value, const DynamicContext* context) = 0;
00076 virtual ATFloatOrDerived::Ptr createFloatOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00077
00078 virtual ATDecimalOrDerived::Ptr createInteger(const int value, const DynamicContext* context) = 0;
00079 virtual ATDecimalOrDerived::Ptr createInteger(const MAPM value, const DynamicContext* context) = 0;
00080 virtual ATDecimalOrDerived::Ptr createInteger(const XMLCh* value, const DynamicContext* context) = 0;
00081 virtual ATDecimalOrDerived::Ptr createNonNegativeInteger(const MAPM value, const DynamicContext* context) = 0;
00082
00083 virtual ATDecimalOrDerived::Ptr createDecimal(const MAPM value, const DynamicContext* context) = 0;
00084 virtual ATDecimalOrDerived::Ptr createDecimal(const XMLCh* value, const DynamicContext* context) = 0;
00085 virtual ATDecimalOrDerived::Ptr createDecimalOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const MAPM value, const DynamicContext* context) = 0;
00086 virtual ATDecimalOrDerived::Ptr createDecimalOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00087
00088
00089
00090 virtual ATDateOrDerived::Ptr createDate(const XMLCh* value, const DynamicContext* context) = 0;
00091 virtual ATDateOrDerived::Ptr createDateOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00092
00093 virtual ATDateTimeOrDerived::Ptr createDateTime(const XMLCh* value, const DynamicContext* context) = 0;
00094 virtual ATDateTimeOrDerived::Ptr createDateTimeOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00095
00096 virtual ATTimeOrDerived::Ptr createTime(const XMLCh* value, const DynamicContext* context) = 0;
00097 virtual ATTimeOrDerived::Ptr createTimeOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00098
00099 virtual ATGDayOrDerived::Ptr createGDayOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00100 virtual ATGMonthDayOrDerived::Ptr createGMonthDayOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00101 virtual ATGMonthOrDerived::Ptr createGMonthOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00102 virtual ATGYearMonthOrDerived::Ptr createGYearMonthOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00103 virtual ATGYearOrDerived::Ptr createGYearOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00104
00105 virtual ATDurationOrDerived::Ptr createDayTimeDuration(const XMLCh* value, const DynamicContext* context) = 0;
00106 virtual ATDurationOrDerived::Ptr createDayTimeDuration(const MAPM &seconds, const DynamicContext* context) = 0;
00107 virtual ATDurationOrDerived::Ptr createYearMonthDuration(const XMLCh* value, const DynamicContext* context) = 0;
00108 virtual ATDurationOrDerived::Ptr createYearMonthDuration(const MAPM &months, const DynamicContext* context) = 0;
00109
00110
00111
00112 virtual ATStringOrDerived::Ptr createString(const XMLCh* value, const DynamicContext* context) = 0;
00113 virtual ATStringOrDerived::Ptr createStringOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00114
00115 virtual ATUntypedAtomic::Ptr createUntypedAtomic(const XMLCh* value, const DynamicContext* context) = 0;
00116
00117 virtual ATBooleanOrDerived::Ptr createBoolean(bool value, const DynamicContext* context) = 0;
00118 virtual ATBooleanOrDerived::Ptr createBoolean(BoolResult value, const DynamicContext* context) = 0;
00119 virtual ATBooleanOrDerived::Ptr createBoolean(const XMLCh* value, const DynamicContext* context) = 0;
00120 virtual ATBooleanOrDerived::Ptr createBooleanOrDerived(const XMLCh* typeURI, const XMLCh* typeName, bool value, const DynamicContext* context) = 0;
00121 virtual ATBooleanOrDerived::Ptr createBooleanOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* value, const DynamicContext* context) = 0;
00122
00123 virtual ATAnyURIOrDerived::Ptr createAnyURI(const XMLCh* value, const DynamicContext* context) = 0;
00124
00125 virtual ATQNameOrDerived::Ptr createQName(const XMLCh* uri, const XMLCh* prefix, const XMLCh* name, const DynamicContext* context) = 0;
00126 virtual ATQNameOrDerived::Ptr createQNameOrDerived(const XMLCh* typeURI, const XMLCh* typeName, const XMLCh* uri, const XMLCh *prefix,
00127 const XMLCh* name, const DynamicContext* context) = 0;
00128
00129 };
00130
00131 #endif