paramxx  1.0.7
LongPar.h
1 #ifndef LONGPAR_H
2 #define LONGPAR_H
3 
4 // --8<--8<--8<--8<--
5 //
6 // Copyright (C) 2006 Smithsonian Astrophysical Observatory
7 //
8 // This file is part of paramxx
9 //
10 // paramxx is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU General Public License
12 // as published by the Free Software Foundation; either version 2
13 // of the License, or (at your option) any later version.
14 //
15 // paramxx is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program; if not, write to the
22 // Free Software Foundation, Inc.
23 // 51 Franklin Street, Fifth Floor
24 // Boston, MA 02110-1301, USA
25 //
26 // -->8-->8-->8-->8--
27 
28 #include "Par.h"
29 
35 class LongPar : public Par {
36 
37 public:
38 
39  ~LongPar( ) { }
40 
41  LongPar( ) : Par( ) { }
42 
46  LongPar( const LongPar& par ) : Par( par ) { }
47 
48  // constructor
49  LongPar( ParTxt& par ) throw ( ParFileException, Exception );
50 
51  int pgeti( ) const throw ( ParFileException );
52 
53  long pgetl( ) const throw ( ParFileException ) {
54  return atol( parameter[ PARVALUE ].c_str( ) );
55  }
56 
57  void set_val( const string& str ) throw ( ParFileException, Exception );
58 
59 private:
60 
61  void between_limits( const string& t ) const
62  throw ( ParFileException, Exception );
63 
64  void validate( const string& ) const throw ( ParFileException );
65 
66 };
67 
68 #endif
Definition: Par.h:41
Definition: ParFileException.h:33
LongPar(const LongPar &par)
Definition: LongPar.h:46
long pgetl() const
only defined in LongPar
Definition: LongPar.h:53
Definition: LongPar.h:35
Par(void)
Definition: Par.h:94
Definition: Par.h:72
A class to handle the Param library specific string manipulation.
Definition: ParTxt.h:31
int pgeti() const
only defined in RealPar
Definition: LongPar.cc:100