diff options
Diffstat (limited to 'cpp/src/slice2html/Gen.h')
-rw-r--r-- | cpp/src/slice2html/Gen.h | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/cpp/src/slice2html/Gen.h b/cpp/src/slice2html/Gen.h index 36b0f96c0e8..d48405e71b5 100644 --- a/cpp/src/slice2html/Gen.h +++ b/cpp/src/slice2html/Gen.h @@ -17,7 +17,7 @@ namespace Slice { void generate(const UnitPtr&, const ::std::string&, const ::std::string&, const ::std::string&, const std::string&, - const ::std::string&, unsigned, unsigned); + const ::std::string&, const ::std::string&, const ::std::string&, unsigned, unsigned); typedef ::std::set< ::std::string> Files; @@ -28,8 +28,11 @@ public: static void setOutputDir(const ::std::string&); static void setHeader(const ::std::string&); static void setFooter(const ::std::string&); + static void setImageDir(const ::std::string&); + static void setLogoURL(const ::std::string&); static void setIndexCount(int); static void warnSummary(int); + static void setSymbols(const ContainedList&); protected: @@ -43,23 +46,31 @@ protected: void start(const ::std::string&, const ::std::string& = ::std::string()); void end(); - void printComment(const ContainedPtr&, const ::std::string&, bool = false); + void printComment(const ContainedPtr&, const ContainerPtr&, const ::std::string&, bool = false); void printMetaData(const ContainedPtr&); void printSummary(const ContainedPtr&, const ContainerPtr&, bool); - ::std::string toString(const SyntaxTreeBasePtr&, const ContainerPtr&, bool = true, bool = false, unsigned* = 0, - bool = false); + void printHeaderFooter(const ContainedPtr&); + void printLogo(const ContainedPtr&, const ContainerPtr&, bool); + + ::std::string toString(const SyntaxTreeBasePtr&, const ContainerPtr&, bool = true, bool = false, + unsigned* = 0, bool = false); ::std::string toString(const ::std::string&, const ContainerPtr&, bool = true, bool = false, unsigned* = 0); ::std::string getComment(const ContainedPtr&, const ContainerPtr&, bool, bool = false); static ::std::string getAnchor(const SyntaxTreeBasePtr&); - static ::std::string getLinkPath(const SyntaxTreeBasePtr&, const ContainerPtr&, bool); + static StringList getTarget(const SyntaxTreeBasePtr&); + static ::std::string getLinkPath(const SyntaxTreeBasePtr&, const ContainerPtr&, bool, bool = false); + + static ::std::string getImageDir(); + static ::std::string getLogoURL(); ::IceUtil::XMLOutput& _out; static unsigned _indexCount; static unsigned _warnSummary; + private: void openStream(const ::std::string&); @@ -77,12 +88,15 @@ private: static ::std::string getFooter(const ::std::string&); ::std::string _indexFooter; - const Files& _files; + const Files _files; static ::std::string _dir; static ::std::string _header1; static ::std::string _header2; static ::std::string _footer; + static ::std::string _imageDir; + static ::std::string _logoURL; + static ContainedList _symbols; }; class StartPageGenerator : private GeneratorBase @@ -94,6 +108,9 @@ public: void generate(const ModulePtr&); private: + + void printHeaderFooter(); + typedef ::std::pair< ::std::string, ::std::string> StringPair; typedef ::std::vector<StringPair> ModuleDescriptions; ModuleDescriptions _modules; @@ -140,15 +157,16 @@ class TOCGenerator : private GeneratorBase public: TOCGenerator(const Files&, const ::std::string&, const ::std::string&); - ~TOCGenerator(); void generate(const ModulePtr&); + void writeTOC(); + const ContainedList& symbols() const; private: - void writeTOC(); void writeEntry(const ContainedPtr&); ModuleList _modules; + ContainedList _symbols; ::IceUtil::XMLOutput _out; }; @@ -160,6 +178,8 @@ public: virtual bool visitUnitStart(const UnitPtr&); virtual bool visitModuleStart(const ModulePtr&); + void generate(); + const ContainedList& symbols() const; private: |