Soar Kernel  9.3.2 08-06-12
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes
soar_module::sqlite_statement_container Class Reference

#include <soar_db.h>

Inherits soar_module::statement_container.

Inherited by epmem_common_statement_container, epmem_graph_statement_container, smem_statement_container, and stats_statement_container.

Public Member Functions

void add_structure (const char *new_structure)
 sqlite_statement_container (sqlite_database *new_db)
void structure ()
virtual ~sqlite_statement_container ()
- Public Member Functions inherited from soar_module::statement_container
void add (statement *new_statement)
void clean ()
void prepare ()
 statement_container ()
virtual ~statement_container ()

Protected Attributes

sqlite_databasemy_db
std::list< const char * > * structures
- Protected Attributes inherited from soar_module::statement_container
std::list< statement * > * statements

Detailed Description

Definition at line 488 of file soar_db.h.

Constructor & Destructor Documentation

soar_module::sqlite_statement_container::sqlite_statement_container ( sqlite_database new_db)
inline

Definition at line 496 of file soar_db.h.

: statement_container(), structures( new std::list<const char *>() ), my_db( new_db ) {}
virtual soar_module::sqlite_statement_container::~sqlite_statement_container ( )
inlinevirtual

Definition at line 498 of file soar_db.h.

References structures.

{
delete structures;
}

Member Function Documentation

void soar_module::sqlite_statement_container::add_structure ( const char *  new_structure)
inline
void soar_module::sqlite_statement_container::structure ( )
inline

Definition at line 510 of file soar_db.h.

References soar_module::statement::execute(), soar_module::status_object< T >::get_status(), my_db, soar_module::statement::prepare(), soar_module::ready, and structures.

Referenced by epmem_init_db(), smem_init_db(), and stats_init_db().

{
sqlite_statement *temp_stmt;
for ( std::list<const char *>::iterator p=structures->begin(); p!=structures->end(); p++ )
{
temp_stmt = new sqlite_statement( my_db, (*p) );
temp_stmt->prepare();
assert( temp_stmt->get_status() == ready );
temp_stmt->execute();
delete temp_stmt;
}
}

Field Documentation

sqlite_database* soar_module::sqlite_statement_container::my_db
protected

Definition at line 493 of file soar_db.h.

Referenced by structure().

std::list<const char *>* soar_module::sqlite_statement_container::structures
protected

Definition at line 491 of file soar_db.h.

Referenced by add_structure(), structure(), and ~sqlite_statement_container().


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