Permalink
Browse files

Added javascript search engine data to the template context

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Dec 30, 2014
1 parent cfac082 commit 6bb0d2908b4ca7908a8e655a5abcf7615a5f4c77

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -52,7 +52,10 @@ class MemberGroup;
class MemberGroupSDict;
class MemberGroupList;
class DotNode;
class DotGfxHierarchyTable;
class DotGfxHierarchyTable;
struct SearchIndexInfo;
class SearchIndexList;
class SearchDefinitionList;
//----------------------------------------------------
@@ -1154,6 +1157,173 @@ class ArgumentListContext : public RefCountedContext, public TemplateListIntf
//----------------------------------------------------
class SymbolContext : public RefCountedContext, public TemplateStructIntf
{
public:
static SymbolContext *alloc(const Definition *def,const Definition *prev,const Definition *next)
{ return new SymbolContext(def,prev,next); }
// TemplateStructIntf methods
virtual TemplateVariant get(const char *name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SymbolContext(const Definition *def,const Definition *prev,const Definition *next);
~SymbolContext();
class Private;
Private *p;
};
//----------------------------------------------------
class SymbolListContext : public RefCountedContext, public TemplateListIntf
{
public:
static SymbolListContext *alloc(const SearchDefinitionList *sdl)
{ return new SymbolListContext(sdl); }
// TemplateListIntf
virtual int count() const;
virtual TemplateVariant at(int index) const;
virtual TemplateListIntf::ConstIterator *createIterator() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SymbolListContext(const SearchDefinitionList *sdl);
~SymbolListContext();
class Private;
Private *p;
};
//----------------------------------------------------
class SymbolGroupContext : public RefCountedContext, public TemplateStructIntf
{
public:
static SymbolGroupContext *alloc(const SearchDefinitionList *sdl)
{ return new SymbolGroupContext(sdl); }
// TemplateStructIntf methods
virtual TemplateVariant get(const char *name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SymbolGroupContext(const SearchDefinitionList *sdl);
~SymbolGroupContext();
class Private;
Private *p;
};
//----------------------------------------------------
class SymbolGroupListContext : public RefCountedContext, public TemplateListIntf
{
public:
static SymbolGroupListContext *alloc(const SearchIndexList *sil)
{ return new SymbolGroupListContext(sil); }
// TemplateListIntf
virtual int count() const;
virtual TemplateVariant at(int index) const;
virtual TemplateListIntf::ConstIterator *createIterator() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SymbolGroupListContext(const SearchIndexList *sil);
~SymbolGroupListContext();
class Private;
Private *p;
};
//----------------------------------------------------
class SymbolIndexContext : public RefCountedContext, public TemplateStructIntf
{
public:
static SymbolIndexContext *alloc(const SearchIndexList *sl,const QCString &name)
{ return new SymbolIndexContext(sl,name); }
// TemplateStructIntf methods
virtual TemplateVariant get(const char *name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SymbolIndexContext(const SearchIndexList *sl,const QCString &name);
~SymbolIndexContext();
class Private;
Private *p;
};
//----------------------------------------------------
class SymbolIndicesContext : public RefCountedContext, public TemplateListIntf
{
public:
static SymbolIndicesContext *alloc(const SearchIndexInfo *info)
{ return new SymbolIndicesContext(info); }
// TemplateListIntf
virtual int count() const;
virtual TemplateVariant at(int index) const;
virtual TemplateListIntf::ConstIterator *createIterator() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SymbolIndicesContext(const SearchIndexInfo *info);
~SymbolIndicesContext();
class Private;
Private *p;
};
//----------------------------------------------------
class SearchIndexContext : public RefCountedContext, public TemplateStructIntf
{
public:
static SearchIndexContext *alloc(const SearchIndexInfo *info)
{ return new SearchIndexContext(info); }
// TemplateStructIntf methods
virtual TemplateVariant get(const char *name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SearchIndexContext(const SearchIndexInfo *info);
~SearchIndexContext();
class Private;
Private *p;
};
//----------------------------------------------------
class SearchIndicesContext : public RefCountedContext, public TemplateListIntf
{
public:
static SearchIndicesContext *alloc() { return new SearchIndicesContext; }
// TemplateListIntf
virtual int count() const;
virtual TemplateVariant at(int index) const;
virtual TemplateListIntf::ConstIterator *createIterator() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
private:
SearchIndicesContext();
~SearchIndicesContext();
class Private;
Private *p;
};
//----------------------------------------------------
void generateOutputViaTemplate();
#endif
@@ -11484,12 +11484,17 @@ void generateOutput()
static bool searchEngine = Config_getBool("SEARCHENGINE");
static bool serverBasedSearch = Config_getBool("SERVER_BASED_SEARCH");
g_s.begin("Generating search indices...\n");
if (searchEngine && !serverBasedSearch && (generateHtml || g_useOutputTemplate))
{
createJavascriptSearchIndex();
}
// generate search indices (need to do this before writing other HTML
// pages as these contain a drop down menu with options depending on
// what categories we find in this function.
if (generateHtml && searchEngine)
{
g_s.begin("Generating search indices...\n");
QCString searchDirName = Config_getString("HTML_OUTPUT")+"/search";
QDir searchDir(searchDirName);
if (!searchDir.exists() && !searchDir.mkdir(searchDirName))
@@ -11503,8 +11508,8 @@ void generateOutput()
{
writeJavascriptSearchIndex();
}
g_s.end();
}
g_s.end();
g_s.begin("Generating example documentation...\n");
generateExampleDocs();
Oops, something went wrong.

0 comments on commit 6bb0d29

Please sign in to comment.