Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

pqxx-object/row_base.cc

Go to the documentation of this file.
00001 // database row base class                                       -*- C++ -*-
00002 // $Id: row_base.cc,v 1.2 2004/01/07 14:29:39 roger Exp $
00003 //
00004 // Copyright (C) 2003  Roger Leigh <rleigh@debian.org>
00005 //
00006 //
00007 // This program is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU General Public License as published by
00009 // the Free Software Foundation; either version 2 of the License, or
00010 // (at your option) any later version.
00011 //
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 
00021 #include <pqxx-object/row_base.h>
00022 
00023 using namespace pqxxobject;
00024 
00025 row_base::row_base():
00026   m_state(STATE_UNINITIALISED),
00027   m_modified(false)
00028 {
00029 }
00030 
00031 row_base::row_base(state status,
00032                    bool modified):
00033   m_state(status),
00034   m_modified(modified)
00035 {
00036 }
00037 
00038 row_base::row_base(const row_base& rhs):
00039   SigC::Object(),
00040   m_state(rhs.m_state),
00041   m_modified(rhs.m_modified)
00042 {
00043 }
00044 
00045 row_base::~row_base()
00046 {
00047 }
00048 
00049 row_base&
00050 row_base::operator = (const row_base& rhs)
00051 {
00052   m_state = rhs.m_state;
00053   m_modified = rhs.m_modified;
00054 }
00055 
00056 row_base::state
00057 row_base::get_state() const
00058 {
00059   return m_state;
00060 }
00061 
00062 bool
00063 row_base::is_modified() const
00064 {
00065   return m_modified;
00066 }
00067 
00068 void
00069 row_base::refresh()
00070 {
00071   refresh_impl();
00072   m_signal_refreshed.emit();
00073 }
00074 
00075 void
00076 row_base::insert()
00077 {
00078   insert_impl();
00079   m_signal_inserted.emit();
00080 }
00081 
00082 void
00083 row_base::update()
00084 {
00085   update_impl();
00086   m_signal_updated.emit();
00087 }
00088 
00089 void
00090 row_base::erase()
00091 {
00092   erase_impl();
00093   m_signal_erased.emit();
00094 }
00095 
00096 SigC::Signal0<void>&
00097 row_base::signal_changed()
00098 {
00099   return m_signal_changed;
00100 }
00101 
00102 SigC::Signal0<void>&
00103 row_base::signal_refreshed()
00104 {
00105   return m_signal_refreshed;
00106 }
00107 
00108 SigC::Signal0<void>&
00109 row_base::signal_inserted()
00110 {
00111   return m_signal_inserted;
00112 }
00113 
00114 SigC::Signal0<void>&
00115 row_base::signal_updated()
00116 {
00117   return m_signal_updated;
00118 }
00119 
00120 SigC::Signal0<void>&
00121 row_base::signal_erased()
00122 {
00123   return m_signal_erased;
00124 }
00125 
00126 void
00127 row_base::refresh_impl()
00128 {
00129 }
00130 
00131 void
00132 row_base::insert_impl()
00133 {
00134 }
00135 
00136 void
00137 row_base::update_impl()
00138 {
00139 }
00140 
00141 void
00142 row_base::erase_impl()
00143 {
00144 }

Generated on Sat Jan 17 20:58:42 2004 for pqxx-object API Reference by doxygen 1.3.4