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

#include <SingleValue.h>

Inheritance diagram for RcuConf::SingleValue:

RcuConf::Value RcuConf::Table

Detailed Description

Values of parameters. Contains up to a single of data. How this is to be intepreted is up to the client.
Examples:

createValues.cxx.

Definition at line 51 of file SingleValue.h.

Public Types

typedef std::list< SingleValue * > List

Public Member Functions

 SingleValue (int config, int param, int address, int value)
virtual ~SingleValue ()
virtual void Print () const
virtual bool Insert (RcuDb::Server &s)
int Values () const
void Set (int v)

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, const Config &c, const Parameter &p, int addr=-1)
bool Select (List &l, RcuDb::Server &s, int c, int p, int addr=-1)

Static Public Attributes

const std::string fgName

Protected Member Functions

 SingleValue (RcuDb::Row &row)

Protected Attributes

int fValue

Friends

class Value


Member Typedef Documentation

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

Type of List of addresss.

Reimplemented from RcuConf::Value.

Definition at line 71 of file SingleValue.h.

Referenced by Insert(), and Select().


Constructor & Destructor Documentation

RcuConf::SingleValue::SingleValue int  config,
int  param,
int  address,
int  value
[inline]
 

User constructor.

Parameters:
config Reference to Config table
param Reference to Parameter table
address Reference to Address table
value Value to store

Definition at line 60 of file SingleValue.h.

References fValue.

Referenced by Select().

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

Destructor.

Definition at line 68 of file SingleValue.h.

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

Construct from a row.

Parameters:
row Row to construct from

Definition at line 38 of file SingleValue.cxx.

References fValue.


Member Function Documentation

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

Create a table for these objects.

Parameters:
s Server to create the table in

Definition at line 83 of file SingleValue.cxx.

References fgName.

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

Delete table for these objects.

Parameters:
s Server to delete the table from

Definition at line 97 of file SingleValue.cxx.

References fgName.

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

Insert this object into the database.

Parameters:
s Server to contact

Implements RcuConf::Table.

Examples:
createValues.cxx.

Definition at line 54 of file SingleValue.cxx.

References fgName, fValue, RcuConf::Value::fVersion, List, RcuConf::Table::MakeId(), Select(), and RcuConf::Value::ValueInsert().

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

Print to standard out.

Reimplemented from RcuConf::Value.

Examples:
createValues.cxx.

Definition at line 46 of file SingleValue.cxx.

References fValue.

bool RcuConf::SingleValue::Select List l,
RcuDb::Server &  s,
int  c,
int  p,
int  addr = -1
[static]
 

Query the database for objects of this type.

Parameters:
s Server to query
l Return list. The list is sorted according to the version number in descending order (highest version number first)
c Configuration entry to match
p Parameter entry to match.
addr Whether to only look for broadcast values (value $< 0$), non-broadcast values in general (value = 0), or a specific address (value $> 0$).
Returns:
List of objects of this type matching cond

Definition at line 132 of file SingleValue.cxx.

References fgName, List, and SingleValue().

bool RcuConf::SingleValue::Select List l,
RcuDb::Server &  s,
const Config c,
const Parameter p,
int  addr = -1
[static]
 

Query the database for objects of this type.

Parameters:
s Server to query
l Return list. The list is sorted according to the version number in descending order (highest version number first)
c Configuration entry to match
p Parameter entry to match.
addr Whether to only look for broadcast values (value $< 0$), non-broadcast values in general (value = 0), or a specific address (value $> 0$).
Returns:
List of objects of this type matching cond

Definition at line 122 of file SingleValue.cxx.

References RcuConf::Table::Id(), RcuConf::Parameter::IsBlob(), List, and Select().

bool RcuConf::SingleValue::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 104 of file SingleValue.cxx.

References fgName, List, and SingleValue().

Referenced by Insert(), and Select().

void RcuConf::SingleValue::Set int  v  )  [inline]
 

Parameters:
v Set value

Definition at line 119 of file SingleValue.h.

References fValue.

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

int RcuConf::SingleValue::Values  )  const [inline]
 

Returns:
Version number

Definition at line 117 of file SingleValue.h.

References fValue.

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


Friends And Related Function Documentation

friend class Value [friend]
 

Base class is a friend.

Definition at line 129 of file SingleValue.h.


Field Documentation

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

Table name.

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

int RcuConf::SingleValue::fValue [protected]
 

Value of the parameter encoded as a single integer.

Definition at line 127 of file SingleValue.h.

Referenced by Insert(), Print(), Set(), SingleValue(), and Values().


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