Class to contain a database record. More...
#include <rvc/dbtable.h>

Classes | |
| class | VALUE |
Public Types | |
| enum | FIELDFLAG { FIELDFLAG_None = 0x0000, FIELDFLAG_NaN = 0x0010, FIELDFLAG_NoUnitConv = 0x0020, FIELDFLAG_MultiKey = 0x0040, FIELDFLAG_LocalTime = 0x0080, FIELDFLAG_MemoEncoding = 0x8000 } |
Public Member Functions | |
| RECORD (const RVC::DBTABLE &table) | |
| RECORD (const RECORD &rhs) | |
| RECORD () | |
| virtual | ~RECORD () |
| ERRVALUE | AssignTable (const RVC::DBTABLE &table) |
| void | Clear () |
| void | ClearAttachment () |
| bool | CompareField (INT32 FieldNum, const RECORD &record, double threshhold=0.0) const |
| INT32 | CompareFieldOrdered (INT32 FieldNum, const RECORD &record, double threshhold=0.0) const |
| bool | CompareRecords (RECORD &rhs, double threshhold=0.0) |
| INT32 | ComputeHash () const |
| ERRVALUE | CopyMatchingFieldsTo (RECORD &DestRecord) const |
| ERRVALUE | CopyTo (RECORD &DestRecord) const |
| void | GetData (SIMPLE_ARRAY< UINT8 > &Data) const |
| const FIELDINFO & | GetFieldInfo (INT32 FieldNum) const |
| INT32 | GetRecordNumber () const |
| const DBTABLE * | GetTable () const |
| INT32 | GetTableNumber () const |
| ERRVALUE | GetValue (INT32 FieldNum, DATETIME &datetime) const |
| ERRVALUE | GetValue (INT32 FieldNum, COLOR &color) const |
| double | GetValue (INT32 FieldNum, FIELDFLAG FieldFlag=FIELDFLAG_None) const |
| ERRVALUE | GetValue (INT32 FieldNum, MISTRING &string, FIELDFLAG FieldFlag=FIELDFLAG_None, int DecimalPlaces=-1, const UNITCONV *UnitConv=0) const |
| ERRVALUE | GetValue (INT32 FieldNum, RECORD::VALUE &value, FIELDFLAG FieldFlag=FIELDFLAG_None) const |
| ERRVALUE | GetValueBinary (INT32 FieldNum, SIMPLE_ARRAY< UINT8 > &binary) const |
| ERRVALUE | GetValueImage (INT32 FieldNum, SPATMOD::IMAGE::STAGE *&pImage, bool bForThumbnail=false, INT32 MaxThumbnailSize=100) const |
| ERRVALUE | Initialize () |
| bool | IsAssigned () const |
| bool | operator!= (RECORD &rhs) |
| RECORD & | operator= (const RECORD &rhs) |
| bool | operator== (RECORD &rhs) |
| DEPRECATED void | SetData (const void *buf) |
| void | SetData (const SIMPLE_ARRAY< UINT8 > &Data) |
| ERRVALUE | SetKeyValues (INT32 StartFieldNum, const RECORD &SourceRecord) |
| ERRVALUE | SetValue (INT32 FieldNum, const RECORD &SourceRecord, INT32 SourceFieldNum) |
| void | SetValue (INT32 FieldNum, double value, bool NoUnitConv=false) |
| ERRVALUE | SetValue (INT32 FieldNum, const MISTRING &string, FIELDFLAG FieldFlag=FIELDFLAG_None, const UNITCONV *conv=0) |
| ERRVALUE | SetValue (INT32 FieldNum, const DATETIME &datetime) |
| ERRVALUE | SetValue (INT32 FieldNum, const COLOR &color) |
| ERRVALUE | SetValue (INT32 FieldNum, const RECORD::VALUE &value, FIELDFLAG FieldFlag=FIELDFLAG_None) |
| ERRVALUE | SetValueBinary (INT32 FieldNum, const SIMPLE_ARRAY< UINT8 > &binary) const |
Protected Member Functions | |
| void * | GetFieldPtr (INT32 FieldNum) |
| const void *const | GetFieldPtr (INT32 FieldNum) const |
| virtual bool | IsValidTable (const RVC::DBTABLE &) |
Class to contain a database record.
Flags for reading field methods (i.e. RVCDBTABLE::ReadField()).
| RVC::DBTABLE::RECORD::RECORD | ( | ) |
Default constructor.
| RVC::DBTABLE::RECORD::RECORD | ( | const RECORD & | rhs | ) |
Copy constructor.
| RVC::DBTABLE::RECORD::RECORD | ( | const RVC::DBTABLE & | table | ) |
Constructor from RVCDBTABLE - used to setup internal items.
| virtual RVC::DBTABLE::RECORD::~RECORD | ( | ) | [virtual] |
Destructor.
| ERRVALUE RVC::DBTABLE::RECORD::AssignTable | ( | const RVC::DBTABLE & | table | ) |
Initialize this record to work with this table, used to setup internal items.
| void RVC::DBTABLE::RECORD::Clear | ( | ) |
Clear the record.
| void RVC::DBTABLE::RECORD::ClearAttachment | ( | ) |
Clear attachment.
| bool RVC::DBTABLE::RECORD::CompareField | ( | INT32 | FieldNum, | |
| const RECORD & | record, | |||
| double | threshhold = 0.0 | |||
| ) | const |
Compare two entries in a field to determine if they are equal.
| INT32 RVC::DBTABLE::RECORD::CompareFieldOrdered | ( | INT32 | FieldNum, | |
| const RECORD & | record, | |||
| double | threshhold = 0.0 | |||
| ) | const |
Compare two entries in a field to determine sort order returns <0 if "this" is < record, >0 if this > record, = if same.
| bool RVC::DBTABLE::RECORD::CompareRecords | ( | RECORD & | rhs, | |
| double | threshhold = 0.0 | |||
| ) |
| INT32 RVC::DBTABLE::RECORD::ComputeHash | ( | ) | const |
Compute a hash value for the current record.
This is used by the database join code to quickly compare two records for equality.
Copy the fields that match in name and type from one record to another.
Unlike using the assignment operator, which assumes the same table (or at least same structure), this method will cope with the possibility that the source record may have different field sizes, indexes, count and offsets than the destination record.
Copy the field values from one record to another.
Unlike using the assignment operator, which assumes the same table (or at least same structure), this method will cope with the possibility that the source record may have different field sizes and offsets than the destination record. Note: it assumes that the records come from tables with the same number of fields and won't do any field reordering.
| void RVC::DBTABLE::RECORD::GetData | ( | SIMPLE_ARRAY< UINT8 > & | Data | ) | const |
Read an entire record into a byte array.
Obtain the RVC::DBTABLE::FIELDINFO for the specified field.
| void* RVC::DBTABLE::RECORD::GetFieldPtr | ( | INT32 | FieldNum | ) | [protected] |
| const void* const RVC::DBTABLE::RECORD::GetFieldPtr | ( | INT32 | FieldNum | ) | const [protected] |
| INT32 RVC::DBTABLE::RECORD::GetRecordNumber | ( | ) | const |
Get the current record number referred to by this instance.
| const DBTABLE* RVC::DBTABLE::RECORD::GetTable | ( | ) | const [inline] |
| INT32 RVC::DBTABLE::RECORD::GetTableNumber | ( | ) | const |
Get the current table number refered to by this instance.
Read the value of a Date or DateTime field.
Read the value of a COLOR field.
| double RVC::DBTABLE::RECORD::GetValue | ( | INT32 | FieldNum, | |
| FIELDFLAG | FieldFlag = FIELDFLAG_None | |||
| ) | const |
Read a field from this record and return a double.
| ERRVALUE RVC::DBTABLE::RECORD::GetValue | ( | INT32 | FieldNum, | |
| MISTRING & | string, | |||
| FIELDFLAG | FieldFlag = FIELDFLAG_None, |
|||
| int | DecimalPlaces = -1, |
|||
| const UNITCONV * | UnitConv = 0 | |||
| ) | const |
Read a field from this record into an MISTRING.
| ERRVALUE RVC::DBTABLE::RECORD::GetValue | ( | INT32 | FieldNum, | |
| RECORD::VALUE & | value, | |||
| FIELDFLAG | FieldFlag = FIELDFLAG_None | |||
| ) | const |
Read field from this record into a RECORD::VALUE.
| ERRVALUE RVC::DBTABLE::RECORD::GetValueBinary | ( | INT32 | FieldNum, | |
| SIMPLE_ARRAY< UINT8 > & | binary | |||
| ) | const |
Read a binary field from this record into a SIMPLE_ARRAY<UINT8> This will return an empty array if the field is not a FIELDINFO::TYPE_Binary.
| ERRVALUE RVC::DBTABLE::RECORD::GetValueImage | ( | INT32 | FieldNum, | |
| SPATMOD::IMAGE::STAGE *& | pImage, | |||
| bool | bForThumbnail = false, |
|||
| INT32 | MaxThumbnailSize = 100 | |||
| ) | const |
Read an image out of a field.
This will construct and return a SPATMOD::IMAGE::SOURCE from a field with USAGE_ImageBLOB or USAGE_ImageFile. The caller is responsible for freeing the stage when they're done with it.
If the bForThumbnail parameter, it will add a FILTER_ZOOM stage which will resize the image such that the maxium dimension is MaxThumbnailSize.
When requesting a thumbnail, if the field is followed by a field of USAGE_ImageThumbnail, it will use the thumbnail field instead of the requested field.
If the requested field doesn't have an image USAGE, this method will return EBadFuncParm.
| pImage | Image returned |
| ERRVALUE RVC::DBTABLE::RECORD::Initialize | ( | ) |
Initialize the record with the constraints set for the table.
| bool RVC::DBTABLE::RECORD::IsAssigned | ( | ) | const |
Determine if 'this' is assigned to a table.
| virtual bool RVC::DBTABLE::RECORD::IsValidTable | ( | const RVC::DBTABLE & | ) | [inline, protected, virtual] |
| bool RVC::DBTABLE::RECORD::operator!= | ( | RECORD & | rhs | ) | [inline] |
Inequality - compares if the information in the two records are not the same, including memo and computed fields.
| bool RVC::DBTABLE::RECORD::operator== | ( | RECORD & | rhs | ) |
Equality - compares if the information in the two records are the same, including memo and computed fields.
| DEPRECATED void RVC::DBTABLE::RECORD::SetData | ( | const void * | buf | ) |
Temprorary until all of the database editor is converted over.
Assumes the caller allocated the buffer to the correct size.
| void RVC::DBTABLE::RECORD::SetData | ( | const SIMPLE_ARRAY< UINT8 > & | Data | ) |
Write an entire record from a byte array.
Write a set of fields from another RECORD field to this record if the tables are related using the key field / next field association.
| ERRVALUE RVC::DBTABLE::RECORD::SetValue | ( | INT32 | FieldNum, | |
| const RECORD & | SourceRecord, | |||
| INT32 | SourceFieldNum | |||
| ) |
Write a field from another RECORD field to this record.
| void RVC::DBTABLE::RECORD::SetValue | ( | INT32 | FieldNum, | |
| double | value, | |||
| bool | NoUnitConv = false | |||
| ) |
Write a field from a double to this record.
| ERRVALUE RVC::DBTABLE::RECORD::SetValue | ( | INT32 | FieldNum, | |
| const MISTRING & | string, | |||
| FIELDFLAG | FieldFlag = FIELDFLAG_None, |
|||
| const UNITCONV * | conv = 0 | |||
| ) |
Write a field from a MISTRING to this record.
Write the value of a Date or DateTime field.
| ERRVALUE RVC::DBTABLE::RECORD::SetValue | ( | INT32 | FieldNum, | |
| const RECORD::VALUE & | value, | |||
| FIELDFLAG | FieldFlag = FIELDFLAG_None | |||
| ) |
Write a field from a RECORD::VALUE to this record.
| ERRVALUE RVC::DBTABLE::RECORD::SetValueBinary | ( | INT32 | FieldNum, | |
| const SIMPLE_ARRAY< UINT8 > & | binary | |||
| ) | const |
Write a binary field to this record from a SIMPLE_ARRAY<UINT8>.
1.6.1