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

trigger.hxx

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------- 00002 * 00003 * FILE 00004 * pqxx/trigger.hxx 00005 * 00006 * DESCRIPTION 00007 * definition of the pqxx::trigger functor interface. 00008 * pqxx::trigger describes a database trigger to wait on, and what it does 00009 * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/trigger instead. 00010 * 00011 * Copyright (c) 2001-2004, Jeroen T. Vermeulen <jtv@xs4all.nl> 00012 * 00013 * See COPYING for copyright license. If you did not receive a file called 00014 * COPYING with this source code, please notify the distributor of this mistake, 00015 * or contact the author. 00016 * 00017 *------------------------------------------------------------------------- 00018 */ 00019 #include "pqxx/libcompiler.h" 00020 00021 #include <string> 00022 00023 #include "pqxx/connection_base" 00024 00025 00026 /* Methods tested in eg. self-test program test001 are marked with "//[t1]" 00027 */ 00028 00029 namespace pqxx 00030 { 00032 00050 class PQXX_LIBEXPORT trigger : public PGSTD::unary_function<int, void> 00051 { 00052 public: 00054 00058 trigger(connection_base &C, const PGSTD::string &N) : //[t4] 00059 m_Conn(C), m_Name(N) { m_Conn.AddTrigger(this); } 00060 00061 virtual ~trigger() throw () { m_Conn.RemoveTrigger(this); } //[t4] 00062 00063 const PGSTD::string &name() const { return m_Name; } //[t4] 00064 00066 00071 virtual void operator()(int be_pid) =0; //[t4] 00072 00073 00074 #ifdef PQXX_DEPRECATED_HEADERS 00075 00076 PGSTD::string Name() const { return name(); } 00077 #endif 00078 00079 protected: 00080 connection_base &Conn() const throw () { return m_Conn; } //[t23] 00081 00082 private: 00083 connection_base &m_Conn; 00084 PGSTD::string m_Name; 00085 }; 00086 00087 } 00088 00089

Generated on Mon Aug 9 01:47:24 2004 for libpqxx by doxygen 1.3.8