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

pqxxobject/field_base.cc

Go to the documentation of this file.
00001 // database field base class                                     -*- C++ -*-
00002 // $Id: field_base.cc,v 1.2 2004/04/01 10:13:09 roger Exp $
00003 //
00004 // Copyright (C) 2003  Roger Leigh <rleigh@debian.org>
00005 //
00006 //
00007 //  All rights reserved.
00008 //
00009 //  Redistribution and use in source and binary forms, with or without
00010 //  modification, are permitted provided that the following conditions
00011 //  are met:
00012 //
00013 //  * Redistributions of source code must retain the above copyright
00014 //    notice, this list of conditions and the following disclaimer.
00015 //  * Redistributions in binary form must reproduce the above
00016 //    copyright notice, this list of conditions and the following
00017 //    disclaimer in the documentation and/or other materials provided
00018 //    with the distribution.
00019 //  * Neither the name of the author, nor the names of other
00020 //    contributors may be used to endorse or promote products derived
00021 //    from this software without specific prior written permission.
00022 //
00023 //  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
00024 //  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
00025 //  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00026 //  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00027 //  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
00028 //  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00029 //  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
00030 //  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00031 //  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00032 //  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
00033 //  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00034 //  THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00035 //  SUCH DAMAGE.
00036 //
00038 
00039 #include <pqxxobject/field_base.h>
00040 
00041 using namespace pqxxobject;
00042 
00043 field_base::field_base():
00044   m_column_name(),
00045   m_signal_changed()
00046 {
00047 }
00048 
00049 field_base::field_base(const std::string& column_name):
00050   m_column_name(column_name),
00051   m_signal_changed()
00052 {
00053 }
00054 
00055 
00056 field_base::field_base(const field_base& rhs):
00057   m_column_name(rhs.m_column_name),
00058   m_signal_changed()
00059 {
00060 }
00061 
00062 field_base::~field_base()
00063 {
00064 }
00065 
00066 field_base&
00067 field_base::operator = (const field_base& rhs)
00068 {
00069   // Don't assign the column name, since this could cause undesirable
00070   // side effects (differently-named columns could quite legitimately
00071   // have their values assigned to one another).
00072   return *this;
00073 }
00074 
00075 const std::string&
00076 field_base::get_column_name() const
00077 {
00078   return m_column_name;
00079 }
00080 
00081 void
00082 field_base::set_column_name(const std::string& column_name)
00083 {
00084   m_column_name = column_name;
00085 }
00086 
00087 
00088 SigC::Signal0<void>&
00089 field_base::signal_changed()
00090 {
00091   return m_signal_changed;
00092 }
00093 

Generated on Sat May 22 18:33:56 2004 for pqxxobject API Reference by doxygen 1.3.6-20040222