1 martin 1.9 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.10 //
|
3 martin 1.9 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.10 //
|
10 martin 1.9 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.10 //
|
17 martin 1.9 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.10 //
|
20 martin 1.9 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.10 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.9 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.10 //
|
28 martin 1.9 //////////////////////////////////////////////////////////////////////////
|
29 chuck 1.2 //
30 // Authors: David Rosckes (rosckes@us.ibm.com)
31 // Bert Rivero (hurivero@us.ibm.com)
32 // Chuck Carmack (carmack@us.ibm.com)
33 // Brian Lucier (lucier@us.ibm.com)
34 //
|
35 david.dillard 1.6 // Modified By: David Dillard, VERITAS Software Corp.
36 // (david.dillard@veritas.com)
|
37 chuck 1.2 //
38 //%/////////////////////////////////////////////////////////////////////////////
39 #ifndef Pegasus_CQLUtilities_h
40 #define Pegasus_CQLUtilities_h
41
42
|
43 david.dillard 1.6 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
44 chuck 1.2
|
45 david.dillard 1.6 #include <Pegasus/CQL/Linkage.h>
|
46 chuck 1.2
47 PEGASUS_NAMESPACE_BEGIN
48
49 // Forward declares
|
50 david.dillard 1.6 class String;
51
|
52 mike 1.8 class CQLUtilities
|
53 chuck 1.2 {
54 public:
55 static Uint64 stringToUint64(const String &stringNum);
56 static Sint64 stringToSint64(const String &stringNum);
57 static Real64 stringToReal64(const String &stringNum);
|
58 lucier 1.3
59 // This will take a formated string representing a real number and if
60 // it uses scientific notiation, then it will strip off leading 0's
61 // in the exponent. If the exponent only has 0's, then it will strip
62 // the exponent symbol also. (ie "2.56E-00" becomes "2.56"; "2.56E-04"
63 // becomes "2.56E-4". If there is no exponent, then nothing is changed.
64 // This will also remove a leading '+' sign from the exponent if it is
65 // there.
|
66 humberto 1.4 static String formatRealStringExponent(const String &realString);
|
67 ajay.rao 1.11 static const char KEY[];
68 static const char MSG[];
|
69 humberto 1.4 private:
70 // This is a helper function which checks if a string has a decimal
71 // point in it. If so, it calls it a real. In the case of a badly
72 // formated string, it will fail the format check in StringToReal64.
73 static Boolean isReal(const String &numString);
|
74 chuck 1.2 };
75
76 PEGASUS_NAMESPACE_END
77 #endif
|
78 david.dillard 1.6 #endif
|