Adobe.com
Contents Suites Classes Class Index Member Index

IAIStringFormatUtils.h

Go to the documentation of this file.
00001 /*
00002  *        Name: IAIStringFormatUtils.h
00003  *   $Revision: 1 $
00004  *      Author:
00005  *        Date:
00006  *     Purpose: Interface to the wrapper class for AIStringFormatUtilsSuite & the
00007  *                              primary interface for the AI core to the ai::NumberFormat object.
00008  *
00009  * ADOBE SYSTEMS INCORPORATED
00010  * Copyright 2004-2007 Adobe Systems Incorporated.
00011  * All rights reserved.
00012  *
00013  * NOTICE:  Adobe permits you to use, modify, and distribute this file 
00014  * in accordance with the terms of the Adobe license agreement 
00015  * accompanying it. If you have received this file from a source other 
00016  * than Adobe, then your use, modification, or distribution of it 
00017  * requires the prior written permission of Adobe.
00018  *
00019  */
00020 
00021 
00022 #ifndef _IAISTRINGFORMATUTILS_H_
00023 #define _IAISTRINGFORMATUTILS_H_
00024 
00025 
00026 #include "IAIUnicodeString.h"
00027 #include "IAILocale.h"
00028 
00029 
00030 class CAINumberFormatImpl;
00031 
00032 namespace ai {
00033 
00037 class NumberFormat
00038 {
00039 public:
00040 
00046         explicit NumberFormat (void) AINOTHROW;
00047 
00053         explicit NumberFormat(const ai::LocaleID locale);
00054 
00058         NumberFormat(const NumberFormat& format);
00059 
00061         ~NumberFormat();
00062 
00063 private:
00068         NumberFormat(bool dummyUseDefaultFormatter);
00069 
00070 public:
00071 
00078         static NumberFormat getFormat(const ai::LocaleID locale = ai::Locale::kDefault);
00079 
00091         ai::UnicodeString& toString(const float value, const ai::int32 precision, ai::UnicodeString& str, bool padToPrecision = false);
00092 
00099         ai::UnicodeString& toString(const ai::int32 value, ai::UnicodeString& str);
00100 
00112         ai::UnicodeString& toString(const double value, const ai::int32 precision, ai::UnicodeString& str, bool padToPrecision = false);
00113 
00120         bool parseString(const ai::UnicodeString& str, float& value);
00121 
00128         bool parseString(const ai::UnicodeString& str, ai::int32& value);
00129 
00136         bool parseString(const ai::UnicodeString& str, double& value);
00137 
00139         ai::NumberFormat& operator= (const NumberFormat& rhs);
00140 
00145         ai::UnicodeString getDecimalSeparator();
00146 
00151         ai::UnicodeString getThousandsSeparator();
00152 
00153 public: // internal use public interface
00155         void deleteImpl();
00156 
00158         NumberFormat& assign (const NumberFormat& format);
00159 
00160 private:
00161 
00162         CAINumberFormatImpl* fImpl;
00163 
00164 };
00165 
00166 } // end of namespace ai
00167 
00168 #endif //_IAISTRINGFORMATUTILS_H_


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2016 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks