My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
SchedDoc.h
Go to the documentation of this file.
1 // $Id: SchedDoc.h,v 1.1.1.1 2009/07/06 23:57:26 eml Exp $
2 
3 #ifndef GCP_UTIL_SCHEDDOC_H
4 #define GCP_UTIL_SCHEDDOC_H
5 
16 #include "gcp/util/common/String.h"
17 
18 #include <iostream>
19 #include <sstream>
20 #include <string>
21 #include <vector>
22 
23 namespace gcp {
24  namespace util {
25 
26  class SchedDoc {
27  public:
28 
32  SchedDoc();
33 
37  SchedDoc(const SchedDoc& objToBeCopied);
38 
42  SchedDoc(SchedDoc& objToBeCopied);
43 
47  void operator=(const SchedDoc& objToBeAssigned);
48 
52  void operator=(SchedDoc& objToBeAssigned);
53 
57  friend std::ostream& operator<<(std::ostream& os, SchedDoc& obj);
58 
62  virtual ~SchedDoc();
63 
64  void documentSchedules(std::string schDir, std::string outputDir);
65 
66  private:
67 
68  void ingestFile(std::string fileName, std::ostringstream& os, std::vector<std::string>& commands);
69 
70  std::vector<std::string> generateFileList(std::string schDir);
71  void generateDocumentation(std::string schDir, std::string outputDir, std::string schName);
72  void createDirs(std::string& dir, std::vector<std::string>& schedules);
73  bool lineContainsCommand(std::string& s);
74  void searchForCommandDocumentation(String& str, std::vector<std::string>& commands, std::vector<std::string>& commandDocs);
75 
76  void createIndexFile(std::string outputDir, std::vector<std::string>& schedules);
77  void writeHtmlScheduleList(std::string dir, std::vector<std::string>& fileList);
78  void writeHtmlFooter(std::ofstream& fout);
79  void writeHtmlHeader(std::ofstream& fout, std::string path);
80  void writeHtmlStyleSheet(std::string& dir);
81  void writeHtmlScheduleSynopsisFile(std::string& dir, std::string& schedName, std::string& content, std::string& callSequence);
82  void writeHtmlScheduleDocumentationFile(std::string& dir, std::string& schedName, std::string& content);
83 
84  void searchForCommandDocumentation(String& str, std::vector<std::string>& commands, std::vector<std::string>& commandSums,
85  std::vector<std::string>& commandDocs);
86 
87  void writeHtmlScheduleCommandList(std::string dir, std::string& schedName, std::vector<std::string>& commDeclList);
88 
89  void writeHtmlScheduleCommandSynopsisFile(std::string& dir, std::string& schedName, std::string& commDecl, std::string& content);
90 
91  void writeHtmlScheduleCommandDocumentationFile(std::string& dir, std::string& schedName, std::string& commName,
92  std::string& content);
93 
94  std::vector<std::string> commandDeclsToSortedCommandNames(std::vector<std::string>& commandDecls);
95 
96  }; // End class SchedDoc
97 
98  } // End namespace util
99 } // End namespace gcp
100 
101 
102 
103 #endif // End #ifndef GCP_UTIL_SCHEDDOC_H
void documentSchedules(std::string schDir, std::string outputDir)
Definition: SchedDoc.cc:75
friend std::ostream & operator<<(std::ostream &os, SchedDoc &obj)
Definition: String.h:16
void operator=(const SchedDoc &objToBeAssigned)
Definition: SchedDoc.cc:44
virtual ~SchedDoc()
Definition: SchedDoc.cc:69
SchedDoc()
Definition: SchedDoc.cc:23
Definition: SchedDoc.h:26