Doxygen
Loading...
Searching...
No Matches
sqlite3gen.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void generateSqlite3 ()
 

Function Documentation

◆ generateSqlite3()

void generateSqlite3 ( )

Definition at line 2588 of file sqlite3gen.cpp.

2589{
2590 // + classes
2591 // + namespaces
2592 // + files
2593 // + groups
2594 // + related pages
2595 // + examples
2596 // + main page
2597 sqlite3 *db = openDbConnection();
2598 if (db==nullptr)
2599 {
2600 return;
2601 }
2602
2603# ifdef SQLITE3_DEBUG
2604 // debug: show all executed statements
2605 sqlite3_trace(db, &sqlLog, nullptr);
2606# endif
2607
2608 beginTransaction(db);
2609 pragmaTuning(db);
2610
2611 if (-1==initializeTables(db))
2612 return;
2613
2614 if ( -1 == prepareStatements(db) )
2615 {
2616 err("sqlite generator: prepareStatements failed!\n");
2617 return;
2618 }
2619
2621
2622 // + classes
2623 for (const auto &cd : *Doxygen::classLinkedMap)
2624 {
2625 msg("Generating Sqlite3 output for class %s\n",qPrint(cd->name()));
2626 generateSqlite3ForClass(cd.get());
2627 }
2628
2629 // + concepts
2630 for (const auto &cd : *Doxygen::conceptLinkedMap)
2631 {
2632 msg("Generating Sqlite3 output for concept %s\n",qPrint(cd->name()));
2633 generateSqlite3ForConcept(cd.get());
2634 }
2635
2636 // + modules
2637 for (const auto &mod : ModuleManager::instance().modules())
2638 {
2639 msg("Generating Sqlite3 output for module %s\n",qPrint(mod->name()));
2640 generateSqlite3ForModule(mod.get());
2641 }
2642
2643 // + namespaces
2644 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2645 {
2646 msg("Generating Sqlite3 output for namespace %s\n",qPrint(nd->name()));
2648 }
2649
2650 // + files
2651 for (const auto &fn : *Doxygen::inputNameLinkedMap)
2652 {
2653 for (const auto &fd : *fn)
2654 {
2655 msg("Generating Sqlite3 output for file %s\n",qPrint(fd->name()));
2656 generateSqlite3ForFile(fd.get());
2657 }
2658 }
2659
2660 // + groups
2661 for (const auto &gd : *Doxygen::groupLinkedMap)
2662 {
2663 msg("Generating Sqlite3 output for group %s\n",qPrint(gd->name()));
2664 generateSqlite3ForGroup(gd.get());
2665 }
2666
2667 // + page
2668 for (const auto &pd : *Doxygen::pageLinkedMap)
2669 {
2670 msg("Generating Sqlite3 output for page %s\n",qPrint(pd->name()));
2671 generateSqlite3ForPage(pd.get(),FALSE);
2672 }
2673
2674 // + dirs
2675 for (const auto &dd : *Doxygen::dirLinkedMap)
2676 {
2677 msg("Generating Sqlite3 output for dir %s\n",qPrint(dd->name()));
2678 generateSqlite3ForDir(dd.get());
2679 }
2680
2681 // + examples
2682 for (const auto &pd : *Doxygen::exampleLinkedMap)
2683 {
2684 msg("Generating Sqlite3 output for example %s\n",qPrint(pd->name()));
2685 generateSqlite3ForPage(pd.get(),TRUE);
2686 }
2687
2688 // + main page
2690 {
2691 msg("Generating Sqlite3 output for the main page\n");
2693 }
2694
2695 // TODO: copied from initializeSchema; not certain if we should say/do more
2696 // if there's a failure here?
2697 if (-1==initializeViews(db))
2698 return;
2699
2700 endTransaction(db);
2701}
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:101
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96
static PageLinkedMap * exampleLinkedMap
Definition doxygen.h:99
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100
static DirLinkedMap * dirLinkedMap
Definition doxygen.h:129
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114
static ModuleManager & instance()
void msg(const char *fmt,...)
Definition message.cpp:98
#define err(fmt,...)
Definition message.h:84
const char * qPrint(const char *s)
Definition qcstring.h:661
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
static void recordMetadata()
static int initializeTables(sqlite3 *db)
static void generateSqlite3ForModule(const ModuleDef *mod)
static void beginTransaction(sqlite3 *db)
static void generateSqlite3ForConcept(const ConceptDef *cd)
static void generateSqlite3ForGroup(const GroupDef *gd)
static int prepareStatements(sqlite3 *db)
static void endTransaction(sqlite3 *db)
static void generateSqlite3ForDir(const DirDef *dd)
static int initializeViews(sqlite3 *db)
static sqlite3 * openDbConnection()
static void generateSqlite3ForClass(const ClassDef *cd)
static void generateSqlite3ForNamespace(const NamespaceDef *nd)
static void generateSqlite3ForFile(const FileDef *fd)
static void generateSqlite3ForPage(const PageDef *pd, bool isExample)
static void pragmaTuning(sqlite3 *db)

References beginTransaction(), Doxygen::classLinkedMap, Doxygen::conceptLinkedMap, Doxygen::dirLinkedMap, endTransaction(), err, Doxygen::exampleLinkedMap, FALSE, generateSqlite3ForClass(), generateSqlite3ForConcept(), generateSqlite3ForDir(), generateSqlite3ForFile(), generateSqlite3ForGroup(), generateSqlite3ForModule(), generateSqlite3ForNamespace(), generateSqlite3ForPage(), Doxygen::groupLinkedMap, initializeTables(), initializeViews(), Doxygen::inputNameLinkedMap, ModuleManager::instance(), Doxygen::mainPage, msg(), Doxygen::namespaceLinkedMap, openDbConnection(), Doxygen::pageLinkedMap, pragmaTuning(), prepareStatements(), qPrint(), recordMetadata(), and TRUE.

Referenced by generateOutput().