Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

terimber_memlookup Class Reference

abstract interface to memory lookup More...

#include <memdbacc.h>

Inheritance diagram for terimber_memlookup:

memlookup

List of all members.

Public Member Functions

virtual bool assign (const terimber_memlookup &x)=0
 copy method lookups must be created for the same index
virtual bool reset (const terimber_db_value_vector *info)=0
 navigation methods
virtual bool next () const =0
 tries to find the next row according to lookup values
virtual bool prev () const =0
 tries to find the previous row according to lookup values
virtual bool get_value_is_null (size_t index) const =0
 checks if value is null
virtual bool get_value_as_bool (size_t index) const =0
 gets value as a boolean
virtual sb1_t get_value_as_char (size_t index) const =0
 gets value as a char
virtual ub1_t get_value_as_byte (size_t index) const =0
 gets value as a byte
virtual sb2_t get_value_as_short (size_t index) const =0
 gets value as a short
virtual ub2_t get_value_as_word (size_t index) const =0
 gets value as an unsigned short
virtual sb4_t get_value_as_long (size_t index) const =0
 gets value as a long
virtual ub4_t get_value_as_dword (size_t index) const =0
 gets value as an unsigned long
virtual float get_value_as_float (size_t index) const =0
 gets value as a float
virtual double get_value_as_double (size_t index) const =0
 gets value as a double
virtual sb8_t get_value_as_long64 (size_t index) const =0
 gets value as a int64
virtual ub8_t get_value_as_dword64 (size_t index) const =0
 gets value as an unsigned int64
virtual bool get_value_as_guid (size_t index, guid_t &val) const =0
 gets value as a guid for high performance we are using reference
virtual const char * get_value_as_numeric (size_t index, char delimeter) const =0
 gets value as a numeric delimeter defines the desirable delimeter sign
virtual const char * get_value_as_decimal (size_t index, char delimeter) const =0
 gets value as a decimal delimeter defines the desirable delimeter sign
virtual bool get_value_as_date (size_t index, ub4_t &year, ub1_t &month, ub1_t &day, ub1_t &hour, ub1_t &minute, ub1_t &second, ub2_t &millisec, ub1_t &wday, ub2_t &yday) const =0
 gets value as a date to avoid confusions with different date formats the functions returns parsed date
virtual const char * get_value_as_string (size_t index) const =0
 gets value as a string function returns the pointer to string
virtual const wchar_tget_value_as_wstring (size_t index) const =0
 gets value as a wide string function returns the pointer to wide string
virtual const ub1_tget_value_as_binary (size_t index, size_t &len) const =0
 gets value as a binary returns pointer to the raw bytes size of bytes is put to len
virtual const ub1_tget_value_as_binary_ptr (size_t index) const =0
 gets value as a binary pointer for reusing only the format of buffer is as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data
virtual bool insert_row (const terimber_db_value_vector *info)=0
 insert new row if the row is modified it will still have a status = new if the row is removed it's just deleted from recordset inserted row has all columns' value as null
virtual bool delete_row ()=0
 deletes existing row if row was in original recordset (modified or not), it will have a status = delete, and will not be accessible anymore deleting of new row will just remove row from recordset
virtual bool update_row (const terimber_db_value_vector *info)=0
 updates the column value update of new row will preserve status = new update of original row will change status from original to update.
virtual terimber_db_row_status get_row_status ()=0
 returns the current status user can't get the status of row already deleted however if lookup is created from empty index, then all rows are available to see including deleted ones

Protected Member Functions

virtual ~terimber_memlookup ()
 destructor users can't call destructor, memtable will take case about cleanup


Detailed Description

abstract interface to memory lookup

Definition at line 572 of file memdbacc.h.


Constructor & Destructor Documentation

virtual terimber_memlookup::~terimber_memlookup (  )  [inline, protected, virtual]

destructor users can't call destructor, memtable will take case about cleanup

Definition at line 578 of file memdbacc.h.


Member Function Documentation

virtual bool terimber_memlookup::assign ( const terimber_memlookup x  )  [pure virtual]

copy method lookups must be created for the same index

Parameters:
x  input lookup

Implemented in memlookup.

virtual bool terimber_memlookup::reset ( const terimber_db_value_vector info  )  [pure virtual]

navigation methods

sets lookup outside the row sequence and initializes the selection criteria

Parameters:
info  value vector

Implemented in memlookup.

virtual bool terimber_memlookup::next (  )  const [pure virtual]

tries to find the next row according to lookup values

Implemented in memlookup.

virtual bool terimber_memlookup::prev (  )  const [pure virtual]

tries to find the previous row according to lookup values

Implemented in memlookup.

virtual bool terimber_memlookup::get_value_is_null ( size_t  index  )  const [pure virtual]

checks if value is null

access to the row this is pretty much the same as db_server provides. returns the value of the column at the current row position if the index is out of range, then zero will be returned if the type is mismatched then an attempt to convert will be made the convertion of internal values is made on a temporary allocator the returned pointer is valid until next call the best practice to check type before call get value functions

Parameters:
index  index

Implemented in memlookup.

virtual bool terimber_memlookup::get_value_as_bool ( size_t  index  )  const [pure virtual]

gets value as a boolean

Parameters:
index  index

Implemented in memlookup.

virtual sb1_t terimber_memlookup::get_value_as_char ( size_t  index  )  const [pure virtual]

gets value as a char

Parameters:
index  index

Implemented in memlookup.

virtual ub1_t terimber_memlookup::get_value_as_byte ( size_t  index  )  const [pure virtual]

gets value as a byte

Parameters:
index  index

Implemented in memlookup.

virtual sb2_t terimber_memlookup::get_value_as_short ( size_t  index  )  const [pure virtual]

gets value as a short

Parameters:
index  index

Implemented in memlookup.

virtual ub2_t terimber_memlookup::get_value_as_word ( size_t  index  )  const [pure virtual]

gets value as an unsigned short

Parameters:
index  index

Implemented in memlookup.

virtual sb4_t terimber_memlookup::get_value_as_long ( size_t  index  )  const [pure virtual]

gets value as a long

Parameters:
index  index

Implemented in memlookup.

virtual ub4_t terimber_memlookup::get_value_as_dword ( size_t  index  )  const [pure virtual]

gets value as an unsigned long

Parameters:
index  index

Implemented in memlookup.

virtual float terimber_memlookup::get_value_as_float ( size_t  index  )  const [pure virtual]

gets value as a float

Parameters:
index  index

Implemented in memlookup.

virtual double terimber_memlookup::get_value_as_double ( size_t  index  )  const [pure virtual]

gets value as a double

Parameters:
index  index

Implemented in memlookup.

virtual sb8_t terimber_memlookup::get_value_as_long64 ( size_t  index  )  const [pure virtual]

gets value as a int64

Parameters:
index  index

Implemented in memlookup.

virtual ub8_t terimber_memlookup::get_value_as_dword64 ( size_t  index  )  const [pure virtual]

gets value as an unsigned int64

Parameters:
index  index

Implemented in memlookup.

virtual bool terimber_memlookup::get_value_as_guid ( size_t  index,
guid_t val 
) const [pure virtual]

gets value as a guid for high performance we are using reference

Parameters:
index  index

Implemented in memlookup.

virtual const char* terimber_memlookup::get_value_as_numeric ( size_t  index,
char  delimeter 
) const [pure virtual]

gets value as a numeric delimeter defines the desirable delimeter sign

Parameters:
index  index

Implemented in memlookup.

virtual const char* terimber_memlookup::get_value_as_decimal ( size_t  index,
char  delimeter 
) const [pure virtual]

gets value as a decimal delimeter defines the desirable delimeter sign

Parameters:
index  index

Implemented in memlookup.

virtual bool terimber_memlookup::get_value_as_date ( size_t  index,
ub4_t year,
ub1_t month,
ub1_t day,
ub1_t hour,
ub1_t minute,
ub1_t second,
ub2_t millisec,
ub1_t wday,
ub2_t yday 
) const [pure virtual]

gets value as a date to avoid confusions with different date formats the functions returns parsed date

Parameters:
index  index
year  [out] year [0-1000000]
month  [out] month [1-12]
day  [out] day [1-31]
hour  [out] hour [0-23]
minute  [out] minute [0-59]
second  [out] second [0-59]
millisec  [out] millisecond [0-999]
wday  [out] day of week [1-7]
yday  [out] day of year [1-366]

Implemented in memlookup.

virtual const char* terimber_memlookup::get_value_as_string ( size_t  index  )  const [pure virtual]

gets value as a string function returns the pointer to string

Parameters:
index  index

Implemented in memlookup.

virtual const wchar_t* terimber_memlookup::get_value_as_wstring ( size_t  index  )  const [pure virtual]

gets value as a wide string function returns the pointer to wide string

Parameters:
index  index

Implemented in memlookup.

virtual const ub1_t* terimber_memlookup::get_value_as_binary ( size_t  index,
size_t &  len 
) const [pure virtual]

gets value as a binary returns pointer to the raw bytes size of bytes is put to len

Parameters:
index  index

Implemented in memlookup.

virtual const ub1_t* terimber_memlookup::get_value_as_binary_ptr ( size_t  index  )  const [pure virtual]

gets value as a binary pointer for reusing only the format of buffer is as follows first size_t bytes the length of the rest of buffer, which contains the raw byte data

Parameters:
index  index

Implemented in memlookup.

virtual bool terimber_memlookup::insert_row ( const terimber_db_value_vector info  )  [pure virtual]

insert new row if the row is modified it will still have a status = new if the row is removed it's just deleted from recordset inserted row has all columns' value as null

row modificators the current row can be changed there are possible scenarios 1. insert the new row - it will become the current one 2. update the current row - it will be the same current row, even index columns are affected 3. delete the current row - the current row will the next to the current one or current will point to the out of row sequence

Parameters:
info  value vector

Implemented in memlookup.

virtual bool terimber_memlookup::delete_row (  )  [pure virtual]

deletes existing row if row was in original recordset (modified or not), it will have a status = delete, and will not be accessible anymore deleting of new row will just remove row from recordset

Implemented in memlookup.

virtual bool terimber_memlookup::update_row ( const terimber_db_value_vector info  )  [pure virtual]

updates the column value update of new row will preserve status = new update of original row will change status from original to update.

Parameters:
info  value vector

Implemented in memlookup.

virtual terimber_db_row_status terimber_memlookup::get_row_status (  )  [pure virtual]

returns the current status user can't get the status of row already deleted however if lookup is created from empty index, then all rows are available to see including deleted ones

so far the possible status changes are "original -> "update" "original -> "delete" "original -> "update" -> "delete" "new" will be always "new" unless row will be deleted, there will be no status so.

Implemented in memlookup.


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


© Copyright Terimber 2003-.