# XQilla Simple API Documentation

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

# ItemFactory.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright (c) 2001, 2008,
    00003  *     DecisionSoft Limited. All rights reserved.
    00004  * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
    00005  *
    00006  *
    00007  * Licensed under the Apache License, Version 2.0 (the "License");
    00008  * you may not use this file except in compliance with the License.
    00009  * You may obtain a copy of the License at
    00010  *
    00011  *     http://www.apache.org/licenses/LICENSE-2.0
    00012  *
    00013  * Unless required by applicable law or agreed to in writing, software
    00014  * distributed under the License is distributed on an "AS IS" BASIS,
    00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00016  * See the License for the specific language governing permissions and
    00017  * limitations under the License.
    00018  */
    00019
    00020 /*
    00021   Factory base class
    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   /* @name Atomic type factory methods */
    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   /* @name Number factory methods */
    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   /* @name Date / time factory methods */
    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   /* @name Other factory methods */
    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