#include <vdbl_col.h>
Public Types | |
typedef _TT | return_type |
return_type is the type of object stored | |
Public Member Functions | |
_Self * | new_copy () const |
void | set (const _Self &_p) |
void | set (const type &__t) |
void | setcontext (const context *_c, const _VDBL_row *_r) |
void | get (type &c) const |
void | def (type &d) const |
void | get_copy (_VDBL_alltype_base *&v) const |
void | def_copy (return_type *&d) const |
void | def_copy (_VDBL_alltype_base *&v) const |
void | set_default (const type &__t) |
const type & | get_val () const |
std::ostream & | print_contents (std::ostream &o) const |
virtual const std::type_info & | return_type_id () const |
_VDBL_stdcol<_TT>
.
Definition at line 597 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::def | ( | type & | d | ) | const [inline, inherited] |
the default for the constant value coincides with the value, since in the table definition the reference object of this class will hold the default, then. There have to be different access methods get
and def
for more complicated column types
Definition at line 454 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::def_copy | ( | _VDBL_alltype_base *& | v | ) | const [inline, virtual, inherited] |
This version of get_copy
returns a copy of the columns default value within an alltype
. This is useful for passing on column values. It can also be used to circumvent the strict run-time type checking. The user is, however, DISCOURAGED to do so.
Reimplemented from _VDBL_colbase< _TT >.
Definition at line 469 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::def_copy | ( | return_type *& | d | ) | const [inline, virtual, inherited] |
void _VDBL_stdcol< _TT >::get | ( | type & | c | ) | const [inline, virtual, inherited] |
This function stores a copy of the column value into c
. This function stores a copy of the column default value into d
. This function sets c
to a const pointer pointing to the column's actual value. Here, no copying is done. This function returns a pointer to a copy of the column's value. The copy of the value is allocated by new
. It has to be delete
d by the user to avoid memory leaks.
Reimplemented from _VDBL_colbase< _TT >.
Definition at line 446 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::get_copy | ( | _VDBL_alltype_base *& | v | ) | const [inline, virtual, inherited] |
This version of get_copy
returns a copy of the columns value within an alltype
. This is useful for passing on column values. It can also be used to circumvent the strict run-time type checking. The user is, however, DISCOURAGED to do so.
Reimplemented from _VDBL_colbase< _TT >.
Definition at line 462 of file vdbl_col.h.
const type& _VDBL_stdcol< _TT >::get_val | ( | ) | const [inline, inherited] |
get a const reference to the column value
Definition at line 491 of file vdbl_col.h.
_Self* _VDBL_stdcol< _TT >::new_copy | ( | ) | const [inline, virtual, inherited] |
new_copy
is the clone operation for copy-constructor overloading. setcontext
sets the context for value retrieval.
Reimplemented from _VDBL_colbase< _TT >.
Definition at line 433 of file vdbl_col.h.
std::ostream& _VDBL_stdcol< _TT >::print_contents | ( | std::ostream & | o | ) | const [inline, virtual, inherited] |
This function is needed for the operator<< for columns of type return_type
.
Reimplemented from _VDBL_colbase< _TT >.
Definition at line 493 of file vdbl_col.h.
virtual const std::type_info& _VDBL_colbase< _TT >::return_type_id | ( | ) | const [inline, virtual, inherited] |
This function returns the type_info
of the column type. This information is used during run-time type checking.
Definition at line 221 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::set | ( | const type & | __t | ) | [inline, inherited] |
set the column value
Definition at line 479 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::set | ( | const _Self & | _p | ) | [inline, inherited] |
explicit copy operation
Definition at line 438 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::set_default | ( | const type & | __t | ) | [inline, inherited] |
set the default value for this column. This is actually equivalent to set
, since default and standard columns coincide for constant values.
Definition at line 486 of file vdbl_col.h.
void _VDBL_stdcol< _TT >::setcontext | ( | const context * | _c, | |
const _VDBL_row * | _r | |||
) | [inline, inherited] |
this method is empty, since constant values are independend of the context.
Definition at line 444 of file vdbl_col.h.