Logo
~Sockets~
~Examples~
~Contact~


db::Table Class Reference

Database table base class. More...

#include <Table.h>

Inheritance diagram for db::Table:

Inheritance graph
[legend]
Collaboration diagram for db::Table:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Table (Database &)
virtual ~Table ()
DatabaseGetDatabase ()
virtual void save ()=0

Protected Member Functions

virtual void Spawn (const std::string &)=0
std::string sqlsafe (const std::string &)

Protected Attributes

bool m_new

Private Attributes

Databasem_db

Detailed Description

Database table base class.

Definition at line 30 of file Table.h.


Constructor & Destructor Documentation

db::Table::Table ( Database  ) 

Definition at line 28 of file Table.cpp.

References m_new.

00028                          : m_db(db)
00029 {
00030         m_new = true;
00031 }

db::Table::~Table (  )  [virtual]

Definition at line 34 of file Table.cpp.

00035 {
00036 }


Member Function Documentation

Database* db::Table::GetDatabase (  )  [inline]

Definition at line 36 of file Table.h.

References m_db.

Referenced by db::Sender::save(), db::Mailinst::save(), db::Sender::Spawn(), and db::Mailinst::Spawn().

00036 { return &m_db; }

virtual void db::Table::save (  )  [pure virtual]

Implemented in db::Mailinst, and db::Sender.

virtual void db::Table::Spawn ( const std::string &   )  [protected, pure virtual]

Implemented in db::Mailinst, and db::Sender.

std::string db::Table::sqlsafe ( const std::string &   )  [protected]

Definition at line 39 of file Table.cpp.

Referenced by db::Mailinst::Mailinst(), db::Sender::save(), db::Mailinst::save(), and db::Sender::Sender().

00040 {
00041         std::string str;
00042         for (size_t i = 0; i < input.size(); i++)
00043         {
00044                 if (input[i] == '\'')
00045                         str += "'";
00046                 str += input[i];
00047         }
00048         return str;
00049 }


Member Data Documentation

Definition at line 47 of file Table.h.

Referenced by GetDatabase().


The documentation for this class was generated from the following files:
Page, code, and content Copyright (C) 2006 by Anders Hedström
Generated on Mon Aug 29 20:21:47 2005 for C++ Sockets by  doxygen 1.4.4