ColumnDef.h
Go to the documentation of this file.
1 #ifndef __DBICOLUMNDEF_HPP_
2 #define __DBICOLUMNDEF_HPP_
3 
4 #include <string>
5 
6 namespace nutools {
7  namespace dbi {
8 
9  /**
10  * Database Column Defintion Interface
11  *
12  * @author Jonathan Paley
13  * @version $Id: ColumnDef.h,v 1.0 2014/07/02 19:53:02 jpaley Exp $
14  */
15  class ColumnDef
16  {
17  public:
18  ColumnDef(std::string cname, std::string ctype);
19  ~ColumnDef();
20 
21  std::string Name() const { return fName;}
22  std::string Type() const { return fType;}
23  std::string Value() const { return fValue;}
24  bool CanBeNull() const { return fCanBeNull; }
25  float Tolerance() const { return fTolerance; }
26 
27  void SetName(std::string n) { fName = n; }
28  void SetType(std::string t) { fType = t; }
29  void SetValue(std::string v) { fValue = v; }
30  void SetCanBeNull(bool f) { fCanBeNull = f;}
31  void SetTolerance(float t) { fTolerance = t; }
32 
33  private:
34  bool fCanBeNull;
35  float fTolerance;
39 
40  }; // class end
41 
42 
43  } // namespace dbi close
44 } // namespace nutools close
45 
46 #endif
void SetName(std::string n)
Definition: ColumnDef.h:27
std::string string
Definition: nybbler.cc:12
Simple service to provide a RunHistory configured to the right run.
Definition: Column.cpp:14
void SetType(std::string t)
Definition: ColumnDef.h:28
ColumnDef(std::string cname, std::string ctype)
Definition: ColumnDef.cpp:6
std::void_t< T > n
std::string Type() const
Definition: ColumnDef.h:22
std::string fValue
Definition: ColumnDef.h:38
std::string Name() const
Definition: ColumnDef.h:21
void SetCanBeNull(bool f)
Definition: ColumnDef.h:30
bool CanBeNull() const
Definition: ColumnDef.h:24
std::string Value() const
Definition: ColumnDef.h:23
float Tolerance() const
Definition: ColumnDef.h:25
void SetTolerance(float t)
Definition: ColumnDef.h:31
void SetValue(std::string v)
Definition: ColumnDef.h:29