dballe::Record Class Reference

#include <record.h>


Detailed Description

Wrap a dba_record.

Public Types

typedef Var value_type
typedef RecordIterator iterator
typedef RecordVarIterator var_iterator

Public Member Functions

 Record (dba_record rec)
 Wraps an existing dba_record, taking charge of memory allocation.
 Record (const Record &rec)
 Copy constructor.
 Record ()
 Create an empty record.
Recordoperator= (const Record &rec)
 Assignment with value copy semantics.
Record copy () const
 Create a copy of this record.
void add (const Record &rec)
 Add to this record the contents of another record.
Record difference (const Record &rec) const
 Create a record with only those fields that change this record into the given record.
bool equals (const Record &rec) const
 Check if the two records have the same content.
void clear ()
 Completely empty the record.
void clearVars ()
 Remove all the variables from the record, but leave the context information.
bool contains (const std::string &parm) const
 Check if the record contains the given parameter or value.
bool contains (dba_keyword parameter) const
 Check if the record contains the given parameter.
bool contains (dba_varcode code) const
 Check if the record contains the given value.
Var enq (const std::string &parm) const
 Get the Var representation of a parameter or value.
Var operator[] (const std::string &parm) const
 enq as operator[]
Var enq (dba_keyword parameter) const
 Get the Var representation of a parameter.
Var operator[] (dba_keyword parameter) const
 keyEnq as operator[]
Var enq (dba_varcode code) const
 Get the Var representation of a value.
Var operator[] (dba_varcode code) const
 varEnq as operator[]
int enqi (const std::string &parm) const
 Get the unscaled integer representation of a parameter or value.
int enqi (dba_keyword parameter) const
 Get the unscaled integer representation of a parameter.
int enqi (dba_varcode code) const
 Get the unscaled integer representation of a value.
int enqi_ifset (const std::string &parm, bool &found) const
 Get the unscaled integer representation of a parameter or value.
int enqi_ifset (dba_keyword parameter, bool &found) const
 Get the unscaled integer representation of a parameter.
int enqi_ifset (dba_varcode code, bool &found) const
 Get the unscaled integer representation of a value.
double enqd (const std::string &parm) const
 Get the double representation of a parameter or value.
double enqd (dba_keyword parameter) const
 Get the double representation of a parameter.
double enqd (dba_varcode code) const
 Get the double representation of a value.
double enqd_ifset (const std::string &parm, bool &found) const
 Get the double representation of a parameter or value.
double enqd_ifset (dba_keyword parameter, bool &found) const
 Get the double representation of a parameter.
double enqd_ifset (dba_varcode code, bool &found) const
 Get the double representation of a value.
const char * enqc (const std::string &parm) const
 Get the string representation of a parameter or value (NULL is returned if unset).
const char * enqc (dba_keyword parameter) const
 Get the string representation of a parameter (NULL is returned if unset).
const char * enqc (dba_varcode code) const
 Get the string representation of a value (NULL is returned if unset).
const char * enqc_ifset (const std::string &parm) const
 Get the string representation of a parameter or value (NULL is returned if unset).
const char * enqc_ifset (dba_keyword parameter) const
 Get the string representation of a parameter (NULL is returned if unset).
const char * enqc_ifset (dba_varcode code) const
 Get the string representation of a value (NULL is returned if unset).
std::string enqs (const std::string &parm) const
 Get the string representation of a parameter or value.
std::string enqs (dba_keyword parameter) const
 Get the string representation of a parameter.
std::string enqs (dba_varcode code) const
 Get the string representation of a value.
std::string enqs_ifset (const std::string &parm, bool &found) const
 Get the string representation of a parameter or value.
std::string enqs_ifset (dba_keyword parameter, bool &found) const
 Get the string representation of a parameter.
std::string enqs_ifset (dba_varcode code, bool &found) const
 Get the string representation of a value.
void set (const std::string &parm, const Var &var)
 Set a parameter or value from a Var.
void keySet (dba_keyword parameter, const Var &var)
 Set a parameter from a Var.
void varSet (dba_varcode code, const Var &var)
 Set a value from a Var.
void set (const Var &var)
 Set a value from a Var.
void varSet (const Var &var)
 Set a value from a Var.
void set (const std::string &parm, int value)
 Set a parameter or value from an unscaled int.
void seti (const std::string &parm, int value)
 Set a parameter or value from an unscaled int.
void keySet (dba_keyword parameter, int value)
 Set a parameter from an unscaled int.
void keySeti (dba_keyword parameter, int value)
 Set a parameter from an unscaled int.
void varSet (dba_varcode code, int value)
 Set a value from an unscaled int.
void varSeti (dba_varcode code, int value)
 Set a value from an unscaled int.
void set (const std::string &parm, double value)
 Set a parameter or value from a double.
void setd (const std::string &parm, double value)
 Set a parameter or value from a double.
void keySet (dba_keyword parameter, double value)
 Set a parameter from a double.
void keySetd (dba_keyword parameter, double value)
 Set a parameter from a double.
void varSet (dba_varcode code, double value)
 Set a value from a double.
void varSetd (dba_varcode code, double value)
 Set a value from a double.
void set (const std::string &parm, const char *value)
 Set a parameter or value from a string.
void setc (const std::string &parm, const char *value)
 Set a parameter or value from a string.
void keySet (dba_keyword parameter, const char *value)
 Set a parameter from a string.
void keySetc (dba_keyword parameter, const char *value)
 Set a parameter from a string.
void varSet (dba_varcode code, const char *value)
 Set a value from a string.
void varSetc (dba_varcode code, const char *value)
 Set a value from a string.
void set (const std::string &parm, const std::string &value)
 Set a parameter or value from a string.
void sets (const std::string &parm, const std::string &value)
 Set a parameter or value from a string.
void keySet (dba_keyword parameter, const std::string &value)
 Set a parameter from a string.
void keySets (dba_keyword parameter, const std::string &value)
 Set a parameter from a string.
void varSet (dba_varcode code, const std::string &value)
 Set a value from a string.
void varSets (dba_varcode code, const std::string &value)
 Set a value from a string.
void setFromString (const std::string &assignment)
 Set a record parameter or value from a string in the form "parm=val" or "Bxxyyy=val".
void unset (const std::string &parm)
 Unset a parameter or value.
void keyUnset (dba_keyword parameter)
 Unset a parameter.
void varUnset (dba_varcode code)
 Unset a value.
void setAnaContext ()
 Set the record parameters to represent the pseudoana context.
const dba_record rec () const
 Return the underlying dba_record.
dba_record rec ()
 Return the underlying dba_record.
void dumpToStderr ()
 Dump the record contents to standard error.
iterator begin ()
 Iterators on all the contents.
iterator end ()
 Iterators on all the contents.
var_iterator varbegin ()
 Iterators on the values.
var_iterator varend ()
 Iterators on the values.

The documentation for this class was generated from the following file:

Generated on Fri Aug 1 15:23:03 2008 for dballe++ by  doxygen 1.5.6