SourceForge.net Logo

NumericTypeConstructor.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2007
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2007
00005  *     Oracle. All rights reserved.
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  * $Id: NumericTypeConstructor.hpp,v 1.5 2007/11/28 13:13:24 jpcs Exp $
00020  */
00021 
00022 #ifndef _NUMERICTYPECONSTUCTOR_HPP
00023 #define _NUMERICTYPECONSTUCTOR_HPP
00024 
00025 #include <xqilla/items/ItemConstructor.hpp>
00026 #include <xercesc/util/XercesDefs.hpp>
00027 #include <xqilla/ast/StaticType.hpp>
00028 #include <xqilla/mapm/m_apm.h>
00029 
00030 class XQILLA_API NumericTypeConstructor : public ItemConstructor {
00031 public:
00032   NumericTypeConstructor(const XMLCh* typeURI,
00033                          const XMLCh* typeName,
00034                          const MAPM& value,
00035                          AnyAtomicType::AtomicObjectType primitiveType,
00036                          XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *mm);
00037   virtual ~NumericTypeConstructor() {}
00038 
00039   virtual const StaticType &getStaticType() const { return _sType; }
00040 
00041   virtual Item::Ptr createItem(const DynamicContext* context) const;
00042   virtual void generateEvents(EventHandler *events, const DynamicContext* context) const;
00043   virtual std::string asString(const DynamicContext* context) const;
00044 
00045   virtual const XMLCh* getTypeURI() const { return _typeURI; }
00046   virtual const XMLCh* getTypeName() const { return _typeName; }
00047 
00048 private:
00049   const XMLCh *_typeURI;
00050   const XMLCh *_typeName;
00051   M_APM_struct _value;
00052   AnyAtomicType::AtomicObjectType _primitiveType;
00053   StaticType _sType;
00054 };
00055 
00056 #endif
00057 

Generated on Wed Nov 23 16:15:38 2011 for XQilla Simple API by  doxygen 1.4.7