src/DAL/StatementStrings.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2008 by Sverre Rabbelier                                *
00003  *   sverre@rabbelier.nl                                                   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 3 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #pragma once
00022 
00030 #include "Types.h"
00031 
00035 class StatementStrings
00036 {
00037 public:
00039         StatementStrings() { }
00040         
00042         ~StatementStrings() { }
00043         
00045         cstring getErase() const {return m_erase;}
00046         
00048         cstring getInsert() const {return m_insert;}
00049         
00051         cstring getUpdate() const {return m_update;}
00052         
00054         cstring getSelect() const {return m_select;}
00055         
00057         cstring getLookup(FieldPtr field) {return m_lookup[field.get()];}
00058         
00060         cstring getList() const {return m_list;}
00061         
00062         
00064         void setErase(cstring erase) { m_erase = erase; }
00065         
00067         void setInsert(cstring insert) { m_insert = insert; }
00068         
00070         void setUpdate(cstring update) { m_update = update; }
00071         
00073         void setSelect(cstring select) { m_select = select; }
00074         
00076         void setLookup(FieldPtr field, cstring lookup) { Assert(field); m_lookup[field.get()] = lookup; }
00077         
00079         void setList(cstring list) { m_list = list; }
00080         
00081 private:
00082         typedef std::map<Field*, std::string> fieldmap; 
00084         std::string m_insert; 
00085         std::string m_erase; 
00086         std::string m_update; 
00087         std::string m_select; 
00088         fieldmap m_lookup; 
00089         std::string m_list; 
00090 };
00091 
00092 typedef SmartPtr<StatementStrings> StatementStringsPtr; 

Generated for UnsignedByte by  doxygen 1.5.3
SourceForge.net Logo