00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef PQXX_TRIGGER_H
00015 #define PQXX_TRIGGER_H
00016
00017 #include <string>
00018
00019
00020
00021
00022 namespace pqxx
00023 {
00024
00026
00044 class PQXX_LIBEXPORT Trigger
00045 {
00046 public:
00048
00052 Trigger(Connection &C, const PGSTD::string &N) :
00053 m_Conn(C), m_Name(N) { m_Conn.AddTrigger(this); }
00054
00055 virtual ~Trigger() { m_Conn.RemoveTrigger(this); }
00056
00057 PGSTD::string Name() const { return m_Name; }
00058
00060
00065 virtual void operator()(int be_pid) =0;
00066
00067 protected:
00068 Connection &Conn() const throw () { return m_Conn; }
00069
00070 private:
00071 Connection &m_Conn;
00072 PGSTD::string m_Name;
00073 };
00074
00075 }
00076
00077
00078 #endif
00079