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

#include <BlobValue.h>

Inheritance diagram for RcuConf::BlobValue:

RcuConf::Value RcuConf::Table

Detailed Description

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

createValues.cxx.

Definition at line 53 of file BlobValue.h.

Public Types

typedef std::list< BlobValue * > List

Public Member Functions

template<typename T>  BlobValue (int config, int param, int address, const std::vector< T > &value)
virtual ~BlobValue ()
virtual void Print () const
virtual bool Insert (RcuDb::Server &s)
template<typename T> void Values (std::vector< T > &v) const
template<typename T> void Set (const std::vector< T > &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

 BlobValue (RcuDb::Row &row)

Protected Attributes

RcuDb::Blob fValue

Friends

class Value


Member Typedef Documentation

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

Type of List of addresss.

Reimplemented from RcuConf::Value.

Definition at line 74 of file BlobValue.h.

Referenced by Insert(), and Select().


Constructor & Destructor Documentation

template<typename T>
RcuConf::BlobValue::BlobValue int  config,
int  param,
int  address,
const std::vector< T > &  value
[inline]
 

User constructor.

Parameters:
config Reference to Config table
param Reference to Parameter table
address Reference to Address table
value Array of values (of type T) to store

Definition at line 63 of file BlobValue.h.

References fValue.

Referenced by Select().

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

Destructor.

Definition at line 71 of file BlobValue.h.

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

Construct from a row.

Parameters:
row Row to construct from

Definition at line 38 of file BlobValue.cxx.

References fValue.


Member Function Documentation

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

Create a table for these objects.

Parameters:
s Server to create the table in

Definition at line 80 of file BlobValue.cxx.

References fgName.

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

Delete table for these objects.

Parameters:
s Server to delete the table from

Definition at line 93 of file BlobValue.cxx.

References fgName.

bool RcuConf::BlobValue::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 BlobValue.cxx.

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

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

Print to standard out.

Reimplemented from RcuConf::Value.

Examples:
createValues.cxx.

Definition at line 46 of file BlobValue.cxx.

References fValue.

bool RcuConf::BlobValue::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 128 of file BlobValue.cxx.

References BlobValue(), fgName, and List.

bool RcuConf::BlobValue::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 118 of file BlobValue.cxx.

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

bool RcuConf::BlobValue::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 100 of file BlobValue.cxx.

References BlobValue(), fgName, and List.

Referenced by Insert(), and Select().

template<typename T>
void RcuConf::BlobValue::Set const std::vector< T > &  v  )  [inline]
 

Parameters:
v Values to set

Definition at line 128 of file BlobValue.h.

References fValue.

Referenced by RcuConf::Rcu::Read().

template<typename T>
void RcuConf::BlobValue::Values std::vector< T > &  v  )  const [inline]
 

Returns:
Version number

Definition at line 122 of file BlobValue.h.

References fValue.

Referenced by RcuConf::Rcu::Write().


Friends And Related Function Documentation

friend class Value [friend]
 

Base class is a friend.

Definition at line 141 of file BlobValue.h.


Field Documentation

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

Table name.

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

RcuDb::Blob RcuConf::BlobValue::fValue [protected]
 

Value of the parameter encoded as a blob integer.

Definition at line 139 of file BlobValue.h.

Referenced by BlobValue(), Insert(), Print(), Set(), 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