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

#include <rcuconf/Config.h>

Inheritance diagram for RcuConf::Config:

RcuConf::Table

Detailed Description

Representation of entries in the Config table.
Examples:

createConfigs.cxx.

Definition at line 48 of file Config.h.

Public Types

typedef std::list< Config * > List

Public Member Functions

 Config (int tag, int x, int y, int z, int priority, const std::string &desc)
virtual ~Config ()
virtual void Print () const
virtual bool Insert (RcuDb::Server &s)
int Tag () const
int X () const
int Y () const
int Z () const
int PriorityId () const
int Version () const
const std::string & Description () const

Static Public Member Functions

bool Create (RcuDb::Server &s)
bool Drop (RcuDb::Server &s)
bool Select (List &l, RcuDb::Server &s, const RcuDb::Sql &cond)
bool Select (List &l, RcuDb::Server &s, int tag, int x, int y, int z)

Static Public Attributes

const std::string fgName

Protected Member Functions

 Config (RcuDb::Row &row)

Protected Attributes

int fTag
int fX
int fY
int fZ
int fPriorityId
int fVersion
std::string fDescription


Member Typedef Documentation

typedef std::list<Config*> RcuConf::Config::List
 

Type of List of configs.

Definition at line 76 of file Config.h.

Referenced by RcuConf::Configurator::GetCurrent(), Insert(), and Select().


Constructor & Destructor Documentation

RcuConf::Config::Config int  tag,
int  x,
int  y,
int  z,
int  priority,
const std::string &  desc
[inline]
 

User constructor.

Parameters:
tag Tag
x X coordinate
y Y coordinate
z Z coordinate
priority Reference to order table
desc Description

Definition at line 58 of file Config.h.

References fDescription, fPriorityId, fTag, fVersion, fX, fY, and fZ.

Referenced by Select().

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

Destructor.

Definition at line 73 of file Config.h.

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

Construct from a row.

Parameters:
row Row to construct from

Definition at line 36 of file Config.cxx.

References fDescription, fPriorityId, fTag, fVersion, fX, fY, and fZ.


Member Function Documentation

bool RcuConf::Config::Create RcuDb::Server &  s  )  [static]
 

Create a table for these objects.

Parameters:
s Server to create the table in

Definition at line 99 of file Config.cxx.

References fgName.

const std::string& RcuConf::Config::Description  )  const [inline]
 

Returns:
Description

Definition at line 119 of file Config.h.

References fDescription.

bool RcuConf::Config::Drop RcuDb::Server &  s  )  [static]
 

Delete table for these objects.

Parameters:
s Server to delete the table from

Definition at line 122 of file Config.cxx.

References fgName.

bool RcuConf::Config::Insert RcuDb::Server &  s  )  [virtual]
 

Insert this object into the database.

Parameters:
s Server to contact

Implements RcuConf::Table.

Examples:
createConfigs.cxx.

Definition at line 65 of file Config.cxx.

References fDescription, fgName, fPriorityId, fTag, fVersion, fX, fY, fZ, List, RcuConf::Table::MakeId(), and Select().

void RcuConf::Config::Print  )  const [virtual]
 

Print to standard out.

Definition at line 50 of file Config.cxx.

References fDescription, fPriorityId, fTag, fVersion, fX, fY, and fZ.

Referenced by RcuConf::Configurator::GetCurrent().

int RcuConf::Config::PriorityId  )  const [inline]
 

Returns:
Reference to priority

Definition at line 115 of file Config.h.

References fPriorityId.

Referenced by RcuConf::Priority::Select().

bool RcuConf::Config::Select List l,
RcuDb::Server &  s,
int  tag,
int  x,
int  y,
int  z
[static]
 

Query the database for objects of this type.

Parameters:
s Server to query
l Return list. The list is ordered by the version number in descending order (highest version number first).
tag Tag to search for
x X coordinate
y Y coordinate
z Z coordinate
Returns:
true on success, false otherwise

Definition at line 153 of file Config.cxx.

References List, and Select().

bool RcuConf::Config::Select List l,
RcuDb::Server &  s,
const RcuDb::Sql &  cond
[static]
 

Query the database for objects of this type.

Parameters:
s Server to query
l Return list
cond Optional condition
Returns:
List of objects of this type matching cond

Definition at line 129 of file Config.cxx.

References Config(), fgName, and List.

Referenced by Insert(), and Select().

int RcuConf::Config::Tag  )  const [inline]
 

Returns:
Tag identifier

Definition at line 107 of file Config.h.

References fTag.

int RcuConf::Config::Version  )  const [inline]
 

Returns:
Version number

Definition at line 117 of file Config.h.

References fVersion.

int RcuConf::Config::X  )  const [inline]
 

Returns:
X coordinate

Definition at line 109 of file Config.h.

References fX.

int RcuConf::Config::Y  )  const [inline]
 

Returns:
Y coordinate

Definition at line 111 of file Config.h.

References fY.

int RcuConf::Config::Z  )  const [inline]
 

Returns:
Z coordinate

Definition at line 113 of file Config.h.

References fZ.


Field Documentation

std::string RcuConf::Config::fDescription [protected]
 

Description.

Definition at line 140 of file Config.h.

Referenced by Config(), Description(), Insert(), and Print().

const std::string RcuConf::Config::fgName [static]
 

Table name.

Referenced by Create(), Drop(), Insert(), and Select().

int RcuConf::Config::fPriorityId [protected]
 

Reference to priority.

Definition at line 136 of file Config.h.

Referenced by Config(), Insert(), Print(), and PriorityId().

int RcuConf::Config::fTag [protected]
 

Tag.

Definition at line 128 of file Config.h.

Referenced by Config(), Insert(), Print(), and Tag().

int RcuConf::Config::fVersion [protected]
 

Version number.

Definition at line 138 of file Config.h.

Referenced by Config(), Insert(), Print(), and Version().

int RcuConf::Config::fX [protected]
 

X coordinate.

Definition at line 130 of file Config.h.

Referenced by Config(), Insert(), Print(), and X().

int RcuConf::Config::fY [protected]
 

Y coordinate.

Definition at line 132 of file Config.h.

Referenced by Config(), Insert(), Print(), and Y().

int RcuConf::Config::fZ [protected]
 

Z coordinate.

Definition at line 134 of file Config.h.

Referenced by Config(), Insert(), Print(), and Z().


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