Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XalanNumberFormat.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2004 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 #if !defined(XALANNUMBERFORMAT_HEADER_GUARD_1357924680)
00017 #define XALANNUMBERFORMAT_HEADER_GUARD_1357924680
00018 
00019 
00020 
00021 // Base include file.  Must be first.
00022 #include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
00023 
00024 
00025 
00026 #include <xalanc/XalanDOM/XalanDOMString.hpp>
00027 
00028 
00029 
00030 XALAN_CPP_NAMESPACE_BEGIN
00031 
00032 
00033 
00034 class XALAN_PLATFORMSUPPORT_EXPORT XalanNumberFormat
00035 {
00036 public:
00037 
00038     explicit
00039     XalanNumberFormat(MemoryManagerType&      theManager);
00040 
00041     static XalanNumberFormat*
00042     create(MemoryManagerType&      theManager)
00043     {
00044         XalanNumberFormat*  theInstance;
00045 
00046         return XalanConstruct(
00047                     theManager,
00048                     theInstance,
00049                     theManager);
00050     }
00051 
00052     virtual
00053     ~XalanNumberFormat();
00054 
00055     MemoryManagerType&
00056     getMemoryManager()
00057     {
00058         return m_groupingSeparator.getMemoryManager();
00059     }
00060 
00067     virtual XalanDOMString&
00068     format(double   theValue,
00069             XalanDOMString&     theResult);
00070 
00071 
00072 
00079     virtual XalanDOMString&
00080     format(int  theValue,
00081             XalanDOMString&     theResult);
00082 
00083 
00084 
00091     virtual XalanDOMString&
00092     format(
00093             unsigned int        theValue,
00094             XalanDOMString&     theResult);
00095 
00102     virtual XalanDOMString&
00103     format(long     theValue,
00104             XalanDOMString&     theResult);
00105 
00106 
00113     virtual XalanDOMString&
00114     format(
00115             unsigned long       theValue,
00116             XalanDOMString&     theResult);
00117 
00123     virtual bool
00124     isGroupingUsed() const;
00125 
00131     virtual void
00132     setGroupingUsed(bool bUsed);
00133 
00139     virtual void
00140     setGroupingSize(unsigned long   size);
00141 
00148     virtual void
00149     setGroupingSeparator(const XalanDOMString&  s);
00150 
00151 protected:
00152 
00153     void
00154     applyGrouping(
00155             const XalanDOMString&       value,
00156             XalanDOMString&             result);
00157 
00158 private:
00159 
00160     // Not implemented...
00161     XalanNumberFormat(const XalanNumberFormat&);
00162 
00163     XalanNumberFormat&
00164     operator=(const XalanNumberFormat&);
00165 
00166     bool
00167     operator==(const XalanNumberFormat&);
00168 
00169     // Data members...
00170     bool                        m_isGroupingUsed;
00171 
00172     XalanDOMString              m_groupingSeparator;
00173 
00174     unsigned long               m_groupingSize;
00175 
00176     static const XalanDOMChar   s_defaultGroupingSeparator[];
00177 };
00178 
00179 
00180 
00181 XALAN_CPP_NAMESPACE_END
00182 
00183 
00184 
00185 #endif  // XALANNUMBERFORMAT_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo