Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

DSIGXPathHere.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2002-2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * XSEC
00019  *
00020  * DSIGXPathHere := Implementation of the "here()" XPath function.
00021  *
00022  * $Id: DSIGXPathHere.hpp,v 1.12 2005/05/15 05:18:40 blautenb Exp $
00023  *
00024  */
00025 
00026 #include <xsec/framework/XSECDefs.hpp>
00027 
00028 #include <xercesc/util/PlatformUtils.hpp>
00029 
00030 #ifndef XSEC_NO_XALAN
00031 
00032 #if defined(_MSC_VER)
00033 #   pragma warning(disable: 4267)
00034 #endif
00035 
00036 #include <xalanc/Include/PlatformDefinitions.hpp>
00037 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
00038 #include <xalanc/XPath/XObjectFactory.hpp>
00039 #include <xalanc/XalanDOM/XalanElement.hpp>
00040 #include <xalanc/XalanDOM/XalanNode.hpp>
00041 #include <xalanc/XalanDOM/XalanDocument.hpp>
00042 #include <xalanc/XPath/Function.hpp>
00043 #include <xalanc/XPath/XObjectTypeCallback.hpp>
00044 #include <xalanc/XPath/MutableNodeRefList.hpp>
00045 #include <xalanc/XPath/NodeRefListBase.hpp>
00046 
00047 #if defined(_MSC_VER)
00048 #   pragma warning(default: 4267)
00049 #endif
00050 
00051 // Namespace usage
00052 
00053 XALAN_USING_XALAN(Function);
00054 XALAN_USING_XALAN(XalanNode);
00055 XALAN_USING_XALAN(XPathExecutionContext);
00056 XALAN_USING_XALAN(XalanDOMString);
00057 XALAN_USING_XALAN(XObjectPtr);
00058 //XALAN_USING_XALAN(StaticStringToDOMString);
00059 
00060 #if defined XSEC_XALAN_REQS_MEMORYMANAGER
00061 // Xalan 1.9 and above
00062     XALAN_USING_XALAN(MemoryManagerType);
00063 #endif
00064 
00065 XSEC_USING_XERCES(Locator);
00066 
00067 #endif
00068 
00069 #ifndef XSEC_NO_XPATH
00070 
00071 // If there is no XPath then let's not even bother with this class.
00072 
00073 class DSIGXPathHere : public Function {
00074 
00075 private:
00076 
00077     XalanNode * XalanHereNode;
00078 
00079 public:
00080 
00081     typedef Function    ParentType;
00082 
00083     DSIGXPathHere();
00084     DSIGXPathHere(XalanNode *here);
00085 
00086     virtual
00087     ~DSIGXPathHere();
00088 
00089     // These methods are inherited from Function ...
00090 
00091     virtual XObjectPtr
00092     execute(
00093             XPathExecutionContext&  executionContext,
00094             XalanNode*              context,
00095             //const XObjectPtr      arg1,
00096             const LocatorType*      locator) const;
00097 
00098 #if !defined(XALAN_NO_USING_DECLARATION)
00099     using ParentType::execute;
00100 #endif
00101 
00102 #if defined(XSEC_NO_COVARIANT_RETURN_TYPE)
00103     virtual Function*
00104 #else
00105     virtual DSIGXPathHere*
00106 #endif
00107 #if defined (XSEC_XALAN_REQS_MEMORYMANAGER)
00108     clone(MemoryManagerType& theManager) const;
00109 #else
00110     clone() const;
00111 #endif
00112 
00113 protected:
00114 
00115     const XalanDOMString
00116 #if defined (XSEC_XALAN_REQS_MEMORYMANAGER)
00117     // We cheat - the memory manager happened at the same time as the string
00118     &getError(XalanDOMString& theBuffer) const;
00119 #else
00120     getError() const;
00121 #endif
00122 
00123 private:
00124 
00125     // Not implemented...
00126     DSIGXPathHere&
00127     operator=(const DSIGXPathHere&);
00128 
00129     bool
00130     operator==(const DSIGXPathHere&) const;
00131 };
00132 
00133 #endif
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 

Generated on Sun Jul 3 17:37:26 2005 for XML-Security-C by  doxygen 1.4.2