#include <SQLSerialize.h>
Inheritance diagram for oasys::SQLTableFormat:

Definition at line 159 of file SQLSerialize.h.
Public Member Functions | |
| SQLTableFormat (const char *table_name, SQLImplementation *impl) | |
| Constructor. | |
| virtual void | begin_action () |
| By default, do nothing. | |
| virtual void | end_action () |
| By default, do nothing. | |
| int | action (const SerializableObject *const_object) |
| Since table format doesn't modify the object, define a variant of action() that operates on a const SerializableObject. | |
| void | process (const char *name, SerializableObject *object) |
| Process function for a contained SerializableObject. | |
| void | process (const char *name, u_int32_t *i) |
| Process function for a 4 byte integer. | |
| void | process (const char *name, u_int16_t *i) |
| Process function for a 2 byte integer. | |
| void | process (const char *name, u_int8_t *i) |
| Process function for a byte. | |
| void | process (const char *name, bool *b) |
| Process function for a boolean. | |
| void | process (const char *name, u_char *bp, size_t len) |
| Process function for a constant length char buffer. | |
| void | process (const char *name, u_char **bp, size_t *lenp, int flags) |
| Process function for a variable length char buffer. | |
| void | process (const char *name, std::string *s) |
| Process function for a c++ string. | |
Protected Member Functions | |
| void | append (const char *name, const char *type) |
Protected Attributes | |
| StringBuffer | column_prefix_ |
| oasys::SQLTableFormat::SQLTableFormat | ( | const char * | table_name, | |
| SQLImplementation * | impl | |||
| ) |
| void oasys::SQLTableFormat::begin_action | ( | ) | [virtual] |
By default, do nothing.
Reimplemented from oasys::SerializeAction.
Definition at line 319 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), oasys::SQLQuery::query_, and oasys::SQLQuery::table_name_.
| void oasys::SQLTableFormat::end_action | ( | ) | [virtual] |
By default, do nothing.
Reimplemented from oasys::SerializeAction.
Definition at line 325 of file SQLSerialize.cc.
References oasys::StringBuffer::data(), oasys::StringBuffer::length(), and oasys::SQLQuery::query_.
| int oasys::SQLTableFormat::action | ( | const SerializableObject * | const_object | ) | [inline] |
Since table format doesn't modify the object, define a variant of action() that operates on a const SerializableObject.
Definition at line 173 of file SQLSerialize.h.
References oasys::SerializeAction::action().
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| SerializableObject * | object | |||
| ) | [virtual] |
Process function for a contained SerializableObject.
The default implementation just calls serialize() on the contained object, ignoring the name value. However, a derived class can of course override it to make use of the name (as is done by SQLTableFormat, for example).
Reimplemented from oasys::SerializeAction.
Definition at line 334 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), column_prefix_, oasys::StringBuffer::length(), oasys::SerializableObject::serialize(), and oasys::StringBuffer::trim().
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| u_int32_t * | i | |||
| ) | [virtual] |
Process function for a 4 byte integer.
Implements oasys::SerializeAction.
Definition at line 353 of file SQLSerialize.cc.
References append().
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| u_int16_t * | i | |||
| ) | [virtual] |
Process function for a 2 byte integer.
Implements oasys::SerializeAction.
Definition at line 360 of file SQLSerialize.cc.
References append().
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| u_int8_t * | i | |||
| ) | [virtual] |
Process function for a byte.
Implements oasys::SerializeAction.
Definition at line 367 of file SQLSerialize.cc.
References append().
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| bool * | b | |||
| ) | [virtual] |
Process function for a boolean.
Implements oasys::SerializeAction.
Definition at line 377 of file SQLSerialize.cc.
References append().
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| u_char * | bp, | |||
| size_t | len | |||
| ) | [virtual] |
Process function for a constant length char buffer.
| name | field name | |
| bp | buffer | |
| len | buffer length |
Implements oasys::SerializeAction.
Definition at line 392 of file SQLSerialize.cc.
References append(), oasys::SQLImplementation::binary_datatype(), and oasys::SQLQuery::sql_impl_.
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| u_char ** | bp, | |||
| size_t * | lenp, | |||
| int | flags | |||
| ) | [virtual] |
Process function for a variable length char buffer.
| name | field name | |
| bp | buffer, allocated by SerializeAction if ALLOC_MEM flag is set. | |
| lenp | IN: If ALLOC_MEM flags is set, then len is the length of the buffer allocated. OUT: contains the length of the buffer | |
| flags | ALLOC_MEM as above, NULL_TERMINATED specifies that the data stored will be a null-terminated C-string. |
Implements oasys::SerializeAction.
Definition at line 400 of file SQLSerialize.cc.
References append(), oasys::SQLImplementation::binary_datatype(), NOTIMPLEMENTED, oasys::Serialize::NULL_TERMINATED, and oasys::SQLQuery::sql_impl_.
| void oasys::SQLTableFormat::process | ( | const char * | name, | |
| std::string * | s | |||
| ) | [virtual] |
Process function for a c++ string.
Implements oasys::SerializeAction.
Definition at line 385 of file SQLSerialize.cc.
References append().
| void oasys::SQLTableFormat::append | ( | const char * | name, | |
| const char * | type | |||
| ) | [protected] |
Definition at line 344 of file SQLSerialize.cc.
References oasys::StringBuffer::appendf(), column_prefix_, oasys::StringBuffer::data(), oasys::StringBuffer::length(), and oasys::SQLQuery::query_.
Referenced by process().
StringBuffer oasys::SQLTableFormat::column_prefix_ [protected] |
1.5.1