RcuConf::Table Class Reference
[Classes that correspond to tables]

#include <rcuconf/Table.h>

Inheritance diagram for RcuConf::Table:

RcuConf::Address RcuConf::Config RcuConf::Parameter RcuConf::Priority RcuConf::Value RcuConf::BlobValue RcuConf::SingleValue

Detailed Description

Base class for table entries.

Definition at line 43 of file Table.h.

Public Member Functions

virtual ~Table ()
virtual bool Insert (RcuDb::Server &server)=0
int Id () const

Static Public Member Functions

bool Drop (RcuDb::Server &server, const std::string &table)

Protected Member Functions

 Table ()
 Table (const Table &table)
 Table (RcuDb::Row &row)
bool MakeId (RcuDb::Server &server)

Protected Attributes

int fId


Constructor & Destructor Documentation

virtual RcuConf::Table::~Table  )  [inline, virtual]
 

Destructor.

Definition at line 47 of file Table.h.

RcuConf::Table::Table  )  [inline, protected]
 

Constructor.

Definition at line 62 of file Table.h.

References fId.

RcuConf::Table::Table const Table table  )  [inline, protected]
 

Copy constructor.

Definition at line 64 of file Table.h.

References fId.

RcuConf::Table::Table RcuDb::Row &  row  )  [protected]
 

Construct from a row.

Definition at line 34 of file Table.cxx.

References fId.


Member Function Documentation

bool RcuConf::Table::Drop RcuDb::Server &  server,
const std::string &  table
[static]
 

Helper function to drop this table.

Parameters:
server Server to contact
table Name of the table
Returns:
true on success, false otherwise

Definition at line 53 of file Table.cxx.

int RcuConf::Table::Id  )  const [inline]
 

Get the database id.

Returns:
the database id. If not set, returns -1

Definition at line 54 of file Table.h.

References fId.

Referenced by RcuConf::Configurator::GetOrder(), RcuConf::SingleValue::Select(), RcuConf::BlobValue::Select(), and RcuConf::Configurator::Write().

virtual bool RcuConf::Table::Insert RcuDb::Server &  server  )  [pure virtual]
 

Insert entry into table.

Parameters:
server Server to contact
Returns:
true on success, false otherwise

Implemented in RcuConf::Address, RcuConf::BlobValue, RcuConf::Config, RcuConf::Parameter, RcuConf::Priority, and RcuConf::SingleValue.

bool RcuConf::Table::MakeId RcuDb::Server &  server  )  [protected]
 

Make a unique id for this entry.

Parameters:
server Server to contact

Definition at line 42 of file Table.cxx.

References fId.

Referenced by RcuConf::SingleValue::Insert(), RcuConf::Priority::Insert(), RcuConf::Parameter::Insert(), RcuConf::Config::Insert(), RcuConf::BlobValue::Insert(), and RcuConf::Address::Insert().


Field Documentation

int RcuConf::Table::fId [protected]
 

Database id.

Definition at line 71 of file Table.h.

Referenced by Id(), RcuConf::Parameter::Insert(), RcuConf::Address::Insert(), MakeId(), and Table().


The documentation for this class was generated from the following files:
Top of page Last update Fri Apr 27 01:54:16 2007
Copyright © 2004 Christian Holm Created by DoxyGen 1.3.5