ALBA
albaQueryObject.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaQueryObject
5 Authors: Daniele Giunchi
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16
17#ifndef __albaQueryObject_H__
18#define __albaQueryObject_H__
19
20//----------------------------------------------------------------------------
21// Include:
22//----------------------------------------------------------------------------
23
24//----------------------------------------------------------------------------
25// forward references :
26//----------------------------------------------------------------------------
27
28//----------------------------------------------------------------------------
29// typedefs :
30//----------------------------------------------------------------------------
31
38{
39public :
41 albaQueryObject(const char* data):m_QueryData(data){};
43 void SetData(const char* data){m_QueryData = data;}
44
46 const char* GetValueAsString()
47 {
48 return m_QueryData.c_str();
49 }
52 {
53 return atoi(m_QueryData.c_str());
54 }
57 {
58 return atol(m_QueryData.c_str());
59 }
62 {
63 return atof(m_QueryData.c_str());
64 }
67 {
68 return atof(m_QueryData.c_str());
69 }
70
71protected:
72 std::string m_QueryData;
73};
74
75#endif //__albaQueryObject_H__
class name: albaQueryObject class dor handling a query data type (stored as std::string),...
std::string m_QueryData
int GetValueAsInt()
retrieve data as int
float GetValueAsFloat()
retrieve data as float
void SetData(const char *data)
set query data
const char * GetValueAsString()
retrieve data as const char pointer
long GetValueAsLong()
retrieve data as long
albaQueryObject(const char *data)
constructor
double GetValueAsDouble()
retrieve data as double