OPeNDAP Hyrax Back End Server (BES)  Updated for version 3.8.3
CSV_Field.h
Go to the documentation of this file.
1 // CSV_Field.h
2 
3 // This file is part of bes, A C++ back-end server implementation framework
4 // for the OPeNDAP Data Access Protocol.
5 
6 // Copyright (c) 2004-2009 University Corporation for Atmospheric Research
7 // Author: Stephan Zednik <zednik@ucar.edu> and Patrick West <pwest@ucar.edu>
8 // and Jose Garcia <jgarcia@ucar.edu>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library 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 GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 //
24 // You can contact University Corporation for Atmospheric Research at
25 // 3080 Center Green Drive, Boulder, CO 80301
26 
27 // (c) COPYRIGHT University Corporation for Atmospheric Research 2004-2005
28 // Please read the full copyright statement in the file COPYRIGHT_UCAR.
29 //
30 // Authors:
31 // zednik Stephan Zednik <zednik@ucar.edu>
32 // pwest Patrick West <pwest@ucar.edu>
33 // jgarcia Jose Garcia <jgarcia@ucar.edu>
34 
35 #ifndef I_CSV_Field_h
36 #define I_CSV_Field_h 1
37 
38 #include <string>
39 
40 #include <BESObj.h>
41 
42 using namespace std;
43 
44 class CSV_Field : public BESObj
45 {
46 private:
47  string _name ;
48  string _type ;
49  int _index ;
50 public:
51  CSV_Field() { }
52  virtual ~CSV_Field() { }
53 
54  void insertName( const string& fieldName )
55  { _name = fieldName; }
56  void insertType( const string& fieldType )
57  { _type = fieldType; }
58  void insertIndex( const int& fieldIndex )
59  { _index = fieldIndex; }
60 
61  string getName() { return _name ; }
62  string getType() { return _type ; }
63  int getIndex() { return _index ; }
64 
65  virtual void dump( ostream &strm ) const
66  {
67  strm << BESIndent::LMarg
68  << "CSV_Field::dump - ("
69  << (void *)this << ")" << endl ;
71  strm << BESIndent::LMarg
72  << "name: " << _name << endl
74  << "type: " << _type << endl
76  << "index: " << _index << endl ;
78  }
79 } ;
80 
81 #endif // I_CSV_Field_h
82 
void insertIndex(const int &fieldIndex)
Definition: CSV_Field.h:58
string getType()
Definition: CSV_Field.h:62
STL namespace.
void insertType(const string &fieldType)
Definition: CSV_Field.h:56
static void Indent()
Definition: BESIndent.cc:38
CSV_Field()
Definition: CSV_Field.h:51
Base object for bes objects.
Definition: BESObj.h:52
static ostream & LMarg(ostream &strm)
Definition: BESIndent.cc:73
void insertName(const string &fieldName)
Definition: CSV_Field.h:54
virtual void dump(ostream &strm) const
dump the contents of this object to the specified ostream
Definition: CSV_Field.h:65
static void UnIndent()
Definition: BESIndent.cc:44
string getName()
Definition: CSV_Field.h:61
virtual ~CSV_Field()
Definition: CSV_Field.h:52
int getIndex()
Definition: CSV_Field.h:63