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

#include <Value.h>

Inheritance diagram for RcuConf::Value:

RcuConf::Table RcuConf::BlobValue RcuConf::SingleValue

Detailed Description

Values of parameters. This is technically not really a table. It's a base class for SingleValue and BlobValue tables.

Definition at line 50 of file Value.h.

Public Types

typedef std::list< Value * > List

Public Member Functions

 Value (int config, int param, int address)
virtual ~Value ()
virtual void Print () const
int ConfigId () const
int ParamId () const
int AddressId () const
int Version () const

Static Public Member Functions

bool Select (List &r, RcuDb::Server &s, const std::string &table, const RcuDb::Sql &cond)
bool Select (List &r, RcuDb::Server &s, const std::string &table, int config, int param, int addr=-1)

Protected Member Functions

RcuDb::Sql & ValueInsert (RcuDb::Sql &sql)
 Value (RcuDb::Row &row)

Static Protected Member Functions

bool Select (RcuDb::Result *&r, RcuDb::Server &s, const std::string &table, const RcuDb::Sql &cond)
bool Select (RcuDb::Result *&r, RcuDb::Server &s, const std::string &table, int config, int param, int addr=-1)
RcuDb::Sql & ValueCreate (RcuDb::Sql &sql)

Protected Attributes

int fConfigId
int fParamId
int fAddressId
int fVersion


Member Typedef Documentation

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

Type of a list of values.

Reimplemented in RcuConf::BlobValue, and RcuConf::SingleValue.

Definition at line 71 of file Value.h.

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


Constructor & Destructor Documentation

RcuConf::Value::Value int  config,
int  param,
int  address
[inline]
 

User constructor.

Parameters:
config Reference to Config table
param Reference to Parameter table
address Reference to Address table

Definition at line 57 of file Value.h.

References fAddressId, fConfigId, fParamId, and fVersion.

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

Destructor.

Definition at line 68 of file Value.h.

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

Construct from a row.

Parameters:
row Row to construct from

Definition at line 36 of file Value.cxx.

References fAddressId, fConfigId, fParamId, and fVersion.


Member Function Documentation

int RcuConf::Value::AddressId  )  const [inline]
 

Returns:
Y coordinate

Definition at line 81 of file Value.h.

References fAddressId.

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

int RcuConf::Value::ConfigId  )  const [inline]
 

Returns:
Tag identifier

Definition at line 77 of file Value.h.

References fConfigId.

int RcuConf::Value::ParamId  )  const [inline]
 

Returns:
X coordinate

Definition at line 79 of file Value.h.

References fParamId.

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

Print to standard out.

Reimplemented in RcuConf::BlobValue, and RcuConf::SingleValue.

Definition at line 47 of file Value.cxx.

References fAddressId, fConfigId, fParamId, and fVersion.

bool RcuConf::Value::Select RcuDb::Result *&  r,
RcuDb::Server &  s,
const std::string &  table,
int  config,
int  param,
int  addr = -1
[static, protected]
 

Select some rows from a table table and return result in r.

Parameters:
r On return, the result. The result is sorted by version number in descending order (most recent version first).
s The server to contact.
table The table to look in.
config Configuration identifier to match
param Parameter identifier 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:
true on success, false otherwise

Definition at line 143 of file Value.cxx.

References Select().

bool RcuConf::Value::Select RcuDb::Result *&  r,
RcuDb::Server &  s,
const std::string &  table,
const RcuDb::Sql &  cond
[static, protected]
 

Select some rows from a table table and return result in r.

Parameters:
r On return, the result
s The server to contact.
table The table to look in.
cond The optional condition to use.
Returns:
true on success, false otherwise

Definition at line 117 of file Value.cxx.

bool RcuConf::Value::Select List r,
RcuDb::Server &  s,
const std::string &  table,
int  config,
int  param,
int  addr = -1
[static]
 

Select some rows from a table table and return result in r.

Parameters:
r On return, the result. The result is sorted by version number in descending order (most recent version first).
s The server to contact.
table The table to look in.
config Configuration identifier to match
param Parameter identifier 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:
true on success, false otherwise

Definition at line 87 of file Value.cxx.

References List, and Select().

bool RcuConf::Value::Select List r,
RcuDb::Server &  s,
const std::string &  table,
const RcuDb::Sql &  cond
[static]
 

Select some rows from a table table and return result in r.

Parameters:
r On return, the result
s The server to contact.
table The table to look in.
cond The optional condition to use.
Returns:
true on success, false otherwise

Definition at line 58 of file Value.cxx.

References List.

Referenced by Select().

RcuDb::Sql & RcuConf::Value::ValueCreate RcuDb::Sql &  sql  )  [static, protected]
 

Create Value part of a create statement.

Parameters:
sql Statement to append to
Returns:
sql after appending

Definition at line 174 of file Value.cxx.

RcuDb::Sql & RcuConf::Value::ValueInsert RcuDb::Sql &  sql  )  [protected]
 

The value part of an insert.

Parameters:
sql SQL object to write to
Returns:
sql after appending value specific stuff

Definition at line 163 of file Value.cxx.

References fAddressId, fConfigId, fParamId, and fVersion.

Referenced by RcuConf::SingleValue::Insert(), and RcuConf::BlobValue::Insert().

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

Returns:
Version number

Definition at line 83 of file Value.h.

References fVersion.


Field Documentation

int RcuConf::Value::fAddressId [protected]
 

Reference to address row.

Definition at line 152 of file Value.h.

Referenced by AddressId(), Print(), Value(), and ValueInsert().

int RcuConf::Value::fConfigId [protected]
 

Reference to Value table.

Definition at line 148 of file Value.h.

Referenced by ConfigId(), Print(), Value(), and ValueInsert().

int RcuConf::Value::fParamId [protected]
 

Reference to Parameter table.

Definition at line 150 of file Value.h.

Referenced by ParamId(), Print(), Value(), and ValueInsert().

int RcuConf::Value::fVersion [protected]
 

Version number.

Automatically updated.

Definition at line 154 of file Value.h.

Referenced by RcuConf::SingleValue::Insert(), RcuConf::BlobValue::Insert(), Print(), Value(), ValueInsert(), and Version().


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