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

#include <Parameter.h>

Inheritance diagram for RcuConf::Parameter:

RcuConf::Table

Detailed Description

This table contains information about all possible parameters in the configurat.

Definition at line 48 of file Parameter.h.

Public Types

typedef std::list< Parameter * > List
enum  Where { kRcu, kBc, kAltro, kInvalid }

Public Member Functions

 Parameter (const std::string &name, Where dest, bool isBlob, unsigned int mask)
virtual ~Parameter ()
virtual void Print () const
virtual bool Insert (RcuDb::Server &s)
const std::string & Name () const
Where Destination () const
bool IsBlob () const
unsigned int Mask () 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, Where w, const std::string &name=std::string())

Static Public Attributes

const std::string fgName

Protected Member Functions

 Parameter (RcuDb::Row &row)

Protected Attributes

std::string fName
Where fDestination
bool fIsBlob
unsigned int fMask


Member Typedef Documentation

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

Type of List of parameters.

Definition at line 80 of file Parameter.h.

Referenced by Insert(), and Select().


Member Enumeration Documentation

enum RcuConf::Parameter::Where
 

Types of destinations.

Enumeration values:
kRcu  Parameter is for the RCU.
kBc  Parameter is for the BC.
kAltro  Parameter is for the ALTRO.
kInvalid  Invalid destination.

Definition at line 52 of file Parameter.h.

Referenced by Destination().


Constructor & Destructor Documentation

RcuConf::Parameter::Parameter const std::string &  name,
Where  dest,
bool  isBlob,
unsigned int  mask
[inline]
 

User constructor.

Parameters:
name Name of this parameter
dest Destination
isBlob Whether it's a blob parameterd parameter
mask Bit mask used for comparisons

Definition at line 68 of file Parameter.h.

References fDestination, fIsBlob, fMask, and fName.

Referenced by Select().

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

Destructor.

Definition at line 78 of file Parameter.h.

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

Construct from a row.

Parameters:
row Row to construct from

Definition at line 61 of file Parameter.cxx.

References fDestination, fIsBlob, fMask, and fName.


Member Function Documentation

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

Create a table for these objects.

Parameters:
s Server to create the table in

Definition at line 116 of file Parameter.cxx.

References fgName.

Where RcuConf::Parameter::Destination  )  const [inline]
 

Returns:
Destination for this parameter

Definition at line 111 of file Parameter.h.

References fDestination, and Where.

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

Delete table for these objects.

Parameters:
s Server to delete the table from

Definition at line 132 of file Parameter.cxx.

References fgName.

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

Insert this object into the database.

Parameters:
s Server to contact

Implements RcuConf::Table.

Definition at line 83 of file Parameter.cxx.

References fDestination, fgName, RcuConf::Table::fId, fIsBlob, fMask, fName, List, RcuConf::Table::MakeId(), and Select().

Referenced by RcuConf::Component::Create().

bool RcuConf::Parameter::IsBlob  )  const [inline]
 

Returns:
Whether this parameter has blob parameter

Definition at line 113 of file Parameter.h.

References fIsBlob.

Referenced by RcuConf::BusComponent::DoRead(), RcuConf::BusComponent::DoWrite(), RcuConf::Rcu::Read(), RcuConf::SingleValue::Select(), RcuConf::BlobValue::Select(), RcuConf::Rcu::Write(), and RcuConf::Configurator::Write().

unsigned int RcuConf::Parameter::Mask  )  const [inline]
 

Returns:
bit mask used for comparisons

Definition at line 115 of file Parameter.h.

References fMask.

const std::string& RcuConf::Parameter::Name  )  const [inline]
 

Returns:
Name of this parameter

Definition at line 109 of file Parameter.h.

References fName.

Referenced by RcuConf::BusComponent::DoRead(), RcuConf::BusComponent::DoWrite(), RcuConf::Rcu::Read(), RcuConf::Rcu::Write(), and RcuConf::Configurator::Write().

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

Print to standard out.

Definition at line 72 of file Parameter.cxx.

References fDestination, fIsBlob, fMask, and fName.

bool RcuConf::Parameter::Select List l,
RcuDb::Server &  s,
Where  w,
const std::string &  name = std::string()
[static]
 

Query the database for objects of this type.

Parameters:
s Server to query
l Return list
w Which destination.
name Name
Returns:
List of objects of this type matching cond

Definition at line 163 of file Parameter.cxx.

References List, and Select().

bool RcuConf::Parameter::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 139 of file Parameter.cxx.

References fgName, List, and Parameter().

Referenced by Insert(), and Select().


Field Documentation

Where RcuConf::Parameter::fDestination [protected]
 

Destination.

Definition at line 126 of file Parameter.h.

Referenced by Destination(), Insert(), Parameter(), and Print().

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

Table name.

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

bool RcuConf::Parameter::fIsBlob [protected]
 

Whether this has BLOB value.

Definition at line 128 of file Parameter.h.

Referenced by Insert(), IsBlob(), Parameter(), and Print().

unsigned int RcuConf::Parameter::fMask [protected]
 

Bit mask used for comparisions.

Definition at line 130 of file Parameter.h.

Referenced by Insert(), Mask(), Parameter(), and Print().

std::string RcuConf::Parameter::fName [protected]
 

Name of this parameter.

Definition at line 124 of file Parameter.h.

Referenced by Insert(), Name(), Parameter(), and Print().


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