casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LongWrapper.h
Go to the documentation of this file.
1 /*
2  * ALMA - Atacama Large Millimeter Array
3  * (c) European Southern Observatory, 2002
4  * (c) Associated Universities Inc., 2002
5  * Copyright by ESO (in the framework of the ALMA collaboration),
6  * Copyright by AUI (in the framework of the ALMA collaboration),
7  * All rights reserved.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY, without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22  * MA 02111-1307 USA
23  *
24  * File Long.h
25  */
26 # ifndef Long_CLASS
27 # define Long_CLASS
29 
30 #include <stdint.h>
31 #include <string>
32 
33 namespace asdm {
38 class Long {
39 
40 public:
47  static int64_t parseLong(const std::string &s) throw (NumberFormatException);
48 
54  static std::string toString(int64_t l);
55 
56 
60  static const int64_t MIN_VALUE;
61 
65  static const int64_t MAX_VALUE;
66 
67 };
68 
69 } // End namespace asdm
70 
71 #endif /* Long_CLASS */
static int64_t parseLong(const std::string &s)
Parse a string supposed to represent a int64_t value and returns this value.
static const int64_t MAX_VALUE
The maximum value for a int64_t.
Definition: LongWrapper.h:65
The NumberFormatException class represents an exception when an error occurs in converting a numeric ...
static std::string toString(int64_t l)
Encode a int64_t value into its string representation.
A collection of static methods to perform conversions between strings and int64_t values...
Definition: LongWrapper.h:38
static const int64_t MIN_VALUE
The minimum value for a int64_t.
Definition: LongWrapper.h:60